19.4.11. Printing Parameters

User Fortran code that needs to output results to file can use normal Fortran output statements, provided that these are coded in junction box routines called from the user output location. This enables the same code to use in serial and parallel.

However, it can also be useful for other user routines to be able to print out key parameters elsewhere during a run. Typical uses might be for checking and recording control settings or for observing run progress.

Some simple printing utilities are provided that are valid for both serial and parallel runs. These send text via the leader process to the output file and at the same time to the console.

The following utilities print messages of the form name = value:

      CALL USER_PRINT_CHAR( NAME, VALUE )
      CALL USER_PRINT_DBLE( NAME, VALUE )
      CALL USER_PRINT_INTR( NAME, VALUE )
      CALL USER_PRINT_LOGL( NAME, VALUE )
      CALL USER_PRINT_REAL( NAME, VALUE )

There are two input arguments.

  • NAME is a label of type CHARACTER*(*).

  • VALUE is a Fortran constant or variable of type CHARACTER*(*), DOUBLE PRECISION, INTEGER, LOGICAL or REAL as indicated by the utility name.

The above utilities make use of the following CFX-Solver routine for outputting a general string

      CALL MESAGE( 'WRITE-ASIS', STRING )

where STRING is data of type CHARACTER*(*).

This MESAGE routine can be used for constructing other forms of message from User Fortran that will also be valid in both parallel and serials runs.