Skip to content

Conversation

hageboeck
Copy link
Member

Note:
This PR is split into several smaller parts to simplify the review. Many of the commits will disappear once it gets rebased.
When this happens, the description will be extended and it will come out of draft mode.

Due to the deprecation marker, the snapshot documentation is parsed
incorrectly in doxygen. Here, the main documentation is moved to the
non-template overload, and the other overloads are referring to this one
using the full argument list.
"See above" typically doesn't work, since doxygen sorts the functions.
When a Define is added to a branch that gets varied, a new column reader
was created for every variation and for every slot, irrespective of
whether the column gets varied or not.
For snapshot with variations, this column would be written for every
variation, although it always evaluates to the same value. To prevent this
duplication, the column readers that point to the same Define are shared
after this commit. The readers are still cloned per slot though, so the
Define's value caches remain thread safe. This allows
SnapshotWithVariations to detect that columns are identical, so they are
not written multiple times.
The memory savings amount to 24 bytes per suppressed column reader,so
they won't have a notable impact.
In order to not write a column multiple times in a snapshot with
variations, the RDefineBase pointer needs to stay invariant when a
variation is generated.
However, the RJittedDefine was returning the pointer to its member, so
it looked like the column was affected by variations. Here, this is
changed to returning "this" when no variations are in effect.
Given that snapshots with variations will be enabled via RSnapshotOptions,
the snapshot overload for Vary can be removed, and a static_assert can
be used to signal the failure.
In order to implement snapshots with systematic variations, it is
beneficial to place all members related to output branches into structs.
At present, this only constitutes a move from member of SnapshotHelper
to member of RBranchData struct.

The TTree snapshot helpers are changed accordingly.
It is superseded by RBranchData.
…ests.

In roottest, some targets are added to the Ninja build graph. These are
compiled as part of the test suite, but this would create race
conditions when many builds are started in parallel. Therefore, all
these builds were flagged with RUN_SERIAL, significantly reducing the
parallelism of roottest.
Now, the tests that compile have "RESOURCE_LOCK NINJA_COMPILATION", so
only a single test that compiles exectables can run, but it can run in
parallel with tests that don't compile.
In addition to correctly specifying the number of CPUs in CMake, the
tutorials were also setting a resource lock, which prevented them
from running in parallel with other RDF tutorials.
Since ROOT honours ROOT_MAX_THREADS, this resource lock can be removed.
Convert the fPreviousNode pointer into a vector of pointers. For now, it
will only have a single entry, but this will allow for extending
RActionSnapshot to systematic variations later.
Add a new action helper that allows for storing variations of branches
alongside the classic snapshot functionality. Branches are only stored
if their column readers are different from the nominal column readers.

SnapshotWithVariations writes the same types as the input tree. When
a branch with a systematic uncertainty doesn't pass a filter, a
default-constructed value will be written.
Reading this branch, however, might yield invalid values. Therefore, an
additional branch with a bitmask is written, which can be used to figure
out if the values in a specific column are valid. Later on, a column
reader will be provided which will allow for masking the branches whose
values are invalid.
This allows for faster vector resizes.
Depending on the type of the action helper (classic or with variations),
add column readers for variations to the snapshot action.
Copy link

Test Results

    20 files      20 suites   3d 4h 57m 25s ⏱️
 3 560 tests  3 423 ✅  0 💤 137 ❌
69 785 runs  69 631 ✅ 17 💤 137 ❌

For more details on these failures, see this check.

Results for commit 4701fcc.

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