tem_aux_module Module

Some auxilary routines, providing frequently needed common tasks.



Interfaces

public interface check_aot_error

  • private subroutine check_aot_error_scalar(iError, key, event_string)

    Auxiliary subroutine to check on errors from attempting to get values from the Lua script with aot_get_val.

    If a fatal error was encountered, the routine aborts the program!

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: iError

    aoterr code to interpret (returned by aot_get_val)

    character(len=*), intent(in) :: key

    Lua key that was attempted to be read

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

    Optional event string to describe the circumstances

  • private subroutine check_aot_error_vector(iError, key, event_string)

    Auxiliary subroutine to check on errors from attempting to get an array of values from the Lua script with aot_get_val.

    If a fatal error was encountered, the routine aborts the program!

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: iError(:)

    aoterr code to interpret (returned by aot_get_val)

    character(len=*), intent(in) :: key

    Lua key that was attempted to be read

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

    Optional event string to describe the circumstances


Functions

public function tem_global_vmhwm() result(hwm)

Obtain the memory status from all processes (min, max, avg).

Read more…

Arguments

None

Return Value real(kind=rk), (3)

public function utc_date_string() result(dat_string)

Function to create a human readable UTC date string.

Read more…

Arguments

None

Return Value character(len=26)


Subroutines

public subroutine tem_open_distconf(L, fileName, proc)

Read a Lua file on the first process and distribute it to all.

Read more…

Arguments

Type IntentOptional Attributes Name
type(flu_State) :: L
character(len=*), intent(in) :: fileName
type(tem_comm_env_type), intent(in) :: proc

Process description to use.

public subroutine tem_open_distconf_array(L, fileName, proc)

Open an array of Lua handles.

Read more…

Arguments

Type IntentOptional Attributes Name
type(flu_State) :: L(:)
character(len=*), intent(in) :: fileName
type(tem_comm_env_type) :: proc

public subroutine tem_open(file, unit, newunit, status, position, action, form, access, recl)

Wrapper around Fortran open of files to take care of errors and improve the error message in case the opening goes wrong.

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: file
integer, intent(in), optional :: unit
integer, intent(out), optional :: newunit
character(len=*), intent(in), optional :: status
character(len=*), intent(in), optional :: position
character(len=*), intent(in), optional :: action
character(len=*), intent(in), optional :: form
character(len=*), intent(in), optional :: access
integer, intent(in), optional :: recl

public subroutine tem_abort(errorMsg)

Abort the program with finalization of the environment

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in), optional :: errorMsg

An optional error message to print a reason for the abort.

public subroutine tem_unit_close(me)

Check, if a unit is open, and close it

Arguments

Type IntentOptional Attributes Name
integer :: me

the restart type to close

public subroutine tem_checkLabel(label, nLabels)

check whether the current label is already given

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: label(:)

holding array of labels with label(n) contains current label

integer, intent(in) :: nLabels

Number of schemes already existing in the scheme array (they are being added currently, so we only have to compare against the ones coming before the current one, up to nSchemes-1)

public subroutine tem_print_execInfo()

Print information of the executable

Arguments

None

public subroutine check_mpi_error(iError, event_string)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: iError
character(len=*), intent(in) :: event_string

private subroutine check_aot_error_scalar(iError, key, event_string)

Auxiliary subroutine to check on errors from attempting to get values from the Lua script with aot_get_val.

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: iError

aoterr code to interpret (returned by aot_get_val)

character(len=*), intent(in) :: key

Lua key that was attempted to be read

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

Optional event string to describe the circumstances

private subroutine check_aot_error_vector(iError, key, event_string)

Auxiliary subroutine to check on errors from attempting to get an array of values from the Lua script with aot_get_val.

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: iError(:)

aoterr code to interpret (returned by aot_get_val)

character(len=*), intent(in) :: key

Lua key that was attempted to be read

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

Optional event string to describe the circumstances