Skip to content

Commit 4a08c87

Browse files
committed
jenkins: probe pod CPU allocation before tests
Binding-off did not change per-test times, so the slowdown is the pod's CPU slice, not core-stacking. Print nproc, cgroup cpu.max/quota, and cpuset before ctest to find the real allocation, then size -j and ranks to it.
1 parent c2d302a commit 4a08c87

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

jenkins/Jenkinsfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,15 @@ def runBuild = { String platform, String prefix, List<String> envs ->
9696
"""
9797
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') {
9898
try {
99+
/* DIAGNOSTIC: how many CPUs does this build pod actually get? The
100+
node is 96-core but the pod gets a cgroup slice; size test
101+
parallelism to that, not the host. */
102+
sh '''#!/bin/sh -x
103+
echo "nproc=$(nproc)"
104+
getconf _NPROCESSORS_ONLN || true
105+
cat /sys/fs/cgroup/cpu.max 2>/dev/null || cat /sys/fs/cgroup/cpu/cpu.cfs_quota_us /sys/fs/cgroup/cpu/cpu.cfs_period_us 2>/dev/null || true
106+
cat /sys/fs/cgroup/cpuset.cpus.effective 2>/dev/null || cat /sys/fs/cgroup/cpuset/cpuset.cpus 2>/dev/null || true
107+
'''
99108
/* Tests run 4 MPI ranks each (PROCESSORS property) with binding
100109
disabled (see envs), so ctest -j is a core budget: -j16 = 4
101110
concurrent on Linux, -j8 = 2 on the smaller macOS m1 nodes. */

0 commit comments

Comments
 (0)