作为这问题的后续,我开始从源头构建MPICH2。我找到了这个教程:在一台机器上安装MPICH2,到目前为止我所做的是:
./configure --disable-f77 --disable-fc --disable-fortran
[seems to be OK]
make; sudo make install
[long output with one warning]
libtool: warning: relinking 'lib/libmpicxx.la'
root@pythagoras:/home/gsamaras/mpich-3.1.4# mpich2version
bash: mpich2version: command not found我做错了什么?注意,我首先用apt-get安装了MPICH2,为了删除它,我安装了:
apt-get remove --purge mpich2
apt-get autoremove // which might removed something that I need now明天,我将尝试如下:获取和建立MPICH (第一次尝试在autogen.sh部分中失败)。
EDIT_1
我无法让它发挥作用,我将尝试两个教程的组合,并报告回来。我做了一个配置,然后另一个教程中的make也失败了。
EDIT_2
这可能会遮住一些关于它的安装位置的光线(通过遵循第一个教程):
root@pythagoras:/home/gsamaras/mpich-3.1.4# which mpiexec
/usr/local/bin/mpiexec
root@pythagoras:/home/gsamaras/mpich-3.1.4# which mpirun
/usr/local/bin/mpirun发布于 2015-06-10 17:45:23
您安装到/usr/local中,这是一种可以执行的方法。您所遵循的自述指令提出了另一种不需要管理特权的方法。
我喜欢安装到/home/robl/soft/mpich中,所以我可以拥有不同的编译器、版本、配置等等,这样的灵活性对您来说可能有点过分,但这是一种策略。
关于你的问题:
root@pythagoras:/home/gsamaras/mpich-3.1.4# mpich2version
bash: mpich2version: command not found首先,命令现在是mpichversion,而不是mpich2version --您可能是在学习一个旧教程。
其次,您的shell可能不知道新安装的二进制文件。hash -r (至少在bash和tcsh上)将告诉shell“忘记您认为您知道的关于我的文件系统的内容,并更仔细地查找”。
发布于 2015-06-06 15:20:57
我找到了这个mpich-3.0.4-README,他似乎提供了解决方案。
长话短说,它说(假设您想构建3.0.4版本,我使用3.1.4 (可用的这里)):
tar xzf mpich-3.0.4.tar.gz
cd mpich-3.0.4
// you might want to disable fortran compiler (see the README I linked above)
./configure --prefix=/home/<USERNAME>/mpich-install 2>&1 | tee c.txt
make 2>&1 | tee m.txt
make install 2>&1 | tee mi.txt
PATH=/home/<USERNAME>/mpich-install/bin:$PATH ; export PATH
which mpicc
// should return something reasonable (with your directory)
mpiexec -n 2 ./examples/cpi现在,带有机器文件的选项不起作用,因为ssh需要密码,但这是另一个问题。
https://stackoverflow.com/questions/30666741
复制相似问题