Rare failure on NLO event generation at collecting events stage

Asked by Sung Hak Lim

Dear MG5 team,

I sometimes have following errors on NLO event generations:

MG5 version: 2.5.4

INFO: Collecting events
At line 556 of file collect_events.f
Fortran runtime error: Bad real number in item 3 of list input
Error detected in "launch auto "
write debug file /disk2/starlight/mg_NLO/04_t1t1_600_550/mg5_events/t1t1j_nlo_0100/run_06_tag_1_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

The error looks likely caused by trailing e's in string120 variable in subroutine get_xsec in file collect_events.f.

P0_gu_t1t1xu_no_ululururdldldrdrslslsrsrclclcrcrb1b1b2b2t2t2go/GF4/events.lhe.rwgt 9 1.631264e-03 1.000000e

Runs without error having string120 variable without trailing e.

P0_uux_t1t1xg_no_ululururdldldrdrslslsrsrclclcrcrb1b1b2b2t2t2go/GF7/events.lhe.rwgt 10 1.765398e-03 1.00000

After then, get_xsec routine fails to retrive xsecfrac variable and program crashes.

May I know where string120 variable and this e came from?

Best wishes,
Sung Hak

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Olivier Mattelaer
Solved:
Last query:
Last reply:
Revision history for this message
Sung Hak Lim (sunghak-lim) said :
#1

Dear MG5 team,

I just noticed that this happened because of 120 char limit on character*120 string120 variable.

It looks like exponent part is missing in above examples. If I increase string120 variable type into character*240, I can see expoenents.

Since the last number seems to be contains xsec fraction for each process, it could be serious bug for NLO event combination..

Could you check this?

Best wishes,
Sung Hak Lim

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#2

Did you just change the definition length?
Or did you change the following as wel?

=== modified file 'Template/NLO/SubProcesses/collect_events.f'
--- Template/NLO/SubProcesses/collect_events.f 2016-02-24 12:45:15 +0000
+++ Template/NLO/SubProcesses/collect_events.f 2017-06-22 14:15:57 +0000
@@ -1,6 +1,6 @@
       program collect_events
       implicit none
- character*120 string120,eventfile
+ character*512 string512,eventfile
       character*19 basicfile,nextbasicfile
       character*15 outputfile
       integer istep,i,numoffiles,nbunches,nevents,ievents,junit(80)
@@ -65,9 +65,9 @@
       nevents=0
       xtotal=0.d0
       do while (.true.)
- read(10,'(120a)',err=2,end=2) string120
- eventfile=string120(2:index(string120,' '))
- read(string120(index(string120,' '):120),*)
+ read(10,'(120a)',err=2,end=2) string512
+ eventfile=string512(2:index(string512,' '))
+ read(string512(index(string512,' '):512),*)
      $ ievents,absxsec,xsecfrac
          if (ievents.eq.0) cycle
          nevents=nevents+ievents

I think the second change is as much important as the first.
(Now going to 512 is probably an overkill but ok)

Cheers,

Olivier

> On 22 Jun 2017, at 14:37, Sung Hak Lim <email address hidden> wrote:
>
> Question #644494 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/644494
>
> Sung Hak Lim posted a new comment:
> Dear MG5 team,
>
> I just noticed that this happened because of 120 char limit on
> character*120 string120 variable.
>
> It looks like exponent part is missing in above examples. If I increase
> string120 variable type into character*240, I can see expoenents.
>
> Since the last number seems to be contains xsec fraction for each
> process, it could be serious bug for NLO event combination..
>
> Could you check this?
>
> Best wishes,
> Sung Hak Lim
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Sung Hak Lim (sunghak-lim) said :
#3

Hi Olivier,

I also modified read(10,'(120a)', ... -> read(10,'(512a)', ... also as well as 512 index range setting for reading also.

Is this modification fine? Does it affect other parts of MG5?

512 is overkilling unless you kill 100 kinds of intermediate particle appearing virtually (...) and making very long name for processes.
It looks already sufficient to me.

Best wishes,
Sung Hak

Revision history for this message
Best Olivier Mattelaer (olivier-mattelaer) said :
#4

Hi,

thanks for having spot the read statement that I missed to changed.

Indeed 512 is an overkill but this will have 0 impact on memory so I prefer to be agressive.

Thanks,

Olivier

Revision history for this message
Sung Hak Lim (sunghak-lim) said :
#5

Thanks Olivier Mattelaer, that solved my question.