登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 JHONG 于 2016-11-15 09:15 编辑
花了很长时间终于成功把MPICH3.2装上了,为了让大家少走弯路,现在把安装过程中可能遇到的问题及解决方案汇总出来,供参考~
众所周知,linux下源码安装通常如下三步走:./configure --> make --> make install 就OK了,然而,这期间可能并不那么顺利,有时总会遇到各种各样的问题,比如环境依赖问题,比如编译器的选择问题,等等。
软件的下载(windows下):http://www.mpich.org/downloads/ 将软件使用xftp上传到服务器并解压
编译:./configure --prefix=(指定安装路径),这时遇到问题:
----------------------------------------------------------------------------------------------------------------------------
configure: error:Fortran 90 support requires compatible Fortran 77 support.To force the use of the Fortran 90 compiler for Fortran 77, do not use configure option --disable-f77, and set the environment variable F77 to the name of the Fortran 90 compiler, or $FC. If you do not want any Fortran support, use configure options --disable-f77 and --disable-fc.
----------------------------------------------------------------------------------------------------------------------------
接着就是进行make了,以为编译成功了后面就比较顺利了,结果make也出问题了: ---------------------------------------------------------------------------------------------------------------------------- [h****@inode1mpich-3.2]$ make CDPATH="${ZSH_VERSION+.}:"&& cd . && /bin/sh/home/software/MPICH/mpich-3.2/mpich-3.2/confdb/missing aclocal-1.15 -Iconfdb /home/software/MPICH/mpich-3.2/mpich-3.2/confdb/missing:line 81: aclocal-1.15: command not found WARNING: 'aclocal-1.15'is missing on your system. You should only need it if youmodified 'acinclude.m4' or 'configure.ac' or m4 files included by'configure.ac'. The 'aclocal' program is part of theGNU Automake package: It also requires GNU Autoconf, GNU m4and Perl in order to run: make: *** [aclocal.m4] Error 127 ---------------------------------------------------------------------------------------------------------------------------- 然后从网上找到如下解决方案: ---------------------------------------------------------------------------------------------------------------------------- Often, you don'tneed any auto* tools and the simplest solution is to simply run touch aclocal.m4 configure inthe relevant folder (and also run touch on Makefile.am and Makefile.in if they exist). This willupdate the timestamp of aclocal.m4 and remind the system that aclocal.m4 isup-to-date and doesn't need to be rebuilt. After this, it's probably best toempty your build directory and rerun configure from scratchafter doing this. I run into this problem regularly. For me, the root cause isthat I copy a library (e.g. mpfr code for gcc) from anotherfolder and the timestamps change. Of course, thistrick isn't valid if you really do need to regenerate those files, perhapsbecause you have manually changed them. But hopefully the developers of thepackage distribute up-to-date files. ---------------------------------------------------------------------------------------------------------------------------- 于是根据所讲的,分别输入执行touchaclocal.m4 configure、 touch Makefile.am 和 touchMakefile.in后,使用语句./configure CC=gcc F77=gfortran FC=gfortran--prefix=/home/h***/usr/mpich/ --with-pm=hydra --enable-g=all --disable-cxx重新编译,成功,之后make时出现如下错误: ---------------------------------------------------------------------------------------------------------------------------- [h****@inode1mpich-3.1]$ make ( cd . &&rm -f .err unusederr.txt ; rm -rf .tmp ) ( cd . && \ ./maint/extracterrmsgs -careful=unusederr.txt \ -skip=src/util/multichannel/mpi.c \ `cat maint/errmsgdirs` > .tmp 2>.err ) make: *** [src/mpi/errhan/defmsg.h] Error 126 ---------------------------------------------------------------------------------------------------------------------------- 然后从网上搜索到如下解决方案: ---------------------------------------------------------------------------------------------------------------------------- When I intended to run the make command you gave to me, I found that make clean didn't work. So I remove the entire directory, and re-decompress the tarball. This time the make can successfully pass.----------------------------------------------------------------------------------------------------------------------------
删除整个MPICH3.2并重新解压一个,分别输入执行touch aclocal.m4configure、 touch Makefile.am 和 touch Makefile.in后,使用语句./configureCC=gcc F77=gfortran FC=gfortran --prefix=/home/h****/usr/mpich/--with-pm=hydra --enable-g=all --disable-cxx重新编译,成功,之后make,成功,make install,成功!!!
主要是修改path,为path添加mpi的bin目录: vi .bashrc 在.bashrc文件的末尾添加:export PATH=/usr/……/mpich/bin:$PATH 之后source .bashrc which mpiexec,查看命令是否是我们安装目录下的命令
-- Over --
|