Openmpi安装

Openmpi安装

由于学术原因,我刚刚开始使用 Linux Mint,在尝试安装 openmpi-2.0.1 时遇到了错误。当我尝试进行检查时出现以下错误

    make[4]: Leaving directory `/home/kuljeet/Downloads/openmpi-2.0.1/ompi/debuggers'
make[3]: Leaving directory `/home/kuljeet/Downloads/openmpi-2.0.1/ompi/debuggers'
make[2]: Leaving directory `/home/kuljeet/Downloads/openmpi-2.0.1/ompi/debuggers'
Making check in etc
make[2]: Entering directory `/home/kuljeet/Downloads/openmpi-2.0.1/ompi/etc'
make[2]: Nothing to be done for `check'.
make[2]: Leaving directory `/home/kuljeet/Downloads/openmpi-2.0.1/ompi/etc'
Making check in mpi/c
make[2]: Entering directory `/home/kuljeet/Downloads/openmpi-2.0.1/ompi/mpi/c'
Making check in profile
make[3]: Entering directory `/home/kuljeet/Downloads/openmpi-2.0.1/ompi/mpi/c/profile'
  CC       pstatus_c2f.lo
rm: cannot remove '.libs/pstatus_c2f.o': Permission denied
Assembler messages:
Fatal error: can't create .libs/pstatus_c2f.o: Permission denied
make[3]: *** [pstatus_c2f.lo] Error 1
make[3]: Leaving directory `/home/kuljeet/Downloads/openmpi-2.0.1/ompi/mpi/c/profile'
make[2]: *** [check-recursive] Error 1
make[2]: Leaving directory `/home/kuljeet/Downloads/openmpi-2.0.1/ompi/mpi/c'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/home/kuljeet/Downloads/openmpi-2.0.1/ompi'
make: *** [check-recursive] Error 1

早些时候我遇到了一个错误

make[3]: Entering directory `/home/thanhnt/openmpi-1.6/ompi/debuggers'
CCLD predefined_gap_test
libtool: link: cannot find the library `../../ompi/libmpi.la' or unhandled argument `../../ompi/libmpi.la'
make[3]: *** [predefined_gap_test] Error 1
make[3]: Leaving directory `/home/thanhnt/openmpi-1.6/ompi/debuggers'
make[2]: *** [check-am] Error 2
make[2]: Leaving directory `/home/thanhnt/openmpi-1.6/ompi/debuggers'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/home/thanhnt/openmpi-1.6/ompi'
make: *** [check-recursive] Error

即使修复了上面的权限错误后,我仍然得到:

libtool:错误:找不到库“../../ompi/libmpi.la”或未处理的参数“../../ompi/libmpi.la”

make[3]: *** [predefined_gap_test] 错误 1

make[3]: 离开目录 /home/kuljeet/Downloads/openmpi-2.0.1/ompi/debuggers' make[2]: *** [check-am]

错误 2 make[2]:离开目录 /home/kuljeet/Downloads/openmpi-2.0.1/ompi/debuggers' make[1]:*** [check-recursive] 错误 1

答案1

你需要编译它icc 英特尔编译器。确保您使用的是最新版本,以便它与您的 gcc 兼容。然后您需要按照以下建议的说明来配置和编译它@liqizuiyang

  1. 将源码复制到$HOME并解压。

    tar -xf openmpi-2.0.1.bz2
    
  2. build您的$HOME.

    mkdir build
    

    “build”目录是 $HOME 的子目录,而不是“openmpi-1.6.4”。 'build' 和 'openmpi-1.6.4' 都是 $HOME 的子目录。

  3. 去构建并设置环境变量。

    cd build
    export CC=icc
    export CXX=icpc
    export FC=ifort
    export F77=ifort
    export CFLAGS=-O2
    export CXXFLAGS=-O2
    export FCFLAGS=-O2
    export FFLAGS=-O2
    
  4. 运行配置。

    ../openmpi-2.0.1/configure --prefix="$HOME/code/openmpi-2.0.1
    
  5. 构建 openmpi.

    make
    
  6. 运行测试套件。

    make check
    
  7. 安装。

    make install
    

以下是构建 Open MPI 的其他一些指南:


另一种解决方法,如建议的常问问题--disable-shared,是通过使用和配置 Open MPI 将 Open MPI 构建为静态库--enable-static。这与 具有相同的效果--disable-dlopen,但它也使libmpi.a(与共享库相反)。


如果您按照官方指南仍然遇到问题,请在 open-mpi 上提出问题,可能存在一些特定于您的 Linux 发行版的问题。

相关内容