systematics module warning/crash at NLO

Bug #2046152 reported by Hannes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MadGraph5_aMC@NLO
Confirmed
Undecided
Unassigned
Lts
Fix Committed
Undecided
Unassigned

Bug Description

Hi,

for NLO runs only and for at least MG5 3.5.1 and 3.5.2 we observe warnings and (maybe related crashes) when using the systematics module with systematics_arguments.

For example, this line in the run card:
['--pdf=NNPDF30_nnlo_as_0118_hessian,PDF4LHC21_40,NNPDF31_nnlo_as_0118_hessian@0', '--muf=0.5,1,2', '--mur=0.5,1,2', '--dyn=-1'] = systematics_arguments

Will lead to the following warning:

Found unexpected entry in run_card: "systematics_argum" with value " ['--pdf=NNPDF30_nnlo_as_0118_hessian,PDF4LHC21_40,NNPDF31_nnlo_as_0118_hessian@0', '--muf=0.5,1,2', '--mur=0.5,1,2', '--dyn=-1'] ".
  The type was assigned to list of str.
  The definition of that variable will be automatically added to fortran file
  The value of that variable will be passed to the fortran code via fortran file

While longer systematics arguments lines appear to be cut off at different places, for example:

Found unexpected entry in run_card: "nnpdf30_nlo_as_0118_hessian,pdf4lhc" with value "['--weight_info=MUR%(mur).1f_MUF%(muf).1f_PDF%(pdf)i','--remove_wgts=".*MUR0.5_MUF2.0.*|.*MUR2.0_MUF0.5.*"','--pdf".

I attach a debug file from a run on my laptop that crashes. In other cases the calculation of systematics actually finishes successful (it appears) and we only get the warning.

Cheers,
Hannes

Revision history for this message
Hannes (hannes3) wrote :
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

In the debug file that you provide the error reported is that the folloaing program:

/usr/bin/python3 -O /home/hmildner/HEP/MG5_aMC_v3_5_2/test/bin/internal/systematics.py events.lhe.gz ./tmp_2_events.lhe.gz --pdf=NNPDF30_nnlo_as_0118_hessian,PDF4LHC21_40,NNPDF31_nnlo_as_0118_hessian@0 --muf=0.5,1,2 --mur=0.5,1,2 --dyn=-1 --start_event=5000 --stop_event=7500 --result=./log_sys_2.txt --lhapdf_config=lhapdf-config

is crashing.
Followed by a second crash related to lhapdf setup (which might just be the same error from another thread):
    self.log( "# Events generated with PDF: %s (%s)" %(self.orig_pdf.set().name,self.orig_pdf.lhapdfID ))
AttributeError: 'NoneType' object has no attribute 'set'

Where the issue is clearly lhapdf related. So this debug file seems related to a lhapdf setup issue....

For the "warning": Found unexpected entry in run_card: "systematics_argum" with value " ['--pdf=NNPDF30_nnlo_as_0118_hessian,PDF4LHC21_40,NNPDF31_nnlo_as_0118_hessian@0', '--muf=0.5,1,2', '--mur=0.5,1,2', '--dyn=-1'] ".
  The type was assigned to list of str.

I do not reproduce such error which might be related to the script that you use to update the run_card.dat.
Do you update that file by hand? do you use the "set" command (that's what I did/test) or do you use some kind of "homemade" bash script?
If this is the latest, can you check that the run_card is correctly written?

Cheers,

Olivier

Changed in mg5amcnlo:
status: New → Incomplete
Revision history for this message
Hannes (hannes3) wrote :

Hi,

ok, let's forget about the 2nd issue leading to a crash, probably due to a bad setup on my laptop.
The first one is popping up all over the place in ATLAS, so this is the one I am more worried about.

I attach a script that should reproduces the warning about the line.
The line is correct in the run card but wrong in the lhe file.

I now also wonder, how can it be that the systematics weights are fine if the LHE file doesn't contain the correct line? Does the python systematics module access the run card?

Cheers,
Hannes

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Hi,

OK thanks I can reproduce the problem now.
The problem seems related to the writting of the lhefile where a truncation occurs when writting the banner of the lhef file (the separate banner file is actually untrucated).

> I now also wonder, how can it be that the systematics weights are fine if the LHE file doesn't contain the correct line? Does the python systematics module access the run card?

Indeed, The systematics.py script does not parse the banner of the events file to get the parameters used by systematics.py
(as you can see the code is called via command line with many argument:)
/usr/bin/python3 -O /home/hmildner/HEP/MG5_aMC_v3_5_2/test/bin/internal/systematics.py events.lhe.gz ./tmp_2_events.lhe.gz --pdf=NNPDF30_nnlo_as_0118_hessian,PDF4LHC21_40,NNPDF31_nnlo_as_0118_hessian@0 --muf=0.5,1,2 --mur=0.5,1,2 --dyn=-1 --start_event=5000 --stop_event=7500 --result=./log_sys_2.txt --lhapdf_config=lhapdf-config

So this bug is mainly a problem that the lhef is not correctly documented, I do not think that this is going to lead to any crash/wrong physical modelling.

Cheers,

Olivier

Changed in mg5amcnlo:
status: Incomplete → Confirmed
Revision history for this message
Hannes (hannes3) wrote :

Thanks Olivier, then we will continue to ignore this warning :)
Happy holidays/end-of-year break!

Cheers,
Hannes

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Yes this is certainly fine.

Here is the proper patch:
https://github.com/mg5amcnlo/mg5amcnlo/commit/8b583ca07e7f2485e651d59776396700772fbe84

Cheers,

Olivier

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.