diff --git a/scripts/ci/cmake/ci-el8-icc-ompi.cmake b/scripts/ci/cmake/ci-el8-icc-ompi.cmake index c191d79c26..6f8803e44d 100644 --- a/scripts/ci/cmake/ci-el8-icc-ompi.cmake +++ b/scripts/ci/cmake/ci-el8-icc-ompi.cmake @@ -1,7 +1,3 @@ -include(ProcessorCount) -ProcessorCount(NCPUS) -math(EXPR N2CPUS "${NCPUS}*2") - set(ENV{CC} icc) set(ENV{CXX} icpc) set(ENV{FC} ifort) @@ -28,9 +24,6 @@ CMAKE_C_FLAGS:STRING=-Wall -diag-disable=10441 CMAKE_C_FLAGS_DEBUG:STRING=-g -O0 CMAKE_CXX_FLAGS:STRING=-Wall -diag-disable=10441 CMAKE_CXX_FLAGS_DEBUG:STRING=-g -O0 - -MPIEXEC_EXTRA_FLAGS:STRING=--allow-run-as-root --oversubscribe -MPIEXEC_MAX_NUMPROCS:STRING=${N2CPUS} ") set(CTEST_CMAKE_GENERATOR "Unix Makefiles") diff --git a/scripts/ci/cmake/ci-el8-oneapi-ompi.cmake b/scripts/ci/cmake/ci-el8-oneapi-ompi.cmake index 7a637d1888..8a1c5e5fa9 100644 --- a/scripts/ci/cmake/ci-el8-oneapi-ompi.cmake +++ b/scripts/ci/cmake/ci-el8-oneapi-ompi.cmake @@ -1,7 +1,3 @@ -include(ProcessorCount) -ProcessorCount(NCPUS) -math(EXPR N2CPUS "${NCPUS}*2") - set(ENV{CC} icx) set(ENV{CXX} icpx) set(ENV{FC} ifort) # oneapi fortran compiler currently has issues @@ -29,9 +25,6 @@ CMAKE_C_FLAGS_DEBUG:STRING=-g -O0 CMAKE_CXX_FLAGS:STRING=-Wall CMAKE_CXX_FLAGS_DEBUG:STRING=-g -O0 CMAKE_Fortran_FLAGS:STRING=-W1 - -MPIEXEC_EXTRA_FLAGS:STRING=--allow-run-as-root --oversubscribe -MPIEXEC_MAX_NUMPROCS:STRING=${N2CPUS} ") set(CTEST_CMAKE_GENERATOR "Unix Makefiles") diff --git a/scripts/ci/cmake/ci-ubuntu20.04-clang10-ompi.cmake b/scripts/ci/cmake/ci-ubuntu20.04-clang10-ompi.cmake index e62ed9b57a..447c304316 100644 --- a/scripts/ci/cmake/ci-ubuntu20.04-clang10-ompi.cmake +++ b/scripts/ci/cmake/ci-ubuntu20.04-clang10-ompi.cmake @@ -1,7 +1,3 @@ -include(ProcessorCount) -ProcessorCount(NCPUS) -math(EXPR N2CPUS "${NCPUS}*2") - set(ENV{CC} clang-10) set(ENV{CXX} clang++-10) set(ENV{FC} gfortran-11) @@ -35,9 +31,6 @@ CMAKE_CXX_COMPILER_LAUNCHER=ccache CMAKE_C_FLAGS:STRING=-Wall CMAKE_CXX_FLAGS:STRING=-Wall CMAKE_Fortran_FLAGS:STRING=-Wall - -MPIEXEC_EXTRA_FLAGS:STRING=--allow-run-as-root --oversubscribe -MPIEXEC_MAX_NUMPROCS:STRING=${N2CPUS} ") set(CTEST_CMAKE_GENERATOR "Ninja") diff --git a/scripts/ci/cmake/ci-ubuntu20.04-clang6-ompi.cmake b/scripts/ci/cmake/ci-ubuntu20.04-clang6-ompi.cmake index 2bdf2c410d..bfe89a699c 100644 --- a/scripts/ci/cmake/ci-ubuntu20.04-clang6-ompi.cmake +++ b/scripts/ci/cmake/ci-ubuntu20.04-clang6-ompi.cmake @@ -1,7 +1,3 @@ -include(ProcessorCount) -ProcessorCount(NCPUS) -math(EXPR N2CPUS "${NCPUS}*2") - set(ENV{CC} clang-6.0) set(ENV{CXX} clang++-6.0) set(ENV{FC} gfortran-11) @@ -36,9 +32,6 @@ CMAKE_CXX_COMPILER_LAUNCHER=ccache CMAKE_C_FLAGS:STRING=-Wall CMAKE_CXX_FLAGS:STRING=-Wall CMAKE_Fortran_FLAGS:STRING=-Wall - -MPIEXEC_EXTRA_FLAGS:STRING=--allow-run-as-root --oversubscribe -MPIEXEC_MAX_NUMPROCS:STRING=${N2CPUS} ") # We have a dedicated build for this setup without MPI diff --git a/scripts/ci/cmake/ci-ubuntu20.04-clang6-static-ompi.cmake b/scripts/ci/cmake/ci-ubuntu20.04-clang6-static-ompi.cmake index 4b338b9c89..71c0f9710e 100644 --- a/scripts/ci/cmake/ci-ubuntu20.04-clang6-static-ompi.cmake +++ b/scripts/ci/cmake/ci-ubuntu20.04-clang6-static-ompi.cmake @@ -1,7 +1,3 @@ -include(ProcessorCount) -ProcessorCount(NCPUS) -math(EXPR N2CPUS "${NCPUS}*2") - set(ENV{CC} clang-6.0) set(ENV{CXX} clang++-6.0) set(ENV{FC} gfortran-11) @@ -37,9 +33,6 @@ CMAKE_CXX_COMPILER_LAUNCHER=ccache CMAKE_C_FLAGS:STRING=-Wall CMAKE_CXX_FLAGS:STRING=-Wall CMAKE_Fortran_FLAGS:STRING=-Wall - -MPIEXEC_EXTRA_FLAGS:STRING=--allow-run-as-root --oversubscribe -MPIEXEC_MAX_NUMPROCS:STRING=${N2CPUS} ") set(CTEST_CMAKE_GENERATOR "Ninja") diff --git a/scripts/ci/cmake/ci-ubuntu20.04-gcc10-ompi.cmake b/scripts/ci/cmake/ci-ubuntu20.04-gcc10-ompi.cmake index 0f80809145..6463d8f72a 100644 --- a/scripts/ci/cmake/ci-ubuntu20.04-gcc10-ompi.cmake +++ b/scripts/ci/cmake/ci-ubuntu20.04-gcc10-ompi.cmake @@ -1,7 +1,3 @@ -include(ProcessorCount) -ProcessorCount(NCPUS) -math(EXPR N2CPUS "${NCPUS}*2") - set(ENV{CC} gcc) set(ENV{CXX} g++) set(ENV{FC} gfortran) @@ -35,9 +31,6 @@ CMAKE_CXX_COMPILER_LAUNCHER=ccache CMAKE_C_FLAGS:STRING=-Wall CMAKE_CXX_FLAGS:STRING=-Wall CMAKE_Fortran_FLAGS:STRING=-Wall - -MPIEXEC_EXTRA_FLAGS:STRING=--allow-run-as-root --oversubscribe -MPIEXEC_MAX_NUMPROCS:STRING=${N2CPUS} ") # We have a dedicated build for this setup without MPI diff --git a/scripts/ci/cmake/ci-ubuntu20.04-gcc11-ompi.cmake b/scripts/ci/cmake/ci-ubuntu20.04-gcc11-ompi.cmake index 70cd4b3552..a686bb0c87 100644 --- a/scripts/ci/cmake/ci-ubuntu20.04-gcc11-ompi.cmake +++ b/scripts/ci/cmake/ci-ubuntu20.04-gcc11-ompi.cmake @@ -1,7 +1,3 @@ -include(ProcessorCount) -ProcessorCount(NCPUS) -math(EXPR N2CPUS "${NCPUS}*2") - set(ENV{CC} gcc) set(ENV{CXX} g++) set(ENV{FC} gfortran) @@ -35,9 +31,6 @@ CMAKE_CXX_COMPILER_LAUNCHER=ccache CMAKE_C_FLAGS:STRING=-Wall CMAKE_CXX_FLAGS:STRING=-Wall CMAKE_Fortran_FLAGS:STRING=-Wall - -MPIEXEC_EXTRA_FLAGS:STRING=--allow-run-as-root --oversubscribe -MPIEXEC_MAX_NUMPROCS:STRING=${N2CPUS} ") set(CTEST_CMAKE_GENERATOR "Ninja") diff --git a/scripts/ci/cmake/ci-ubuntu20.04-gcc8-ompi.cmake b/scripts/ci/cmake/ci-ubuntu20.04-gcc8-ompi.cmake index 70cd4b3552..a686bb0c87 100644 --- a/scripts/ci/cmake/ci-ubuntu20.04-gcc8-ompi.cmake +++ b/scripts/ci/cmake/ci-ubuntu20.04-gcc8-ompi.cmake @@ -1,7 +1,3 @@ -include(ProcessorCount) -ProcessorCount(NCPUS) -math(EXPR N2CPUS "${NCPUS}*2") - set(ENV{CC} gcc) set(ENV{CXX} g++) set(ENV{FC} gfortran) @@ -35,9 +31,6 @@ CMAKE_CXX_COMPILER_LAUNCHER=ccache CMAKE_C_FLAGS:STRING=-Wall CMAKE_CXX_FLAGS:STRING=-Wall CMAKE_Fortran_FLAGS:STRING=-Wall - -MPIEXEC_EXTRA_FLAGS:STRING=--allow-run-as-root --oversubscribe -MPIEXEC_MAX_NUMPROCS:STRING=${N2CPUS} ") set(CTEST_CMAKE_GENERATOR "Ninja") diff --git a/scripts/ci/cmake/ci-ubuntu20.04-gcc8-static-ompi.cmake b/scripts/ci/cmake/ci-ubuntu20.04-gcc8-static-ompi.cmake index 9f4b991bc8..88ed69ff7a 100644 --- a/scripts/ci/cmake/ci-ubuntu20.04-gcc8-static-ompi.cmake +++ b/scripts/ci/cmake/ci-ubuntu20.04-gcc8-static-ompi.cmake @@ -1,7 +1,3 @@ -include(ProcessorCount) -ProcessorCount(NCPUS) -math(EXPR N2CPUS "${NCPUS}*2") - set(ENV{CC} gcc) set(ENV{CXX} g++) set(ENV{FC} gfortran) @@ -37,9 +33,6 @@ CMAKE_CXX_COMPILER_LAUNCHER=ccache CMAKE_C_FLAGS:STRING=-Wall CMAKE_CXX_FLAGS:STRING=-Wall CMAKE_Fortran_FLAGS:STRING=-Wall - -MPIEXEC_EXTRA_FLAGS:STRING=--allow-run-as-root --oversubscribe -MPIEXEC_MAX_NUMPROCS:STRING=${N2CPUS} ") set(CTEST_CMAKE_GENERATOR "Ninja") diff --git a/scripts/ci/cmake/ci-ubuntu20.04-gcc9-ompi.cmake b/scripts/ci/cmake/ci-ubuntu20.04-gcc9-ompi.cmake index 70cd4b3552..a686bb0c87 100644 --- a/scripts/ci/cmake/ci-ubuntu20.04-gcc9-ompi.cmake +++ b/scripts/ci/cmake/ci-ubuntu20.04-gcc9-ompi.cmake @@ -1,7 +1,3 @@ -include(ProcessorCount) -ProcessorCount(NCPUS) -math(EXPR N2CPUS "${NCPUS}*2") - set(ENV{CC} gcc) set(ENV{CXX} g++) set(ENV{FC} gfortran) @@ -35,9 +31,6 @@ CMAKE_CXX_COMPILER_LAUNCHER=ccache CMAKE_C_FLAGS:STRING=-Wall CMAKE_CXX_FLAGS:STRING=-Wall CMAKE_Fortran_FLAGS:STRING=-Wall - -MPIEXEC_EXTRA_FLAGS:STRING=--allow-run-as-root --oversubscribe -MPIEXEC_MAX_NUMPROCS:STRING=${N2CPUS} ") set(CTEST_CMAKE_GENERATOR "Ninja") diff --git a/scripts/ci/gh-actions/run.sh b/scripts/ci/gh-actions/run.sh index 86d12a4b49..5dcfcca7aa 100755 --- a/scripts/ci/gh-actions/run.sh +++ b/scripts/ci/gh-actions/run.sh @@ -72,13 +72,20 @@ mkdir -p "${TMPDIR}" # OpenMPI specific setup and workarounds if [[ "${GH_YML_MATRIX_PARALLEL}" =~ ompi && "${GH_YML_BASE_OS}" != "Windows" ]] then - # Quiet some warnings from OpenMPI - export OMPI_MCA_btl_base_warn_component_unused=0 - export OMPI_MCA_btl_vader_single_copy_mechanism=none + # Enable run as root + export OMPI_ALLOW_RUN_AS_ROOT=1 + export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 # Enable overscription in OpenMPI - export OMPI_MCA_rmaps_base_oversubscribe=1 + export OMPI_MCA_rmaps_base_oversubscribe=true export OMPI_MCA_hwloc_base_binding_policy=none + + # Only use loop interface + export OMPI_MCA_btl_tcp_if_include=lo + + # Quiet some warnings from OpenMPI + export OMPI_MCA_btl_base_warn_component_unused=0 + export OMPI_MCA_btl_vader_single_copy_mechanism=none fi if [[ "${GH_YML_MATRIX_PARALLEL}" =~ ompi ]] @@ -89,6 +96,9 @@ fi # Make sure staging tests use localhost export ADIOS2_IP=127.0.0.1 +# We already paralelize with mpi (MGARD uses OMP) +export OMP_NUM_THREADS=1 + # Load any additional setup scripts if [ -f gha/scripts/ci/setup-run/ci-${GH_YML_JOBNAME}.sh ] then