python - 在Red Hat Enterprise Linux Server版本6.10(圣地亚哥)上构建MultiNest时,安装失败

标签 python cmake compiler-errors fortran mpi

在按照安装说明安装PyMultiNest的过程中,我遇到了障碍。这是我遵循的步骤顺序,但是在构建库(步骤2)时失败了,并且出现了以下错误:

(envsam) [user@comp-ic-0018 build]$ module unload   
(envsam) [user@comp-ic-0018 build]$ module load gcc/7.3.1
(envsam) [user@comp-ic-0018 build]$ module load mkl 
(envsam) [user@comp-ic-0018 build]$ module load openmpi 
(envsam) [user@comp-ic-0018 build]$ pip install mpi4py 
Collecting mpi4py
Installing collected packages: mpi4py
Successfully installed mpi4py-3.0.3
You are using pip version 9.0.1, however version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(envsam) [user@comp-ic-0018 build]$ cmake ..
-- A library with BLAS API found.
-- A library with LAPACK API found.
-- Detected gfortran, adding -ffree-line-length-none compiler flag.
-- Configuring done
-- Generating done
-- Build files have been written to: /storage/home/user/work/MultiNest/build
(envsam) [user@comp-ic-0018 build]$ make
[  1%] Building Fortran object src/CMakeFiles/multinest_mpi_shared.dir/utils.f90.o
[  3%] Building Fortran object src/CMakeFiles/multinest_mpi_shared.dir/utils1.f90.o
[  5%] Building Fortran object src/CMakeFiles/multinest_mpi_shared.dir/kmeans_clstr.f90.o
[  6%] Building Fortran object src/CMakeFiles/multinest_mpi_shared.dir/xmeans_clstr.f90.o
[  8%] Building Fortran object src/CMakeFiles/multinest_mpi_shared.dir/posterior.F90.o
[ 10%] Building Fortran object src/CMakeFiles/multinest_mpi_shared.dir/priors.f90.o
[ 12%] Building Fortran object src/CMakeFiles/multinest_mpi_shared.dir/nested.F90.o
mpif-sizeof.h:18.48:
    Included at mpif.h:61:
    Included at /storage/home/user/work/MultiNest/src/nested.F90:14:

        USE, INTRINSIC :: iso_fortran_env, ONLY: REAL128
                                                1
Error: Symbol 'real128' referenced at (1) does not exist in intrinsic module ISO_FORTRAN_ENV
mpif-sizeof.h:19.14:
    Included at mpif.h:61:
    Included at /storage/home/user/work/MultiNest/src/nested.F90:14:

      COMPLEX(REAL128)::x
              1
Error: Parameter 'real128' at (1) has not been declared or is a variable, which does not reduce to a constant expression
mpif-sizeof.h:25.48:
    Included at mpif.h:61:
    Included at /storage/home/user/work/MultiNest/src/nested.F90:14:

        USE, INTRINSIC :: iso_fortran_env, ONLY: REAL128
                                                1
Error: Symbol 'real128' referenced at (1) does not exist in intrinsic module ISO_FORTRAN_ENV
mpif-sizeof.h:26.14:
    Included at mpif.h:61:
    Included at /storage/home/user/work/MultiNest/src/nested.F90:14:

      COMPLEX(REAL128), DIMENSION(*)::x
              1
Error: Parameter 'real128' at (1) has not been declared or is a variable, which does not reduce to a constant expression
mpif-sizeof.h:32.48:
    Included at mpif.h:61:
    Included at /storage/home/user/work/MultiNest/src/nested.F90:14:

        USE, INTRINSIC :: iso_fortran_env, ONLY: REAL128
                                                1

....
Error: Symbol 'real32' referenced at (1) does not exist in intrinsic module ISO_FORTRAN_ENV
Fatal Error: Error count reached limit of 25.
make[3]: *** [src/CMakeFiles/multinest_mpi_shared.dir/build.make:149: src/CMakeFiles/multinest_mpi_shared.dir/nested.F90.o] Error 1
make[2]: *** [src/CMakeFiles/multinest_mpi_shared.dir/build.make:155: src/CMakeFiles/multinest_mpi_shared.dir/nested.F90.o.provides] Error 2
make[1]: *** [CMakeFiles/Makefile2:108: src/CMakeFiles/multinest_mpi_shared.dir/all] Error 2
make: *** [Makefile:117: all] Error 2

这个post建议使用gfortran 6或7。我在做同样的事情,但仍然遇到错误。

寻求帮助以解决此问题。

最佳答案

按照作者here的建议清除build/文件夹即可解决此问题。

关于python - 在Red Hat Enterprise Linux Server版本6.10(圣地亚哥)上构建MultiNest时,安装失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60841741/

相关文章:

c++ - 无法从基类 C++ 访问变量

c++ - 成员函数 'select' 的“this”参数具有类型 'const SelectParam' ,但函数未标记为 const

python - MySQLdb安装问题

python - 如何在 Windows 版 Git Bash 中启用 Python 上次命令历史记录?

python - 执行 re.findall 后查找正则表达式模式

c++ - CMake - 每次构建项目时如何停止构建每个依赖项

cmake - 从 cmake 构建中删除特定文件

c++ - CLion,MinGW和SDL2:进程结束,退出代码为-1073741515(0xC0000135)

angular - index.ts 不是编译输出的一部分

python - 使用pyqt webview渲染pdf