Problem with collecting events

Asked by Josh McFayden

Hi all,

I'm having a problem generating events from a NLO "gridpack". The integration (with nevents=0) seemed to run with no problems (I am running in cluster mode on our SGE cluster).

But then when I try to generate events with:
bin/generate_events --parton --nocompile --only_generation -f

I see the following error:

...
INFO: Collecting events
At line 278 of file handling_lhe_events.f
Fortran runtime error: Bad integer for item 1 in list input
Error detected in "launch --parton --nocompile --only_generation -f"
write debug file /scratch/scratch/ucapmcf/mcgen/NLOMerging/ZJets/pp_Zjets_012_7TeVNoWgt/run_03_tag_1_debug.log
If you need help with this issue please contact us on https://answers.launchpad.net/madgraph5
aMCatNLOError : An error occurred during event generation. The event file has not been created. Check collect_events.log

This is the contents of collect_events.log:

 Overwrite the event weights?
 give '0' to keep original weights;
 give '1' to overwrite the weights to sum to the Xsec;
 give '2' to overwrite the weights to average to the Xsec (=default)
 give '3' to overwrite the weights to either +/- 1.
           2
 step # 0
 found 80 files, bunch number is 1
 found 80 files, bunch number is 2
 found 80 files, bunch number is 3
 found 63 files, bunch number is 4
 More than 1 bunch, doing next step 1
 step # 1
 found 4 files, bunch number is 1

You can find the "gridpack" here:
http://mcfayden.web.cern.ch/mcfayden/test/pp_Zjets_012_7TeVNoWgt.tar.gz

I am using v2.2.1.

With the exact same setup I generated the 0-jet process and and everything seems to run fine...

Any ideas?

Best,

Josh.

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
marco zaro Edit question
Solved by:
marco zaro
Solved:
Last query:
Last reply:
Revision history for this message
marco zaro (marco-zaro) said :
#1

Hi Josh,
can you confirm that line 278 of SubProcesses/handling_lhe_events.f is
        if(index(string,'= nevents').ne.0) read(string,*)nevents,string0
?
If so, you should have inside SubProcesses some files called allevents*
can you grep them for the string '= nevents' and tell me what you get?

Thanks,

MArco

Revision history for this message
Josh McFayden (mcfayden) said :
#2

Hi Marco,

Thanks a lot for the fast response!

Yes, I have exactly that on line 278 of SubProcesses/handling_lhe_events.f

Doing the grep I get this:

@login09 pp_Zjets_012_7TeVNoWgt >: grep nevents SubProcesses/allevents_*
SubProcesses/allevents_0_001:# 5000000 = nevents
SubProcesses/allevents_0_001: 8891 = nevents
SubProcesses/allevents_0_001: 0.002 = req_acc ! Required accuracy (-1=auto determined from nevents
SubProcesses/allevents_0_002:# 5000000 = nevents
SubProcesses/allevents_0_002: 794 = nevents
SubProcesses/allevents_0_002: 0.002 = req_acc ! Required accuracy (-1=auto determined from nevents
SubProcesses/allevents_0_003:# 5000000 = nevents
SubProcesses/allevents_0_003: 232 = nevents
SubProcesses/allevents_0_003: 0.002 = req_acc ! Required accuracy (-1=auto determined from nevents
SubProcesses/allevents_0_004:# 5000000 = nevents
SubProcesses/allevents_0_004: 83 = nevents
SubProcesses/allevents_0_004: 0.002 = req_acc ! Required accuracy (-1=auto determined from nevents

Cheers,

Josh.

Revision history for this message
Best marco zaro (marco-zaro) said :
#3

Hmmmmm….
It can be that the commented line
# 5000000 = nevents
causes some problems…
Can you remove it from the run_card?
Or (that would be the fix), rerun the event generation modifying handling_lhe_events.f
adding, right after the line 277
        read(ifile,'(a)')string

this check
                  if (string(1:1).eq.’#’) cycle

Let me know….
Cheers,

Marco

On 18 Nov 2015, at 15:57, Josh McFayden <email address hidden> wrote:

> Question #274667 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/274667
>
> Status: Needs information => Open
>
> Josh McFayden gave more information on the question:
> Hi Marco,
>
> Thanks a lot for the fast response!
>
> Yes, I have exactly that on line 278 of
> SubProcesses/handling_lhe_events.f
>
> Doing the grep I get this:
>
> @login09 pp_Zjets_012_7TeVNoWgt >: grep nevents SubProcesses/allevents_*
> SubProcesses/allevents_0_001:# 5000000 = nevents
> SubProcesses/allevents_0_001: 8891 = nevents
> SubProcesses/allevents_0_001: 0.002 = req_acc ! Required accuracy (-1=auto determined from nevents
> SubProcesses/allevents_0_002:# 5000000 = nevents
> SubProcesses/allevents_0_002: 794 = nevents
> SubProcesses/allevents_0_002: 0.002 = req_acc ! Required accuracy (-1=auto determined from nevents
> SubProcesses/allevents_0_003:# 5000000 = nevents
> SubProcesses/allevents_0_003: 232 = nevents
> SubProcesses/allevents_0_003: 0.002 = req_acc ! Required accuracy (-1=auto determined from nevents
> SubProcesses/allevents_0_004:# 5000000 = nevents
> SubProcesses/allevents_0_004: 83 = nevents
> SubProcesses/allevents_0_004: 0.002 = req_acc ! Required accuracy (-1=auto determined from nevents
>
> Cheers,
>
> Josh.
>
> --
> You received this question notification because you are subscribed to
> the question.

Revision history for this message
Josh McFayden (mcfayden) said :
#4

Hi Marco,

Yes, removing the commented line fixes the problem, thanks a lot!
I will also try the extra check in handling_lhe_events.f and let you know.

Thanks again!

Josh.

Revision history for this message
Josh McFayden (mcfayden) said :
#5

Thanks marco zaro, that solved my question.

Revision history for this message
Josh McFayden (mcfayden) said :
#6

Yes, the additional check for commented lines in handling_lhe_events.f also works.
Thanks Marco!

Revision history for this message
Richard Ruiz (rruiz) said :
#7

Hi Folks,

Just an FYI. This is still an issue for v2.6.2. Specifically, if I have in my run_card.dat file
# nevents = ANYTHING

then the following crash occurs:
...
INFO: Idle: 0, Running: 0, Completed: 127 [ 0.27s ]
INFO: Collecting events
At line 311 of file handling_lhe_events.f
Fortran runtime error: Bad integer for item 1 in list input
Error detected in "launch auto "
write debug file /.../SM_pp_lllv_NLO/run_06_pp_lllv_NLO_LHC14_debug.log
If you need help with this issue please contact us on https://answers.launchpad.net/mg5amcnlo
aMCatNLOError : An error occurred during event generation. The event file has not been created. Check collect_events.log
quit
INFO:

The log file is essentially the same as reported above.

cheers

Revision history for this message
marco zaro (marco-zaro) said :
#8

Hi Richard,
what do you write in the run_card for nevents? do you put the string 'ANYTHING'?
If so, why?

Best,

Marco

Revision history for this message
Richard Ruiz (rruiz) said :
#9

Hi Marco,

Thanks for responding so quickly! My comment above is really just for posterity, in case people still run into the issue. I learned from Olivier that the issue is a bit tricky to resolve since this is essentially parsing by Fortran.

In any case, to clarify, what I actually modify is Template/NLO/Cards/run_card.dat with the following (among other personal preferences):
# %(nevents)s = nevents ! Number of unweighted events requested
100 = nevents ! Number of unweighted events requested

I figured it was more pragmatic to keep reference to %(nevents)s in case I ever wanted to have fun with it. However, it is now deleted, as are instances to "# nevents" in my run_card_default.dat files.

cheers