tem_load_general Subroutine

public subroutine tem_load_general(me, conf, timingFile, solverAborts)

Load general treelm settings from the Lua script in conf.

Arguments

Type IntentOptional AttributesName
type(tem_general_type), intent(inout) :: me

global general parameter

type(flu_state) :: conf

Handle to the Lua script containing the configuration.

character(len=*), intent(in), optional :: timingFile

Default timing filename provided by the caller, overwritten by config file.

class(tem_solverAborts_type), intent(inout), optional :: solverAborts

Solver specific abort criteria to load.

See tem_abortCriteria_module for details on this additional abortCriteria parameters, that the solver may define to be loaded from the configuration.


Calls

proc~~tem_load_general~~CallsGraph proc~tem_load_general tem_load_general proc~tem_balance_load tem_balance_load proc~tem_load_general->proc~tem_balance_load proc~tem_simcontrol_load tem_simControl_load proc~tem_load_general->proc~tem_simcontrol_load proc~tem_simcontrol_dump tem_simControl_dump proc~tem_load_general->proc~tem_simcontrol_dump interface~aot_get_val~2 aot_get_val proc~tem_load_general->interface~aot_get_val~2 tem_sparse_comm_load tem_sparse_comm_load proc~tem_load_general->tem_sparse_comm_load tem_precice_load tem_precice_load proc~tem_load_general->tem_precice_load proc~tem_horizontalspacer tem_horizontalSpacer proc~tem_load_general->proc~tem_horizontalspacer proc~tem_load_env_params tem_load_env_params proc~tem_load_general->proc~tem_load_env_params proc~tem_load_commpattern tem_load_commPattern proc~tem_load_general->proc~tem_load_commpattern proc~tem_timer_loadconfig_glob tem_timer_loadconfig_glob proc~tem_load_general->proc~tem_timer_loadconfig_glob proc~aot_table_open aot_table_open proc~tem_balance_load->proc~aot_table_open proc~tem_time_never tem_time_never proc~tem_balance_load->proc~tem_time_never proc~aot_table_close aot_table_close proc~tem_balance_load->proc~aot_table_close proc~tem_timecontrol_load tem_timeControl_load proc~tem_balance_load->proc~tem_timecontrol_load interface~aot_get_val aot_get_val proc~tem_balance_load->interface~aot_get_val proc~tem_simcontrol_load->proc~aot_table_open proc~tem_timecontrol_start_at_sim tem_timeControl_start_at_sim proc~tem_simcontrol_load->proc~tem_timecontrol_start_at_sim proc~tem_simcontrol_load->proc~aot_table_close proc~tem_simcontrol_load->proc~tem_timecontrol_load proc~tem_abortcriteria_new tem_abortCriteria_new proc~tem_simcontrol_load->proc~tem_abortcriteria_new proc~tem_abortcriteria_load tem_abortCriteria_load proc~tem_simcontrol_load->proc~tem_abortcriteria_load proc~tem_timecontrol_dump tem_timeControl_dump proc~tem_simcontrol_dump->proc~tem_timecontrol_dump proc~tem_abortcriteria_dump tem_abortCriteria_dump proc~tem_simcontrol_dump->proc~tem_abortcriteria_dump proc~tem_simcontrol_dump_now tem_simControl_dump_now proc~tem_simcontrol_dump->proc~tem_simcontrol_dump_now proc~tem_status_dump tem_status_dump proc~tem_simcontrol_dump->proc~tem_status_dump proc~tem_load_env_params->interface~aot_get_val~2 proc~tem_load_commpattern->interface~aot_get_val~2 proc~tem_abort tem_abort proc~tem_load_commpattern->proc~tem_abort proc~tem_timer_loadconfig tem_timer_loadconfig proc~tem_timer_loadconfig_glob->proc~tem_timer_loadconfig

Called by

proc~~tem_load_general~~CalledByGraph proc~tem_load_general tem_load_general proc~load_env load_env proc~load_env->proc~tem_load_general proc~check_serial_multilevel_facedesc check_serial_multilevel_faceDesc proc~check_serial_multilevel_facedesc->proc~tem_load_general program~tem_spacetime_fun_test tem_spacetime_fun_test program~tem_spacetime_fun_test->proc~load_env program~tem_variable_evaltype_test tem_variable_evaltype_test program~tem_variable_evaltype_test->proc~load_env program~tem_varsys_stfunvar_test tem_varSys_stfunVar_test program~tem_varsys_stfunvar_test->proc~load_env program~tem_varsys_derivevar_test tem_varSys_deriveVar_test program~tem_varsys_derivevar_test->proc~load_env proc~check_serial_singlelevel_facedesc check_serial_singlelevel_faceDesc proc~check_serial_singlelevel_facedesc->proc~load_env program~tem_variable_extract_test tem_variable_extract_test program~tem_variable_extract_test->proc~load_env program~tem_varsys_statevar_test tem_varSys_stateVar_test program~tem_varsys_statevar_test->proc~load_env proc~check_parallel_singlelevel_facedesc check_parallel_singlelevel_faceDesc proc~check_parallel_singlelevel_facedesc->proc~load_env proc~check_variableoperations check_variableOperations proc~check_variableoperations->proc~load_env program~tem_varsys_test tem_varSys_test program~tem_varsys_test->proc~load_env program~tem_variable_combine_test tem_variable_combine_Test program~tem_variable_combine_test->proc~load_env program~tem_face_test~3 tem_face_test program~tem_face_test~3->proc~check_serial_multilevel_facedesc program~tem_varsys_opvar_test tem_varSys_opVar_test program~tem_varsys_opvar_test->proc~load_env program~tem_face_test tem_face_test program~tem_face_test->proc~check_parallel_singlelevel_facedesc program~tem_face_test~2 tem_face_test program~tem_face_test~2->proc~check_serial_singlelevel_facedesc program~tem_logical_opertor_test tem_logical_opertor_test program~tem_logical_opertor_test->proc~check_variableoperations

Contents

Source Code


Source Code

  subroutine tem_load_general( me, conf, timingFile, solverAborts )
    ! ----------------------------------------------------------------------
    !> global general parameter
    type( tem_general_type ), intent(inout) :: me
    !> Handle to the Lua script containing the configuration.
    type(flu_state) :: conf
    !> Default timing filename provided by the caller, overwritten by config
    !! file.
    character(len=*), optional, intent(in) :: timingFile

    !> Solver specific abort criteria to load.
    !!
    !! See [[tem_abortCriteria_module]] for details on this additional
    !! abortCriteria parameters, that the solver may define to be loaded
    !! from the configuration.
    class(tem_solverAborts_type), intent(inout), optional :: solverAborts
    ! ----------------------------------------------------------------------
    integer :: iError
    character(len=pathLen) :: def_timingFile
    ! ----------------------------------------------------------------------

    if ( me%proc%isRoot ) then
      call tem_horizontalSpacer(fUnit = logUnit(1))
      write(logUnit(1),"(A)") 'Loading general parameters:'
    end if

    ! load global enviromental parameters from config file
    call tem_load_env_params(conf)

    if ( me%proc%isRoot ) then
      write(logUnit(1),"(A)") 'Using '//trim(null_device)//' as null device.'

      if (printRuntimeInfo) then
        write(logUnit(1),"(A)") 'Will print run time info in the end'
        write(logUnit(1),"(A)") '(/proc/self/status).'
      else
        write(logUnit(1),"(A)") 'Will NOT print run time info.'
      end if

      write(logUnit(1),"(A,I0)") 'Size of the IO Buffer (MB): ', &
        &                          (io_buffer_size*8/1024/1024)
    end if

    ! load simulation name
    call aot_get_val( L       = conf,              &
      &               key     = 'simulation_name', &
      &               val     = me%solver%simName, &
      &               ErrCode = iError,            &
      &               default = 'simulation'       )

    if ( me%proc%isRoot ) then
      write(logUnit(1),"(A)") 'Simulation Name: ' // trim( me%solver%simName )
    end if

    ! load simulation time control
    call tem_simControl_load( me           = me%simControl, &
      &                       conf         = conf,          &
      &                       solverAborts = solverAborts   )

    if ( me%proc%isRoot ) then
      call tem_simControl_dump(me = me%simControl, outUnit = logUnit(1))
    end if

    ! Get the setting, whether to use sparse communication patterns or not.
    call tem_sparse_comm_load(conf)

    ! load communication pattern and initialize commuication
    ! infrastructure
    call tem_load_commpattern(conf = conf, me = me%commpattern)

    ! load timing filename
    if (present(timingFile)) then
      def_timingFile = timingFile
    else
      def_timingFile = 'timing.res'
    end if

    call aot_get_val( L       = conf,           &
      &               key     = 'timing_file',  &
      &               val     = me%timingFile,  &
      &               default = def_timingFile, &
      &               ErrCode = iError          )
    write(logUnit(1),"(A)") 'Write timings to: ' // trim( me%timingFile )

    ! Get load balancing config
    call tem_balance_load( conf = conf,      &
      &                    me   = me%balance )

    ! Load configuration of timer output from timer table.
    call tem_timer_loadconfig_glob( conf )

    ! load precice if available
    if (precice_available) then
      write(logUnit(1),"(A)") 'Loading precice data'
      call tem_precice_load(conf = conf)
    end if
    call tem_horizontalSpacer(fUnit = logUnit(1))

  end subroutine tem_load_general