我正在尝试构建一个在特定时间以批处理模式运行 mpi 作业的脚本。如果我在控制台 mpdallexit
、mpdboot
和 mpirun
中运行,一切都会正常工作,并且并行作业会在 mpd.hosts 中的所有节点上启动。但是,如果我尝试从 bash 脚本运行(现在与 at 脚本一起发送 +1 分钟),mpd 就会崩溃并且不会启动任何作业。
这是脚本中的相关行
$path_mpi/mpdallexit
$path_mpi/mpdboot -n 5 &
time $path_mpi/mpirun -n 21 ./rams60 -f RAMSIN.operatiu
$path_mpi/mpdallexit
以及日志中的错误消息
mpiexec_ventus: cannot connect to local mpd (/tmp/mpd2.console_meteo); possible causes:
1. no mpd is running on this host
2. an mpd is running but was started without a "console" (-n option)
In case 1, you can start an mpd on this host with:
mpd &
and you will be able to run jobs just on this host.
For more details on starting mpds on a set of hosts, see
the MPICH2 Installation Guide.
我尝试了 mpdboot 的不同选项
--loccons says you do not want a console available on local mpd(s)
--remcons says you do not want consoles available on remote mpd(s)
或
mpdboot -n 5 &
但没有成功
Mpich 安装在/usr/local/mpich2-1.0.5p4/
编辑1:
在尝试了 @shellter 关于 sleep 的建议后,我无法运行并行作业,at
也无法运行 cron
。发出批处理 mpirun
作业时,某些进程在主节点上启动,但不在其他集群节点中启动:
在主节点
ps -ef | grep rams meteo 28043 26837 0 Apr21 ? 00:00:00 time /usr/bin/mpirun -n 50 -f machinefile ./rams60 -f RAMSIN.operatiu meteo 28044 28043 0 Apr21 ? 00:00:00 /usr/bin/mpirun -n 50 -f machinefile ./rams60 -f RAMSIN.operatiu meteo 28050 28045 0 Apr21 ? 00:00:00 ./rams60 -f RAMSIN.operatiu meteo 28051 28045 0 Apr21 ? 00:00:00 ./rams60 -f RAMSIN.operatiu meteo 28052 28045 0 Apr21 ? 00:00:00 ./rams60 -f RAMSIN.operatiu meteo 28053 28045 0 Apr21 ? 00:00:00 ./rams60 -f RAMSIN.operatiu meteo 28054 28045 0 Apr21 ? 00:00:00 ./rams60 -f RAMSIN.operatiu meteo 28055 28045 0 Apr21 ? 00:00:00 ./rams60 -f RAMSIN.operatiu meteo 28056 28045 0 Apr21 ? 00:00:00 ./rams60 -f RAMSIN.operatiu meteo 28057 28045 0 Apr21 ? 00:00:00 ./rams60 -f RAMSIN.operatiu meteo 28058 28045 0 Apr21 ? 00:00:00 ./rams60 -f RAMSIN.operatiu meteo 28059 28045 0 Apr21 ? 00:00:00 ./rams60 -f RAMSIN.operatiu meteo 28060 28045 0 Apr21 ? 00:00:00 ./rams60 -f RAMSIN.operatiu meteo 28061 28045 0 Apr21 ? 00:00:00 ./rams60 -f RAMSIN.operatiu
此外,rams60 不会创建任何输出文件,而它所做的第一件事就是编写启动分析文件。
如果我在命令行中执行脚本,一切都会正常运行,但在批处理中,mpich 似乎无法与节点通信。
首先我在主节点安装了mpich2,并将NFS导出到其他节点。现在我已经在每个节点上安装了mpich2。
谢谢
提前致谢
最佳答案
错误信息非常清楚:
mpiexec_ventus: cannot connect to local mpd (/tmp/mpd2.console_meteo); possible causes:
1. no mpd is running on this host
2. an mpd is running but was started without a "console" (-n option)
我假设您正在运行 mpd,因此...检查其 -n
选项。
关于bash - 从 bash 脚本运行 mpi 作业,批处理模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23107758/