Intel® MPI Library
Get help with building, analyzing, optimizing, and scaling high-performance computing (HPC) applications.
2154 Discussions

Environment variables defined by intel mpirun?

Michael_C_13
Beginner
2,427 Views

Hello Forum Gurus,

Where can I find a list of environment variables defined by Intel mpirun that contain the rank and process information, analogous to OMP_COMM_WORLD_SIZE, OMP_COMM_WORLD_RANK, etc. shown here:  https://www.open-mpi.org/faq/?category=running#mpi-environmental-variables?  Does Intel MPI even provide this functionality?  I can't seem to find anything similar in the hydra documentation (https://software.intel.com/en-us/mpi-developer-reference-linux).

Thanks in advance for your help!

0 Kudos
1 Solution
James_T_Intel
Moderator
2,427 Views

We don't provide a documented list of the environment variables set at runtime.  If you want to see what is set for any given job, you can use I_MPI_HYDRA_DEBUG=1, but this will generate a lot of output.  Alternatively, you can just run a script to show your environment at launch.

We do not have an equivalent for OMPI_COMM_WORLD_LOCAL_RANK.

View solution in original post

0 Kudos
4 Replies
James_T_Intel
Moderator
2,427 Views

The environment variables you want are PMI_RANK and PMI_SIZE.

0 Kudos
Michael_C_13
Beginner
2,427 Views

Hi James,

Thanks very much!  Those are helpful but merely examples:  for future reference, I was hoping you could point me to a complete list.  For example, it may also be helpful for me to know each process' local rank, like OMPI_COMM_WORLD_LOCAL_RANK.

Searching the Hydra documentation for PMI_RANK does not reveal such a list, nor does the output of mpirun -help, nor does a cursory google for PMI_RANK or PMI_SIZE.  I'm surprised this information is not more readily available...

Much appreciated,

Michael

0 Kudos
James_T_Intel
Moderator
2,428 Views

We don't provide a documented list of the environment variables set at runtime.  If you want to see what is set for any given job, you can use I_MPI_HYDRA_DEBUG=1, but this will generate a lot of output.  Alternatively, you can just run a script to show your environment at launch.

We do not have an equivalent for OMPI_COMM_WORLD_LOCAL_RANK.

0 Kudos
Michael_C_13
Beginner
2,427 Views

Understood, thanks.  "mpirun -np 1 printenv" turned up PMI_RANK, PMI_FD, and PMI_SIZE.  I think RANK and SIZE will be enough to get me off the ground.

0 Kudos
Reply