Example B3a root files are not automatically merged in multithreaded mode

I was looking at example B3a so that I could play with MultiFunctionalDetectors. So I copied it directly from the Geant4 11.0.2 distribution, built it (the usual cmake, make in an empty build directory) and ran it using an input file from the distribution:
./exampleB3a exampleB3.in > exampleB3_my.out

I was expecting to get the same or similar output as exampleB3.out in the distribution. The numbers were not exactly the same but moderately similar (see attached files). However, my output shows that my example was running with 8 threads, while the distribution example appears to have run with one thread.

My main concern is that my example produced 8 root files scoring_t0.root, … scoring_t7.root and no merged file. I had assumed that between G4TScoreNtupleWriter and accumulableManager->Merge() they would be merged, but that is obviously not so.

(Note that in my output there are lines near the end that may have some significance:
… write file : scoring.root - done
… close file : scoring.root - done
… delete empty file : scoring.root - done)

exampleB3_my.out.txt (44.1 KB)

exampleB3.out.txt (10.2 KB)

So, is this the way B3a is supposed to behave “out of the box”? (I can easily merge the files afterwards using the Linux hadd command, but I’d prefer it to be automatic.)

Thanks for any help.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.