Redirecting standard input and output

The redirection of standard input, output, and error output (file descriptor 0, 1 and 2) is done automatically without any further user interaction. In particular, the following actions are performed:

Input data is handled in a quite similar way. The ParaStation MPI Logger process reads the input from the (virtual) terminal or the file from which the input is redirected and sends it to a forwarder or a group of forwarders. The default action is to send it to the forwarder of the process with rank 0. This behavior might be modified as discussed below.

The redirection of input and output can be configured by a number of environment variables:

PSI_INPUTDEST

Forward all input to the process with rank rank or a list of processes with ranks ranklist defined by this variable.

The rank of a process is unique within a parallel task. The rank of a process can be determined via the PSE_getRank(3) library function. The rank of a process is identical to the MPI rank within the MPI_COMM_WORLD context which can be identified using the MPI_Comm_rank(3) library call.

The default is to forward all input to the process with rank 0.

PSI_SOURCEPRINTF

If this environment variable is defined, each fraction of output is prepended with a tag providing the rank of the process that was producing it. If the ParaStation MPI Logger is put into the verbose mode using the PSI_LOGGERDEBUG environment variable, also the length of the output fraction to print is shown.

PSI_NOMSGLOGGERDONE

Define this environment variable in order to suppress the message

  PSIlogger: done

produced by the ParaStation MPI Logger process before exiting. This happens when all ParaStation MPI Forwarder have closed their connections to the logger.

PSI_LOGGERDEBUG

Turn on verbose mode for the ParaStation MPI Logger process. This will produce messages about connecting and detaching forwarders, received output, sent input and received signals.

This variable is intended for internal use only.

PSI_FORWARDERDEBUG

Turn on verbose mode for the ParaStation MPI Forwarder process. This will print information about received input, output and signals.

This variable is also intended for internal use only.