Set build_jobs dynamically in CI to avoid oversubscription (#35996)

Co-authored-by: Zack Galbreath <zack.galbreath@kitware.com>
Co-authored-by: Ryan Krattiger <ryan.krattiger@kitware.com>
This commit is contained in:
Harmen Stoppels
2023-03-13 08:29:58 +01:00
committed by GitHub
parent 31de7ea56c
commit 2107b6bf00
4 changed files with 7 additions and 2 deletions

View File

@@ -12,6 +12,7 @@ ci:
- - spack compiler find
- cd ${SPACK_CONCRETE_ENV_DIR}
- spack env activate --without-view .
- if [ -n "$SPACK_BUILD_JOBS" ]; then spack config add "config:build_jobs:$SPACK_BUILD_JOBS"; fi
- spack config add "config:install_tree:projections:${SPACK_JOB_SPEC_PKG_NAME}:'morepadding/{architecture}/{compiler.name}-{compiler.version}/{name}-{version}-{hash}'"
- mkdir -p ${SPACK_ARTIFACTS_ROOT}/user_data
# AWS runners mount E4S public key (verification), UO runners mount public/private (signing/verification)

View File

@@ -1,5 +1,4 @@
config:
build_jobs: 32
concretizer: clingo
db_lock_timeout: 120
install_tree:

View File

@@ -17,7 +17,8 @@ ci:
tags: [ "spack", "huge" ]
variables:
CI_JOB_SIZE: huge
KUBERNETES_CPU_REQUEST: 11000m
SPACK_BUILD_JOBS: "12"
KUBERNETES_CPU_REQUEST: 12000m
KUBERNETES_MEMORY_REQUEST: 42G
- match:
@@ -77,6 +78,7 @@ ci:
tags: [ "spack", "large" ]
variables:
CI_JOB_SIZE: large
SPACK_BUILD_JOBS: "8"
KUBERNETES_CPU_REQUEST: 8000m
KUBERNETES_MEMORY_REQUEST: 12G
@@ -170,6 +172,7 @@ ci:
tags: [ "spack", "medium" ]
variables:
CI_JOB_SIZE: "medium"
SPACK_BUILD_JOBS: "2"
KUBERNETES_CPU_REQUEST: "2000m"
KUBERNETES_MEMORY_REQUEST: "4G"
@@ -286,5 +289,6 @@ ci:
tags: [ "spack", "small" ]
variables:
CI_JOB_SIZE: "small"
SPACK_BUILD_JOBS: "1"
KUBERNETES_CPU_REQUEST: "500m"
KUBERNETES_MEMORY_REQUEST: "500M"

View File

@@ -14,6 +14,7 @@ ci:
- spack arch
- cd ${SPACK_CONCRETE_ENV_DIR}
- spack env activate --without-view .
- if [ -n "$SPACK_BUILD_JOBS" ]; then spack config add "config:build_jobs:$SPACK_BUILD_JOBS"; fi
- spack config add "config:install_tree:projections:${SPACK_JOB_SPEC_PKG_NAME}:'morepadding/{architecture}/{compiler.name}-{compiler.version}/{name}-{version}-{hash}'"
- mkdir -p ${SPACK_ARTIFACTS_ROOT}/user_data
- if [[ -r /mnt/key/e4s.gpg ]]; then spack gpg trust /mnt/key/e4s.gpg; fi