configure时出现错误如下
checking mpi.h usability... no
checking mpi.h presence... no
checking for mpi.h... no
checking for MPI_Init in -lmpi... no
问题在于abyss需要同时指定lib和include文件夹,而这两个文件夹分散在不同的目录,且--with-mpi只能用一次,所以要将这两个文件夹合到一起。解决方法如下:
首先,安装openmpi-devel:
yum install openmpi-devel
其次,将复制一份include文件到openmpi主目录下:
cp -r /usr/include/openmpi-x86_64/ /usr/lib64/openmpi/include
最后,在configure后要加上--with-mpi=/usr/lib64/openmpi/:
./configure --prefix=/home/share/software/abyss/abyss-1.5.2-build --enable-maxk=96 --with-mpi=/usr/lib64/openmpi/
make; make install
当然,运行时,如果出现错误如下:
/home/share/software/abyss/abyss-1.5.2-build/bin/ABYSS-P: error while loading shared libraries: libmpi.so.1: cannot open shared object file: No such file or directory
需要手动加载一下库的路径:
export PATH=$PATH:/usr/lib64/openmpi/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64/openmpi/lib
或者:
module load mpi/openmpi-x86_64 ,用 module avail mpi 来看是否加载成功