Skip to content

Build omc with the cores the node has, not with 16 and 9 - #328

Merged
adrpo merged 1 commit into
OpenModelica:masterfrom
adrpo:build-with-the-nodes-cpus
Aug 25, 2026
Merged

Build omc with the cores the node has, not with 16 and 9#328
adrpo merged 1 commit into
OpenModelica:masterfrom
adrpo:build-with-the-nodes-cpus

Conversation

@adrpo

@adrpo adrpo commented Aug 24, 2026

Copy link
Copy Markdown
Member

The build commands carry the machines they were written for:

time make -j16 clean
if ! time make -j9 omc > log 2>&1; then
if ! time make -j16 runtimeCPPinstall > log 2>&1; then
cmake --build ../build_cmake --parallel 16 --target install
make -j16 -C testsuite/ReferenceFiles

-j9 is the machine this file was written for in 2019 (836da12, "Add a
Jenkinsfile for ripper", where everything was -j9). -j16 arrived in 2021 with
26bdeae, "Build OMC with a few more threads", which raised every -j9 in
the file to 16 - except the one it was named after:

-    time make -j9 clean
+    time make -j16 clean
-    if ! time make -j9 runtimeCPPinstall > log 2>&1; then
+    if ! time make -j16 runtimeCPPinstall > log 2>&1; then
-  if ! time make -j9 -C testsuite/ReferenceFiles > log 2>&1; then
+  if ! time make -j16 -C testsuite/ReferenceFiles > log 2>&1; then

make -j9 omc is untouched by that commit and has been building omc on nine of
the sixteen cores of a ryzen-5950x ever since. It is not a memory limit anyone
chose; it is the number the file was born with.

What changes

The node is asked, the way the OpenModelica job asks - numPhysicalCPU in
.CI/common.groovy there, same lscpu incantation, same
JENKINS_NUM_PHYSICAL_CPU override:

  • physical cores for the compiles (clean, omc, runtimeCPPinstall, the
    cmake build) - which is what -j16 already was on these machines, so the only
    change there is the omc build going from 9 to 16. That is also what the
    OpenModelica job builds omc with on the same class of machine;
  • logical cores for testsuite/ReferenceFiles, which is the split that job
    uses for exactly that target.

Unlike common.groovy the answer is not stashed in the environment: this
pipeline is agent none and its stages run on ryzen-5950x-1,
ryzen-5950x-2-1, ryzen-9950x and linux within one build, so a cached answer
would be whichever node asked first. An override set on the node itself is still
honoured. The count is asked for once per run and echoed with the node name, so a
build says what it built with:

Building omc with -j16 on ryzen-5950x-1

One thing worth a second look

runRegressiontest already has a parameter called jobs - how many models
test.py tests at a time, which heavy_tests sets to 1 - so the new variable
is buildJobs. Calling it jobs would have shadowed the parameter and let
heavy_tests loose with sixteen models at once.


Generated by Claude Code.

The build commands carry the machines they were written for. -j9 is the
machine this file was written for in 2019; -j16 came in 2021 with "Build
OMC with a few more threads", which raised every -j9 in the file to 16 -
except the one it was named after, `make -j9 omc`, which is still there.
So the omc build has been using nine of the sixteen cores of a
ryzen-5950x for four years, and a new machine is built on as if it were
one of those.

The node is asked instead, the way the OpenModelica job asks
(numPhysicalCPU in .CI/common.groovy there): physical cores for the
compiles, which is what -j16 already was on these machines, and logical
ones for the reference files, which is the split that job uses. Unlike
that one the answer is not stashed in the environment - this pipeline is
agent none and its stages run on several machines within one build, so
the cached answer would be the first node's - while an override set on the
node itself is honoured.

The count is asked for once per run and echoed with the node name, so a
build says what it built with.

---
Generated by Claude Code.
@adrpo
adrpo merged commit 3ec4619 into OpenModelica:master Aug 25, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant