【发布时间】:2021-01-11 11:46:33
【问题描述】:
我正在使用 OpenMP 运行 MPI,我发现使用此命令,即使 OpenMP 启动了我定义的线程号,它们都坚持一个 CPU 内核。
export OMP_NUM_THREADS=8
export OMP_PLACES=cores
export OMP_PROC_BIND=true
mpirun --host n1,n2,n3,n4 -np 4 a.out # the threads all stick to one core at each node
mpirun --host n1,n2,n3,n4 -np 4 grep Cpus_allowed_list /proc/self/status
Cpus_allowed_list: 0
Cpus_allowed_list: 0
Cpus_allowed_list: 0
Cpus_allowed_list: 0
【问题讨论】: