Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-9476 [DF] Upgrade of Data Frame for 6.16
  3. ROOT-9471

[DF] Snapshot does not write any entry if many workers have zero entries to write

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.16/00, 6.14/02
    • Component/s: None
    • Labels:
      None
    • Environment:

      any

      Description

      Repro:

      #include <ROOT/RDataFrame.hxx>
      #include <iostream>
       
      int main()
      {
         ROOT::EnableImplicitMT(4);
         ROOT::RDataFrame d(10);
         auto dd = d.DefineSlot("x", [](unsigned int s) { return s == 3 ? 0 : 1; })
                     .Filter([](int x) { return x == 0; }, {"x"}, "f");
         auto r = dd.Report();
         dd.Snapshot<int>("t", "out.root", {"x"});
         r->Print();
       
         TFile f("out.root");
         auto t = (TTree*)f.Get("t");
         std::cout << "entries: " << t->GetEntries() << " branches: " << t->GetListOfBranches()->GetEntries() << std::endl;
         return 0;
      }
      

      The generated file contains a tree with the expected number of entries, but no branches.
      The reproducer is racy.

        Attachments

          Activity

            People

            Assignee:
            eguiraud Enrico Guiraud
            Reporter:
            eguiraud Enrico Guiraud
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              PlannedEnd:
              PlannedStart:
              Actual Start:
              Actual End: