【问题标题】:Installation fails when building MultiNest on Red Hat Enterprise Linux Server release 6.10 (Santiago)在 Red Hat Enterprise Linux Server 版本 6.10 (Santiago) 上构建 MultiNest 时安装失败
【发布时间】:2020-07-05 13:54:47
【问题描述】:

在按照设置说明安装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。我也在这样做,但仍然遇到错误。

寻求帮助以解决此问题。

【问题讨论】:

  • 您的问题应该是独立的(例如,没有指向 pastebin 的链接)。作为一般规则,您应该包含第一个错误而不是最后一个错误。
  • 感谢您的建议。我已相应地对其进行了编辑。

标签: python cmake compiler-errors fortran mpi


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2013-10-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多