Finalize the environment, should be the very last call in the program.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_general_type), | intent(in) | :: | general |
encapsulates global parameters which are common for all solvers |
subroutine tem_finalize(general) ! ---------------------------------------------------------------------- !> encapsulates global parameters which are common for all solvers type(tem_general_type), intent(in) :: general ! ---------------------------------------------------------------------- character(len=labelLen) :: timerName real(kind=rk) :: timerValue ! ---------------------------------------------------------------------- if ( tem_status_run_terminate(general%simControl%status) ) then call tem_abort() end if call tem_timer_dump_glob( comm = general%proc%comm, & & myrank = general%proc%rank, & & nProcs = general%proc%comm_size ) if ( general%proc%isRoot ) then if ( printRuntimeInfo ) call print_self_status() timerName = tem_getTimerName(timerHandle = general%solver%timerHandle ) timerValue = tem_getTimerVal( timerHandle = general%solver%timerHandle ) write(logUnit(1),*) write(logUnit(1),"(A,F10.2,A)") " Done with " // trim(timerName) & & // " in ", timerValue, ' s' end if ! finialize mpi call fin_env() end subroutine tem_finalize