subroutine set_die_routine(func) procedure(psml_die_interf) :: func psml_die => func end subroutine set_die_routine