-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ctest parallel #2367
ctest parallel #2367
Conversation
Renaming to ENABLE should make that clear, also clarify doc string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think we're also missing PROCESSORS
in test-drift-instability*
I'm seeing similar behaviour, even after adding This feels like a bug, the documentation explicitly says:
|
Ok, think I understand this a bit better now. Here, "affinity" means a set of logical cores that a process is restricted to running on. The problem is that each test gets run with the affinity set to the correct set of processors, but this only applies to the parent process -- which is It's pretty trivial to get the affinity of the current process: procs = ",".join(map(str, os.sched_getaffinity(0)))
cmd = f"{runcmd} {nproc} -cpu-list {procs} {command}" I also needed to add Another complication: if you use a system Sorting all of these issues out let me run the tests in parallel and actually use all the cores on my machine, meaning I could run everything in about 4 minutes. |
PROCESSORS only takes one argument We need to pass PROCESSORS as a property and need to enable processor afinity
Some timings (in seconds, on raven, 72 physical cores)
cmake seems to be generally a bit slower, probably due to Running with 144 threads doesn't help a lot:
|
Enables these tests to be run in parallel. Might be safe to allow more processors, but probably not going to work for arbitrary number (e.g 3)
I am not sure it is actually working as expected.
I tried with
set(BOUT_TEST_OPTIONS_PROCESSORS 2)
andctest -j 2
and it never the less run 2 tests in parallel.Might have been a caching issue - not sure ...