Skip to content
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

[ntuple] Add tutorial for framework usage #16536

Merged
merged 2 commits into from
Oct 2, 2024

Conversation

hahnjo
Copy link
Member

@hahnjo hahnjo commented Sep 26, 2024

Closes #16290

Copy link
Contributor

@jblomer jblomer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, LGTM! Perhaps invite a framework developer to take a look.

Comment on lines 153 to 154
// A SerializingOutputter uses a sequential RNTupleWriter to append an RNTuple to a TFile and a std::mutex to
// synchronize multiple threads.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could add a note about IMT (or enable it), to show that page compression can still be in parallel even with the sequential mode.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about this and unfortunately I think this is not possible / not efficient with the implementation in this tutorial: A thread blocking to acquire a std::mutex cannot "help" the other thread that is currently in the critical section by executing its tasks. I added a note, also on the direct usage of std::thread.

Copy link

github-actions bot commented Sep 26, 2024

Test Results

    14 files      14 suites   2d 21h 24m 31s ⏱️
 2 700 tests  2 700 ✅ 0 💤 0 ❌
35 546 runs  35 546 ✅ 0 💤 0 ❌

Results for commit 122daf2.

♻️ This comment has been updated with latest results.

@hahnjo
Copy link
Member Author

hahnjo commented Sep 27, 2024

Hi @Dr15Jones @makortel @siliataider, this PR aims to provide a tutorial how we (ROOT) envision frameworks could use the RNTuple API for writing. If you have some time, it would be great if you could check whether it makes sense and demonstrates the relevant use cases. The "framework code" is obviously very much simplified and the goal is not to code a full production framework, but I hope it's close enough to what the "real" experiment frameworks are doing. Thanks in advance!

@hahnjo hahnjo merged commit 4fadd24 into root-project:master Oct 2, 2024
18 of 19 checks passed
@hahnjo hahnjo deleted the ntuple-tutorial-framework branch October 2, 2024 06:47
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.

[ntuple] Provide tutorial for (envisioned) framework usage
2 participants