Skip to content

[Tutorials] Fix IMT tutorials, and run them in parallel #19195

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

Merged
merged 4 commits into from
Jun 27, 2025

Conversation

hageboeck
Copy link
Member

  • Fix the following problem:
    root: unrecognized option '-e "ROOT::EnableImplicitMT(4)"'
      Try 'root --help' for more information.
      2965/2993 Test https://github.com/root-project/root/pull/678: tutorial-analysis-dataframe-df102_NanoAODDimuonAnalysis ............. Passed 0.15 sec
    
    • The origin of this problem is a mistake in escaping -e "xxx", which arrives as a single argument in root. root was exiting with status 0, so the tests wouldn't run. (In a subsequent PR, it will exit with status 2, so future mistakes can be caught.)
  • Instead of using root -e, now use ROOT_MAX_THREADS to limit the number of worker threads.
  • The above also allowed for increasing the parallelism of IMT tutorials using ROOT_MAX_THREADS. Before, they were never running in parallel because of a global resource lock, but since CMake's NumCPU and the number of threads used in ROOT are now in sync, the resource lock can be removed. The IMT tutorials will run in parallel, but not overcommit the machine.

Due to a problem with escaping a command line, IMT tutorials in C++
weren't running at all.

  root: unrecognized option '-e "ROOT::EnableImplicitMT(4)"'
  Try 'root --help' for more information.
  2965/2993 Test root-project#678: tutorial-analysis-dataframe-df102_NanoAODDimuonAnalysis ............. Passed 0.15 sec

Here, we move to using the environment variable ROOT_MAX_THREADS.
When running `ctest -R df10 -j16`, only a single tutorial runs at a
time, because they share a global RESOURCE_LOCK.
However, given that ROOT actually honours ROOT_MAX_THREADS, it's safe
now to remove the resource lock and set the number of CPUs in CMake. In
this way, four IMT tutorials would run with 4 threads each in a 16-core
machine.
Since ROOT honours ROOT_MAX_THREADS, no more IMT wrappers are required
for running tutorials.
Copy link

github-actions bot commented Jun 26, 2025

Test Results

    20 files      20 suites   3d 12h 30m 29s ⏱️
 3 050 tests  3 050 ✅ 0 💤 0 ❌
59 400 runs  59 400 ✅ 0 💤 0 ❌

Results for commit 8f4f327.

♻️ This comment has been updated with latest results.

Ruff currently fails to lint when a python file is deleted from the
project.
@hageboeck hageboeck merged commit e33ea98 into root-project:master Jun 27, 2025
25 checks passed
@hageboeck hageboeck deleted the fixIMTTutorials branch June 27, 2025 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants