我一直在尝试将一些现有进程转移到一个经过改进的linux集群中,该集群现在运行在slurm上。我以为我已经完成了,但我现在的问题是让多个内核运行。
这是我的投稿。
#!/bin/bash
#
#SBATCH --job-name=test_mpi
#SBATCH --output=res_mpi.txt
#
#SBATCH -n 4
#SBATCH --time=10:00
srun mkdir -p /tmp/tedhyu/new
srun cp Ru13.in /tmp/tedhyu/new/lcao.in
srun cp ~tedhyu/atom_pbe/* /tmp/tedhyu/new
srun cd /tmp/tedhyu/new
srun -N 1 -n 4 --chdir=/tmp/tedhyu/new mpiexec ~tedhyu/bin/origin1_centos6.4_mpich2_quest_265c.x当我"qstat -n“时,它只显示一个核心:
作业id用户名队列名SessID NDS TSK内存时间使用S时间
11778 tedhyu原子test_mpi -- 14- 00:10 C 00:00节点3-5/4
下面是我输出的前几行,显示只有一个核心在运行:
srun: error: node3-5: tasks 0-3: Exited with exit code 1
MPINFO::: Global Communicator :::
MPINFO::: Global Context = **** :::
MPINFO::: Global Size = 1 :::
MPINFO::: Global Root = 0 :::
MPINFO::: Global Rank = 0 :::
DEV: VDW development version全球大小应等于4
如果有人能指出正确的方向..。谢谢!
发布于 2021-02-14 10:06:32
不要在脚本的最后一行使用srun。只需使用mpirun或mpiexec启动可执行文件即可。
srun所做的:它启动命令的$SLURM_NTASKS实例(每个保留的CPU核心一个)。您不希望这样,您希望mpiexec将任务生成到CPU。你的最后一行可以是
mpirun -np $SLURM_NTASKS ./myexecutable.exe
https://unix.stackexchange.com/questions/630676
复制相似问题