在我输入之后
sudo apt-get install mpich2
mpich 已安装,但第一个问题是我不知道文件安装在哪里。另一方面,当我写的时候
mpirun -np 3 ./hello.o
它给了我:
mpiexec_hani-laptop: cannot connect to local mpd (/tmp/mpd2.console_hani); 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.
谁能帮忙。
最佳答案
可能是因为 mpd(多用途守护进程)没有像它说的那样运行。 “Hydra”是另一个广泛使用的并行进程管理系统。 试试这个:
mpd &
或者这个:
mpiexec.hydra -np 3 ./hello.o
这些守护进程用于将进程调度到所需的核心。 注意:运行上述命令一次后,mpirun 似乎也可以正常工作。
关于linux - 为什么 MPI 给出运行时错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1670235/