Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Michael_C_13
Beginner
684 Views

Environment variables defined by intel mpirun?

Jump to solution

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
684 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

4 Replies
James_T_Intel
Moderator
684 Views

The environment variables you want are PMI_RANK and PMI_SIZE.

Michael_C_13
Beginner
684 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

James_T_Intel
Moderator
685 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

Michael_C_13
Beginner
684 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.

Reply