如何在群集上运行mpi?

时间:2015-07-20 05:47:36

标签: c++ mpi cluster-computing

my_hostfile.txt是:

node1 slots=12 max-slots=12
node2 slots=12 max-slots=12
node3 slots=12 max-slots=12
node4 slots=12 max-slots=12

为了运行程序,我使用了这个命令:

mpirun --hostfile my_hostfile.txt -pernode -n 48 ./run_mpi 13-4 -l 13 -d 4

结果:

--------------------------------------------------------------------------
Open RTE detected a parse error in the hostfile:
    my_hostfile.txt
It occured on line number 1 on token 1.
--------------------------------------------------------------------------
[node4:30641] [0,0,0] ORTE_ERROR_LOG: Error in file rmgr_urm.c at line 358
[node4:30641] mpirun: spawn failed with errno=-1

我该怎么办?

1 个答案:

答案 0 :(得分:0)

就我而言,这是因为我通过 VSCode 在 Windows 中编辑主机文件,并且行尾默认为 CRLF。切换到 LF 问题就解决了。