更改OpenMPI可以“看到”的内核数量

我正在运行一个调用mpirun的可执行文件(我没有访问源代码的权限)。我得到以下错误,如果请求的内核比CPU上可用的内核多,这是很常见的:

There are not enough slots available in the system to satisfy the 12
slots that were requested by the application:

  /Users/me/Library/app/executable

Either request fewer slots for your application, or make more slots
available for use.

A "slot" is the Open MPI term for an allocatable unit where we can
launch a process.  The number of slots available are defined by the
environment in which Open MPI processes are run:

  1. Hostfile, via "slots=N" clauses (N defaults to number of
     processor cores if not provided)
  2. The --host command line parameter, via a ":N" suffix on the
     hostname (N defaults to 1 if not provided)
  3. Resource manager (e.g., SLURM, PBS/Torque, LSF, etc.)
  4. If none of a hostfile, the --host command line parameter, or an
     RM is present, Open MPI defaults to the number of processor cores

In all the above cases, if you want Open MPI to default to the number
of hardware threads instead of the number of processor cores, use the
--use-hwthread-cpus option.

Alternatively, you can use the --oversubscribe option to ignore the
number of available slots when deciding the number of processes to
launch.

我的问题是,我不能使用--oversubscribe来更改mpirun的命令行选项。相反,我需要更改OpenMPI“看到”的默认内核数。(否则这将是一个简单的修复,就像在this case中一样)

有没有环境变量或者我可以更新的东西来诱使openMPI工作?

转载请注明出处:http://www.nali5.com/article/20230509/1470864.html