ROOT Version:_ 6.24/02
Platform:Linux/Fedora 34
Compiler:gcc version 11.3.1 20220421
I have written a macro to use power of RDataFrame
’s multithreading. I am calling
ROOT::EnableImplicitMT()
and ROOT::EnableThreadSafety();
.
I want to execute the macro by loading the corresponding shared object file (.so) in two ways (1) at the prompt and (2) using a batch mode
(A) At the ROOT prompt I do:
.L my_macro_cxx.so;
my_macro(1,2);
Elapsed time : 00h:00m:9.10s
my_macro(1,3);
Elapsed time : 00h:00m:6.94s
my_macro(1,4);
Elapsed time : 00h:00m:7.32s
This works perfectly. But, in this case I have to wait to execute next command until the first execution is over. This is undesirable and requires that I monitor the execution.
To automate the above process, (2nd method), I have generated an input file (run_macro.txt).
(B) Then execute the following command:
root -l -b -q 'run_macro.txt'
Processing run_macro.txt...
Elapsed time : 00h:00m:8.11s
Error in <TReentrantRWLock::WriteUnLock>: Write lock already released for 0x2a02698
In this case, I get the error. Why?
[Note added:]
In fact, I observed that I am unable to execute any (including non-RDataFrame) macro as mentioned on the first line of page 27 of this document , at the bash prompt with,
root -l -b my_macro_cxx.so
I checked this on ROOT 6.30/02
also.
What is happening?