Skip to content

Commit

Permalink
Merge pull request #3908 from vicentebolea/increase-timeout-mgard-tests
Browse files Browse the repository at this point in the history
ci: Set openmpi and openmp parameters to make an efficient use of the CI
  • Loading branch information
vicentebolea committed Nov 15, 2023
2 parents 413b6ca + 92ebfed commit 3c21c37
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 74 deletions.
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

0 comments on commit 3c21c37

Please sign in to comment.