簡體   English   中英

如何在兩個 VM 上運行 Open MPI 作業?

[英]How do I run Open MPI jobs on two VMs?

我正在嘗試在我計算機上的兩個 Ubuntu 虛擬機上運行hello_ompi程序。 該程序可在此處找到。

VM 有兩個處理器,每個處理器一個內核。 安裝的操作系統是 Ubuntu 20.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
--------------------------------------------------------------------------

我意識到可執行文件需要位於與主機節點相同的目錄中。 即,如果在主機節點上可執行文件的路徑是:

/home/youruser/somedir/executable.c

然后在主機文件中的所有機器上,可執行文件必須位於這些機器上的完全相同的目錄中。

一旦我更正了這個命令,命令就完美地運行了。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM