diff --git a/MPI/amrex/build b/MPI/amrex/build index 2f13ce7..5c04f24 100755 --- a/MPI/amrex/build +++ b/MPI/amrex/build @@ -9,6 +9,12 @@ pbuild::install_docfiles 'INSTALL' pbuild::install_docfiles 'license.txt' pbuild::install_docfiles 'README.txt' +pbuild::pre_prep() { + echo "OPENMPI_VERSION=${OPENMPI_VEERSION}" 1>&2 + if pbuild::version_gt "${OPENMPI_VERSION}" '4.0.0'; then + pbuild::add_patch "files/AMReX_ParallelDescriptor.patch" + fi +} pbuild::pre_configure() { pbuild::use_cmake @@ -16,6 +22,13 @@ pbuild::pre_configure() { pbuild::use_flag "2d" && DIM=2 pbuild::use_flag "3d" && DIM=3 + if pbuild::version_lt "${OPENMPI_VERSION}" '4.0.0'; then + FORTRAN_INTERFACES='ON' + ENABLE_FBASELIB='ON' + else + FORTRAN_INTERFACES='OFF' + ENABLE_FBASELIB='OFF' + fi pbuild::add_configure_args "CC=${MPICC}" pbuild::add_configure_args "CXX=${MPICXX}" pbuild::add_configure_args "FC=${MPIF90}" @@ -29,8 +42,8 @@ pbuild::pre_configure() { pbuild::add_configure_args "-DENABLE_OMP=${OPENMP}" pbuild::add_configure_args "-DENABLE_DP=1" pbuild::add_configure_args "-DENABLE_EB=OFF" - pbuild::add_configure_args "-DENABLE_FORTRAN_INTERFACES=ON" - pbuild::add_configure_args "-DENABLE_FBASELIB=1" + pbuild::add_configure_args "-DENABLE_FORTRAN_INTERFACES=${FORTRAN_INTERFACES}" + pbuild::add_configure_args "-DENABLE_FBASELIB=${ENABLE_FBASELIB}" pbuild::add_configure_args "-DENABLE_AMRDATA=OFF" pbuild::add_configure_args "-DENABLE_DP_PARTICLES=1" pbuild::add_configure_args "-DENABLE_FPE=0" diff --git a/MPI/amrex/files/variants.merlin6 b/MPI/amrex/files/variants.merlin6 index fe3ecdc..5f4cdb0 100644 --- a/MPI/amrex/files/variants.merlin6 +++ b/MPI/amrex/files/variants.merlin6 @@ -1,2 +1,3 @@ amrex/18.07_3d_slurm stable gcc/{7.5.0,8.4.0,9.3.0} openmpi/3.1.6_slurm b:cmake/3.15.5 +amrex/18.07_3d_slurm stable gcc/10.3.0 openmpi/4.0.5-1_slurm b:cmake/3.20.5 diff --git a/MPI/amrex/files/variants.rhel6 b/MPI/amrex/files/variants.rhel6 index 2a03d97..5d5369b 100644 --- a/MPI/amrex/files/variants.rhel6 +++ b/MPI/amrex/files/variants.rhel6 @@ -14,5 +14,6 @@ amrex/18.07_3d deprecated gcc/8.2.0 openmpi/{1.10.7,2.1.5,3.1.3} b:cmake/3.9.6 amrex/18.07_3d stable gcc/{7.3.0,8.2.0} mpich/3.2.1 b:cmake/3.9.6 -amrex/18.07_3d stable gcc/{7.5.0,8.4.0,9.3.0} openmpi/3.1.6 b:cmake/3.15.5 +amrex/18.07_3d stable gcc/{7.5.0,8.4.0,9.3.0,10.3.0} openmpi/3.1.6 b:cmake/3.15.5 +amrex/18.07_3d stable gcc/{7.5.0,8.4.0,9.3.0,10.3.0} openmpi/4.0.5 b:cmake/3.15.5