Developer Guide

Developer Guide for Intel® oneAPI Math Kernel Library Linux*

ID 766690
Date 12/16/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Setting Environment Variables on a Cluster

By default, when you call the MPI launch command mpiexec, the entire launching node environment is passed to the MPI processes. However, if there are undefined variables or variables that are different from what is stored in your environment, you can use -env or -genv options with mpiexec. Each of these options take two arguments- the name and the value of the environment variable to be passed.

-genv NAME1 VALUE1 -genv NAME2 VALUE2

-env NAME VALUE -genv

See these Intel MPI examples on how to set the value of OMP_NUM_THREADS explicitly:

mpiexec -genv OMP_NUM_THREADS 2 ....

mpiexec -n 1 -host first -env OMP_NUM_THREADS 2 test.exe : -n 2 -host second -env OMP_NUM_THREADS 3 test.exe ....

See these Intel MPI examples on how to set the value of MKL_BLACS_MPI explicitly:

mpiexec -genv MKL_BLACS_MPI INTELMPI ....

mpiexec -n 1 -host first -env MKL_BLACS_MPI INTELMPI test.exe : -n 1 -host second -env MKL_BLACS_MPI INTELMPI test.exe.