OpenMPI的程序运行必须保持相同的目录,默认情况下,MPI的分布式节点会去~/user目录下面寻找运行的程序,如果找不到该程序,则会报出
--------------------------------------------------------------------------
mpiexec was unable to launch the specified application as it could not
change to the specified working directory:
Working directory: /home/norse/WorkSpace/uestc-careye/cmake-build-debug/bin
Node: node1-ubuntu
while attempting to start process rank 10.
--------------------------------------------------------------------------
上述错误,所以必须保证运行目录一致,通过下列命令切换运行目录
mpiexec --wdir ~/WorkSpace/uestc-careye/cmake-build-debug/bin -hostfile ./hosts-list -np 3 rc_mpi_test
其他指令请移步