From 24f461051f68985de8cfb7de7a52b0187059aac1 Mon Sep 17 00:00:00 2001 From: Vicente Adolfo Bolea Sanchez Date: Tue, 14 Nov 2023 19:15:45 -0500 Subject: [PATCH] fixup! fixup! ci: openmpi use localhost --- scripts/ci/cmake/ci-el8-icc-ompi.cmake | 7 ------- scripts/ci/cmake/ci-el8-oneapi-ompi.cmake | 7 ------- .../ci/cmake/ci-ubuntu20.04-clang10-ompi.cmake | 2 -- .../ci/cmake/ci-ubuntu20.04-clang6-ompi.cmake | 2 -- .../ci-ubuntu20.04-clang6-static-ompi.cmake | 2 -- .../ci/cmake/ci-ubuntu20.04-gcc10-ompi.cmake | 2 -- .../ci/cmake/ci-ubuntu20.04-gcc11-ompi.cmake | 2 -- scripts/ci/cmake/ci-ubuntu20.04-gcc8-ompi.cmake | 2 -- .../cmake/ci-ubuntu20.04-gcc8-static-ompi.cmake | 2 -- scripts/ci/cmake/ci-ubuntu20.04-gcc9-ompi.cmake | 2 -- scripts/ci/gh-actions/run.sh | 17 ++++++++++++----- 11 files changed, 12 insertions(+), 35 deletions(-) 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 7466117143..447c304316 100644 --- a/scripts/ci/cmake/ci-ubuntu20.04-clang10-ompi.cmake +++ b/scripts/ci/cmake/ci-ubuntu20.04-clang10-ompi.cmake @@ -31,8 +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 --mca btl_tcp_if_include lo ") 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 2118c80405..bfe89a699c 100644 --- a/scripts/ci/cmake/ci-ubuntu20.04-clang6-ompi.cmake +++ b/scripts/ci/cmake/ci-ubuntu20.04-clang6-ompi.cmake @@ -32,8 +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 --mca btl_tcp_if_include lo ") # 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 050c5f836c..71c0f9710e 100644 --- a/scripts/ci/cmake/ci-ubuntu20.04-clang6-static-ompi.cmake +++ b/scripts/ci/cmake/ci-ubuntu20.04-clang6-static-ompi.cmake @@ -33,8 +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 --mca btl_tcp_if_include lo ") 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 217bcb58ff..6463d8f72a 100644 --- a/scripts/ci/cmake/ci-ubuntu20.04-gcc10-ompi.cmake +++ b/scripts/ci/cmake/ci-ubuntu20.04-gcc10-ompi.cmake @@ -31,8 +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 --mca btl_tcp_if_include lo ") # 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 8991121992..a686bb0c87 100644 --- a/scripts/ci/cmake/ci-ubuntu20.04-gcc11-ompi.cmake +++ b/scripts/ci/cmake/ci-ubuntu20.04-gcc11-ompi.cmake @@ -31,8 +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 --mca btl_tcp_if_include lo ") 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 8991121992..a686bb0c87 100644 --- a/scripts/ci/cmake/ci-ubuntu20.04-gcc8-ompi.cmake +++ b/scripts/ci/cmake/ci-ubuntu20.04-gcc8-ompi.cmake @@ -31,8 +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 --mca btl_tcp_if_include lo ") 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 4a0f59bdf5..88ed69ff7a 100644 --- a/scripts/ci/cmake/ci-ubuntu20.04-gcc8-static-ompi.cmake +++ b/scripts/ci/cmake/ci-ubuntu20.04-gcc8-static-ompi.cmake @@ -33,8 +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 --mca btl_tcp_if_include lo ") 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 8991121992..a686bb0c87 100644 --- a/scripts/ci/cmake/ci-ubuntu20.04-gcc9-ompi.cmake +++ b/scripts/ci/cmake/ci-ubuntu20.04-gcc9-ompi.cmake @@ -31,8 +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 --mca btl_tcp_if_include lo ") set(CTEST_CMAKE_GENERATOR "Ninja") diff --git a/scripts/ci/gh-actions/run.sh b/scripts/ci/gh-actions/run.sh index f3a5bfdb99..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,7 +96,7 @@ fi # Make sure staging tests use localhost export ADIOS2_IP=127.0.0.1 -# We already paralelize with mpi (MGARD uses omp) +# We already paralelize with mpi (MGARD uses OMP) export OMP_NUM_THREADS=1 # Load any additional setup scripts