Skip to content

Commit 978f02e

Browse files
committed
DevOps: Adapt testsuite to new hardware
1 parent 6ba8718 commit 978f02e

File tree

7 files changed

+21
-24
lines changed

7 files changed

+21
-24
lines changed

.github/workflows/push_pull.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
credentials:
4040
username: ${{ github.actor }}
4141
password: ${{ secrets.github_token }}
42-
options: --cpus 2
42+
options: --cpus 4
4343
steps:
4444
- name: Checkout
4545
uses: actions/checkout@main
@@ -55,8 +55,8 @@ jobs:
5555
- name: Build and check
5656
uses: ./.github/actions/build_and_check
5757
env:
58-
build_procs: 2
59-
check_procs: 2
58+
build_procs: 4
59+
check_procs: 4
6060
myconfig: 'maxset'
6161
with_ccache: 'true'
6262
with_cuda: 'false'
@@ -78,7 +78,7 @@ jobs:
7878
credentials:
7979
username: ${{ github.actor }}
8080
password: ${{ secrets.github_token }}
81-
options: --cpus 2
81+
options: --cpus 4
8282
steps:
8383
- name: Checkout
8484
uses: actions/checkout@main
@@ -94,8 +94,8 @@ jobs:
9494
- name: Build and check
9595
uses: ./.github/actions/build_and_check
9696
env:
97-
build_procs: 2
98-
check_procs: 2
97+
build_procs: 4
98+
check_procs: 4
9999
myconfig: 'maxset'
100100
with_ccache: 'true'
101101
with_cuda: 'false'

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,13 +372,16 @@ else()
372372
endif()
373373

374374
# OpenMPI checks the number of processes against the number of CPUs
375-
set(ESPRESSO_MPIEXEC_OVERSUBSCRIBE "")
375+
set(ESPRESSO_MPIEXEC_PREFLAGS "")
376376
# Open MPI 4.x has a bug on NUMA archs that prevents running in singleton mode
377377
set(ESPRESSO_MPIEXEC_GUARD_SINGLETON_NUMA OFF)
378378
set(ESPRESSO_CPU_MODEL_NAME_OMPI_SINGLETON_NUMA_PATTERN "AMD (EPYC|Ryzen)")
379379

380380
if("${ESPRESSO_MPIEXEC_VENDOR}" STREQUAL "OpenMPI")
381-
set(ESPRESSO_MPIEXEC_OVERSUBSCRIBE "-oversubscribe")
381+
list(APPEND ESPRESSO_MPIEXEC_PREFLAGS "-oversubscribe")
382+
if(ESPRESSO_INSIDE_DOCKER)
383+
list(APPEND ESPRESSO_MPIEXEC_PREFLAGS "--bind-to" "none")
384+
endif()
382385
if(${ESPRESSO_MPIEXEC_VERSION} VERSION_LESS 5.0)
383386
if(NOT DEFINED ESPRESSO_CPU_MODEL_NAME)
384387
if(CMAKE_SYSTEM_NAME STREQUAL Linux)

cmake/espresso_unit_test.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function(ESPRESSO_UNIT_TEST)
5252
set(TEST_NUM_PROC ${ESPRESSO_TEST_NP})
5353
endif()
5454
espresso_set_mpiexec_tmpdir(${TEST_NAME})
55-
add_test(${TEST_NAME} ${MPIEXEC} ${ESPRESSO_MPIEXEC_OVERSUBSCRIBE}
55+
add_test(${TEST_NAME} ${MPIEXEC} ${ESPRESSO_MPIEXEC_PREFLAGS}
5656
${MPIEXEC_NUMPROC_FLAG} ${TEST_NUM_PROC} ${MPIEXEC_PREFLAGS}
5757
${ESPRESSO_MPIEXEC_TMPDIR} ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME}
5858
${MPIEXEC_POSTFLAGS})

maintainer/CI/build_cmake.sh

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -79,20 +79,14 @@ ci_procs=2
7979
if [ "${GITLAB_CI}" = "true" ]; then
8080
if [[ "${OSTYPE}" == "linux-gnu"* ]]; then
8181
# Linux runner
82-
if grep -q "i7-3820" /proc/cpuinfo; then
83-
# communication bottleneck for more than 2 cores on Intel i7-3820
84-
ci_procs=2
85-
else
86-
ci_procs=4
87-
fi
82+
ci_procs=4
8883
elif [[ "${OSTYPE}" == "darwin"* ]]; then
8984
# macOS runner
90-
ci_procs=2
85+
ci_procs=4
9186
fi
9287
elif [ "${GITHUB_ACTIONS}" = "true" ]; then
93-
# GitHub Actions only provide 1 core; request 2 cores to run tests
94-
# in parallel (OpenMPI allows oversubscription)
95-
ci_procs=2
88+
# GitHub Actions provide 4 cores
89+
ci_procs=4
9690
else
9791
ci_procs=$(nproc)
9892
fi

maintainer/benchmarks/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ if(EXISTS ${MPIEXEC})
2828
OUTPUT_VARIABLE mpi_version_output ERROR_VARIABLE mpi_version_output)
2929
if(mpi_version_result EQUAL 0 AND mpi_version_output MATCHES
3030
"\\(Open(RTE| MPI)\\) ([3-9]\\.|1[0-9])")
31-
set(ESPRESSO_MPIEXEC_OVERSUBSCRIBE "-oversubscribe")
31+
set(ESPRESSO_MPIEXEC_PREFLAGS "-oversubscribe")
3232
else()
33-
set(ESPRESSO_MPIEXEC_OVERSUBSCRIBE "")
33+
set(ESPRESSO_MPIEXEC_PREFLAGS "")
3434
endif()
3535
endif()
3636

@@ -86,7 +86,7 @@ function(PYTHON_BENCHMARK)
8686
add_test(
8787
NAME ${BENCHMARK_TEST_NAME}
8888
COMMAND
89-
${MPIEXEC} ${ESPRESSO_MPIEXEC_OVERSUBSCRIBE} ${MPIEXEC_NUMPROC_FLAG}
89+
${MPIEXEC} ${ESPRESSO_MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG}
9090
${BENCHMARK_NUM_PROC} ${MPIEXEC_PREFLAGS}
9191
${CMAKE_BINARY_DIR}/pypresso ${BENCHMARK_FILE} ${BENCHMARK_ARGUMENTS}
9292
${MPIEXEC_POSTFLAGS})

testsuite/python/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function(python_test)
9292
add_test(
9393
NAME ${TEST_NAME}
9494
COMMAND
95-
${MPIEXEC} ${ESPRESSO_MPIEXEC_OVERSUBSCRIBE} ${MPIEXEC_NUMPROC_FLAG}
95+
${MPIEXEC} ${ESPRESSO_MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG}
9696
${TEST_NUM_PROC} ${MPIEXEC_PREFLAGS} ${ESPRESSO_MPIEXEC_TMPDIR}
9797
${CMAKE_BINARY_DIR}/pypresso ${PYPRESSO_OPTIONS}
9898
${TEST_FILE_CONFIGURED} ${TEST_ARGUMENTS} ${MPIEXEC_POSTFLAGS})

testsuite/python/resources.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"gpus": [
99
{
1010
"id": "0",
11-
"slots": 4
11+
"slots": 8
1212
}
1313
]
1414
}

0 commit comments

Comments
 (0)