Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Set openmpi and openmp parameters to make an efficient use of the CI #3908

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions scripts/ci/cmake/ci-el8-icc-ompi.cmake
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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")
Expand Down
7 changes: 0 additions & 7 deletions scripts/ci/cmake/ci-el8-oneapi-ompi.cmake
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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")
Expand Down
7 changes: 0 additions & 7 deletions scripts/ci/cmake/ci-ubuntu20.04-clang10-ompi.cmake
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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")
Expand Down
7 changes: 0 additions & 7 deletions scripts/ci/cmake/ci-ubuntu20.04-clang6-ompi.cmake
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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
Expand Down
7 changes: 0 additions & 7 deletions scripts/ci/cmake/ci-ubuntu20.04-clang6-static-ompi.cmake
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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")
Expand Down
7 changes: 0 additions & 7 deletions scripts/ci/cmake/ci-ubuntu20.04-gcc10-ompi.cmake
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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
Expand Down
7 changes: 0 additions & 7 deletions scripts/ci/cmake/ci-ubuntu20.04-gcc11-ompi.cmake
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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")
Expand Down
7 changes: 0 additions & 7 deletions scripts/ci/cmake/ci-ubuntu20.04-gcc8-ompi.cmake
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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")
Expand Down
7 changes: 0 additions & 7 deletions scripts/ci/cmake/ci-ubuntu20.04-gcc8-static-ompi.cmake
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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")
Expand Down
7 changes: 0 additions & 7 deletions scripts/ci/cmake/ci-ubuntu20.04-gcc9-ompi.cmake
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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")
Expand Down
18 changes: 14 additions & 4 deletions scripts/ci/gh-actions/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]]
Expand All @@ -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
Expand Down
Loading