Compile R packages with less parallelism: OpenMx was OOM-killed

The retry loop converged 6 -> 10 -> 10 bundles and stalled. The cause was
not a race after all:

  g++: fatal error: Killed signal terminated program cc1plus

OpenMx instantiates enough Eigen templates that a single cc1plus needs
several GB, and at -j5 on an 8GB runner the kernel killed it every time -
which is why both retries stopped at exactly 10/22 rather than creeping
forward. That in turn blocked jaspFactor, jaspSem, mxsem and semPlot.

R packages now compile at -j2 (R_JOBS) independently of the -j used for
the C++ build, and the runner VM was given 16GB.
This commit is contained in:
agw
2026-09-02 21:30:00 +02:00
parent e009dc82d3
commit 74af81d2e5
+9
View File
@@ -260,6 +260,15 @@ PY
# Retrying is the cheap fix: renv skips what is already installed, so each pass
# starts from more complete state and converges. Passes are capped so a genuine
# failure cannot loop forever.
# OpenMx instantiates enough Eigen templates that a single cc1plus can take
# several GB. At the top-level -j the compiler gets OOM-killed
# ("g++: fatal error: Killed signal terminated program cc1plus"), which is not
# a race — it stalls at the same module count on every retry. Compile R packages
# with less parallelism than the C++ build uses.
R_JOBS="${R_JOBS:-2}"
export MAKEFLAGS="-j${R_JOBS}"
log "compiling R packages with -j${R_JOBS} (OpenMx needs the headroom)"
EXPECTED_MODULES=22
for attempt in 1 2 3; do
log "module build pass ${attempt}/3"