Menu

PMTM_parameter_output

Iain Miller

PMTM_parameter_output

Fortran:

:::fortran
subroutine PMTM_parameter_output(instance , parameter_name , output_type , for_all_ranks , parameter_value , err_code)

Log a parameter to the output file. This is an interface routine which accepts the following parameter_value types: real(4), real(8), integer(4), integer(8), logical, character(len=*). If any other parameter types are required please contact the PMTM code custodian.

:::fortran
integer, intent(in)::instance

The handle of the instance to whose output file we are writing this parameter.

:::fortran
character(len=*), intent(in)::parameter_name 

The name of the parameter.

:::fortran
integer, intent(in)::output_type

The conditions for outputting this parameter, the options being:

  • PMTM_OUTPUT_ALWAYS
    • Always output the parameter.
  • PMTM_OUTPUT_ON_CHANGE
    • Only output the parameter if it has changed since the last output call.
  • PMTM_OUTPUT_ONCE
    • Only output the parameter on the first call to this routine.

If other versions are required, please contact the PMTM code custodians.

:::fortran
logical, intent(in)::for_all_ranks

Whether we are printing the parameter for all ranks (.TRUE.) or just for rank 0 (.FALSE.).

:::fortran
various, intent(in)::parameter_value

The value to output.

:::fortran
integer, intent(out)::err_code

Will be set to PMTM_SUCCESS if the call was successful and the appropriate error code if not.

Notes: The C version of this routine takes a printf style format string argument which is used to parse the parameter values at the end.

C:

:::C
PMTM_error_t PMTM_parameter_output(PMTM_instance_t instance, const char * parameter_name, PMTM_output_type_t output_type, PMTM_BOOL for_all_ranks, const char * format_string, ...)

Related

Wiki: PMTM Constants
Wiki: PMTM

MongoDB Logo MongoDB