mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
CI: limit NVHPC build parallelism to avoid OOM kills
libeigen/eigen!2353 Co-authored-by: Rasmus Munk Larsen <rmlarsen@gmail.com>
This commit is contained in:
@@ -172,6 +172,9 @@ build:linux:x86-64:nvhpc-26.1:default:
|
||||
EIGEN_CI_CXX_COMPILER: nvc++
|
||||
EIGEN_CI_INSTALL: ""
|
||||
EIGEN_CI_CROSS_INSTALL: ""
|
||||
# NVHPC's compiler frontend is very memory-hungry with template-heavy code.
|
||||
# Limit parallelism to avoid OOM kills from the kernel.
|
||||
EIGEN_CI_BUILD_JOBS: "8"
|
||||
|
||||
######## CUDA ##################################################################
|
||||
|
||||
|
||||
@@ -23,7 +23,13 @@ fi
|
||||
# out of resources. In that case, keep trying to build the remaining
|
||||
# targets (k0), then try to build again with a single thread (j1) to minimize
|
||||
# resource use.
|
||||
cmake --build . ${target} -- -k0 || cmake --build . ${target} -- -k0 -j1
|
||||
# EIGEN_CI_BUILD_JOBS can be set to limit parallelism for memory-hungry
|
||||
# compilers (e.g. NVHPC).
|
||||
jobs=""
|
||||
if [[ -n "${EIGEN_CI_BUILD_JOBS}" ]]; then
|
||||
jobs="-j${EIGEN_CI_BUILD_JOBS}"
|
||||
fi
|
||||
cmake --build . ${target} -- -k0 ${jobs} || cmake --build . ${target} -- -k0 -j1
|
||||
|
||||
# Return to root directory.
|
||||
cd ${rootdir}
|
||||
|
||||
Reference in New Issue
Block a user