我在Slurm集群上运行一个可以从并行处理中获益的脚本,所以我尝试实现MPI。但是,它似乎不允许我在多个节点上运行进程。我不知道这是否通常是自动完成的,但是每当我在提交的批处理文件中设置--nodes=2时,我都会收到错误消息,“警告:无法在2个节点上运行1个进程,将nnodes设置为1。”
我一直试图让它与一个简单的helloworld脚本一起工作,但是仍然遇到了上面的错误。我在运行MPI脚本时向选项添加了--oversubscribe,但是仍然得到这个错误。在
#SBATCH --job-name=a_test
#SBATCH --mail-type=ALL
#SBATCH --ntasks=1
#SBATCH --cpu-freq=high
#SBATCH --nodes=2
#SBATCH --cpus-per-task=2
#SBATCH --mem-per-cpu=1gb
#SBATCH --mem-bind=verbose,local
#SBATCH --time=01:00:00
#SBATCH --output=out_%x.log
module load python/3.6.2
mpirun -np 4 --oversubscribe python par_PyScript2.py
```bash
I still get the expected output, but only after the error message "Warning: can't run 1 processes on 2 nodes, setting nnodes to 1." I'm worried that without being able to run on multiple nodes, my actual script will be a lot slower.
发出警告的原因如下:
其中指定只运行1个mpi进程,就在请求2个节点之前。在
^{} 设置要运行的进程数/要在案例中使用的列组数。然后用一个等价的
-n
覆盖它,这就是为什么要看到结果。在作为参考,这是我在系统上运行的脚本
^{pr2}$性能说明:
-c
和{相关问题 更多 >
编程相关推荐