Hi,
I want to run preSel.py on the whole MC samples for a process and so I set the
fraction equal to 1 in the preSel.py:
For some samples like “p8_ee_WW_ecm” , by running the code I get the following error:
#raise OSError(‘Failed to open file {}’.format(args[0]))
However, for the lower fraction such as
fraction= 0.3, the preSel.py is running perfectly without any error.
I get this error for some sample
Any help would be appreciated.
Thanks
Seddigheh
Hey Seddigheh,
Have you tried running on a fraction of 0.99, 0.999, or something like that? Since you cannot run preSel.py on a part of a file, if you pick such a fraction, you should be able to make ntuples using all the files.
It’s not a solution, but a trick that has worked for me with certain samples.
I have tried to make ntuples for a fraction=0.5, and what it actually gives me is ntuples for half the files + 1 more file.
Hope it helps
-Kunal
hello @kgautam @stizchan ,
I never observed such issue with the samples I used. Could you provide a simple reproducer such that we find the issue?
It might just be a small “bug” in the counting logic or somehting like that.
Hi @clement.helsens
Just to explain what I meant, when I use the following in my preSel.py file:
process_list=['p8_ee_Zuds_ecm91']
fraction=0.0006
which should correspond to 600,000 events; I get one extra file of 100,000 events (since each file of Zuds is 100,000 events) in my ntuples:
About to run process p8_ee_Zuds_ecm91 with 700000 events
But when I use a fraction=0.00059
instead, I get the expected 600,000 events. I had assumed that it was a bug in the counting logic and that you cannot use part of a file but all the events in a file. Seems like there might be a <
instead of <=
somewhere.
Please let me know if that’s not clear enough.
-Kunal
What you explain makes sense @kgautam , and I think I know where this is coming from. What is more surprising is what @stizchan described when trying fraction=1
Yes, I made an assumption that the error might be occurring due to the same reason, but it was actually incorrect. I just tried with a fraction=1
and didn’t get any errors.
My apologies. Should I delete the replies since they are irrelevant?
Dear Clement and Kunal,
Thanks a lot for your answers. As you suggested I have checked the “fraction=1” as well as “fraction=0.9” for the same sample on a simple code requiring a fewer number of objects and branches which works properly.
However, by increasing the number of branches (almost 200), I got the same error, and a final root file is generated but it is corrupted. There is enough free space in the output directory.
Is there a limitation in output file size?
Best
Seddigheh