On Oct 31, 2008, at 4:52 PM, Gilbert Grosdidier wrote:

To monitor the environment from inside the application, it could be useful to issue a 'system("printenv")' call at the very beginning of the main program, even before (and after, btw) the MPI_Init call, when running in serial job mode
with a single CAB, using mpirun.

Note that it may not be safe to call system(), depending on your environment. It might be better to getenv() to look for the specific environment variable that you're looking for, or loop over environ to show the entire environment.

You can also use the -x option to mpirun to export a specific environment variable to all the MPI processes. If you're using the rsh/ssh launcher, OMPI won't automatically export mpirun's entire environment to the MPI processes.

--
Jeff Squyres
Cisco Systems

Reply via email to