Public Member Functions | |
| subroutine | messagenotifyc (level, where, message, i, r, d, l, n, c1, c2, c3, ca, rank_mpi) |
| subroutine | messagenotifyi (number, where, message, i, r, d, l, n, c1, c2, c3, ca, rank_mpi) |
Definition at line 64 of file dc_message.f90.
| subroutine dc_message::messagenotify::messagenotifyc | ( | character(*), intent(in) | level, |
| character(*), intent(in) | where, | ||
| character(*), intent(in) | message, | ||
| integer, dimension(:), intent(in), optional | i, | ||
| real, dimension(:), intent(in), optional | r, | ||
| real(dp), dimension(:), intent(in), optional | d, | ||
| logical, dimension(:), intent(in), optional | l, | ||
| integer, dimension(:), intent(in), optional | n, | ||
| character(*), intent(in), optional | c1, | ||
| character(*), intent(in), optional | c2, | ||
| character(*), intent(in), optional | c3, | ||
| character(*), dimension(:), intent(in), optional | ca, | ||
| integer, intent(in), optional | rank_mpi | ||
| ) |
Output message or terminate with error
Use this subroutine when you want to output a message to standard output.
Give the character variable where as the program name (subroutine name) etc., indicating where in the program the message is output.
Give the character variable message the string you want to output. You can also add optional variables i, r, d, L, s, n, c1, c2, c3. See dc_string::CPrintf for details.
The character variable level determines the type of message to output:
If "E" is given, the program is forcibly terminated after the message is output. The error code will be dc_error::USR_ERRNO.
| [in] | level | Message level ("E", "W", or "M") |
| [in] | where | Program name, procedure name |
| [in] | message | Message text |
| [in] | i | Integer values for formatting |
| [in] | r | Real values for formatting |
| [in] | d | Double precision values for formatting |
| [in] | L | Logical values for formatting |
| [in] | n | Integer values for formatting |
| [in] | c1 | Character string 1 for formatting |
| [in] | c2 | Character string 2 for formatting |
| [in] | c3 | Character string 3 for formatting |
| [in] | ca | Character array for formatting |
| [in] | rank_mpi | When MPI is used, messages are output only on the node with this rank number. If a negative value is given, output is done on all nodes. This option is ignored if MPI is not used. |
Definition at line 147 of file dc_message.f90.
References dc_types::dp, dc_error::storeerror(), dc_types::string, and dc_error::usr_errno.
| subroutine dc_message::messagenotify::messagenotifyi | ( | integer, intent(in) | number, |
| character(*), intent(in) | where, | ||
| character(*), intent(in), optional | message, | ||
| integer, dimension(:), intent(in), optional | i, | ||
| real, dimension(:), intent(in), optional | r, | ||
| real(dp), dimension(:), intent(in), optional | d, | ||
| logical, dimension(:), intent(in), optional | l, | ||
| integer, dimension(:), intent(in), optional | n, | ||
| character(*), intent(in), optional | c1, | ||
| character(*), intent(in), optional | c2, | ||
| character(*), intent(in), optional | c3, | ||
| character(*), dimension(:), intent(in), optional | ca, | ||
| integer, intent(in), optional | rank_mpi | ||
| ) |
Output message or terminate with error (with error code)
Basically the same as the other MessageNotify (or dc_message::MessageNotifyC), but this one takes a numeric variable number as the first argument. This number is passed directly to dc_error::StoreError as an error code. See dc_error for error codes.
| [in] | number | Error code (see dc_error) |
| [in] | where | Program name, procedure name |
| [in] | message | Message text (optional) |
| [in] | i | Integer values for formatting |
| [in] | r | Real values for formatting |
| [in] | d | Double precision values for formatting |
| [in] | L | Logical values for formatting |
| [in] | n | Integer values for formatting |
| [in] | c1 | Character string 1 for formatting |
| [in] | c2 | Character string 2 for formatting |
| [in] | c3 | Character string 3 for formatting |
| [in] | ca | Character array for formatting |
| [in] | rank_mpi | When MPI is used, messages are output only on the node with this rank number. If a negative value is given, output is done on all nodes. This option is ignored if MPI is not used. |
Definition at line 232 of file dc_message.f90.
References dc_types::dp, and dc_error::storeerror().