Spawning the environment

Another important task while spawning parallel applications in a cluster is to setup a proper environment for the newly created processes on each node.

ParaStation MPI by default exports only a limited set of environment variables to newly spawned processes, like HOME, USER, SHELL or TERM.

In addition, each currently defined environment variable can be exported to spawned processes by adding the variable name to the special ParaStation MPI variable PSI_EXPORTS. E.g., within a Bourne shell (or look alike), the commands

  $ PSI_EXPORTS=Variable1,Variable2,...
  $ export PSI_EXPORTS

will export the variables Variable1 and Variable2 to all processes. Accordingly, for a csh based environment, the command

  $ setenv PSI_EXPORTS Variable1,Variable2,...

will export this variables to all subsequent parallel tasks.


Beside these variables, additional variables might be inherently set for remote processes by the inetd(8) , e.g. PATH or HOSTNAME.

Beside defining environment variables, mpiexec may be used to export variables. E.g.

  $ mpiexec -E var content ...

may be used to propagate the variable var to all processes. Refer to mpiexec(1) for more details.

For a complete list of environment variables automatically exported by ParaStation MPI, refer to ps_environment(7).