我试图在我的计算机上的两个Ubuntu虚拟机上运行hello_ompi程序。这个程序可以找到这里。
VM有两个处理器,每个处理器有一个核心。安装的操作系统是Ubuntu20.04.3-LTS 64位。
我使用的主机文件如下:
192.168.xxx.xxx
192.168.xxx.xxx我试过:
mpirun -n 2 --hostfile my_hostfile hello_ompi其结果是:
--------------------------------------------------------------------------
mpirun was unable to find the specified executable file, and therefore
did not launch the job. This error was first reported for process
rank 0; it may have occurred for other processes as well.
NOTE: A common cause for this error is misspelling a mpirun command
line parameter option (remember that mpirun interprets the first
unrecognized command line token as the executable).
Node: 192.168.xxx.xxx
Executable: hello_ompi
--------------------------------------------------------------------------发布于 2022-04-13 14:41:16
我意识到,可执行文件需要位于与主机节点相同的目录中。也就是说,如果在主机节点上,可执行文件的路径是:
/home/youruser/somedir/executable.c然后,在主机文件中的所有机器上,可执行文件必须位于这些机器上的完全相同的目录中。
一旦我更正了这个命令,这个命令就能完美地运行。
https://stackoverflow.com/questions/71858314
复制相似问题