Skip to content

Commit

Permalink
Merge pull request #15 from hahnjo/disable-cluster-cache
Browse files Browse the repository at this point in the history
Interpret cluster bunch size < 1 to disable the cache
  • Loading branch information
jblomer authored Feb 8, 2024
2 parents 9fbbe24 + 4d095c5 commit 8f85d9a
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Each benchmark takes the same input parameters:
- `-p` show the tree/ntuple performance statistics
- `-r` run the benchmark with RDataFrame instead of hand-written event loop
- `-m` enable implicit multi-threading (paralle RNTuple page decompression, parallel RDF event loop)
- `-x` cluster bunch size; a value less than 1 will disable the cluster cache

The real-time timing uses std::chrono::steady_clock and starts with the second
event (direct access) or with an artificial first filter (RDF).
Expand Down
6 changes: 5 additions & 1 deletion atlas.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ static ROOT::Experimental::RNTupleReadOptions GetRNTupleOptions() {
using RNTupleReadOptions = ROOT::Experimental::RNTupleReadOptions;

RNTupleReadOptions options;
options.SetClusterBunchSize(g_cluster_bunch_size);
if (g_cluster_bunch_size < 1) {
options.SetClusterCache(RNTupleReadOptions::EClusterCache::kOff);
} else {
options.SetClusterBunchSize(g_cluster_bunch_size);
}
return options;
}

Expand Down
6 changes: 5 additions & 1 deletion cms.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ static ROOT::Experimental::RNTupleReadOptions GetRNTupleOptions() {
using RNTupleReadOptions = ROOT::Experimental::RNTupleReadOptions;

RNTupleReadOptions options;
options.SetClusterBunchSize(g_cluster_bunch_size);
if (g_cluster_bunch_size < 1) {
options.SetClusterCache(RNTupleReadOptions::EClusterCache::kOff);
} else {
options.SetClusterBunchSize(g_cluster_bunch_size);
}
return options;
}

Expand Down
6 changes: 5 additions & 1 deletion h1.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ static ROOT::Experimental::RNTupleReadOptions GetRNTupleOptions() {
using RNTupleReadOptions = ROOT::Experimental::RNTupleReadOptions;

RNTupleReadOptions options;
options.SetClusterBunchSize(g_cluster_bunch_size);
if (g_cluster_bunch_size < 1) {
options.SetClusterCache(RNTupleReadOptions::EClusterCache::kOff);
} else {
options.SetClusterBunchSize(g_cluster_bunch_size);
}
return options;
}

Expand Down
6 changes: 5 additions & 1 deletion lhcb.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ static ROOT::Experimental::RNTupleReadOptions GetRNTupleOptions() {
using RNTupleReadOptions = ROOT::Experimental::RNTupleReadOptions;

RNTupleReadOptions options;
options.SetClusterBunchSize(g_cluster_bunch_size);
if (g_cluster_bunch_size < 1) {
options.SetClusterCache(RNTupleReadOptions::EClusterCache::kOff);
} else {
options.SetClusterBunchSize(g_cluster_bunch_size);
}
return options;
}

Expand Down

0 comments on commit 8f85d9a

Please sign in to comment.