Two errors: use_syst and jet matching in multicore run
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MadGraph5_aMC@NLO |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Using Python3 versions of madgraph, v2.7.3.py3 and v2.8.3.2, I found the following two independent errors.
The sample script is simple:
------------------
generate p p > t t~
add process p p > t t~ j
output TEST
launch TEST
shower=Pythia8
done
set run_card nevents 500
done
------------------
1. Error in turning off use_syst:
When I added the following in the above madevent run,
set run_card use_syst False
An error is raised:
MG5_aMC_
in setup_Pythia8Ru
if scale<(
TypeError: '<' not supported between instances of 'str' and 'float'
The reason is the following:
MG5_aMC_
for scale in PY8_Card[
if scale<(
'One of the MLM merging qCut parameter you chose (%f) in the variation list'%scale+¥
" (either via 'SysCalc:qCutList' in the PY8 shower card or "+¥
' the run_card parameter (=%f)¥n'
'It would be better/safer to use a larger qCut or a smaller xqcut.')
When self.run_
2. Error in calculating merged cross sections at jet matching with multicore run
When I tried to perform a multicore run for the jet matching, for instance at N core runs, the final merged cross section becomes N times larger than the result of the single core run. I checked this happening in Mac and Ubuntu, and found out the reason; the Pythia card parameters are stored doubly in 'ParallelPY8Card' after 'copy.copy' at madevent_
MG5_aMC_
class ConfigFile(dict):
""" a class for storing/dealing with input file.
"""
def __init__(self, finput=None, **opt):
a file, a path to a file, or simply Nothing"""
if isinstance(finput, self.__class__):
for key in finput.__dict__:
for key,value in finput.items():
return
else:
When ConfigFile is copied by copy.copy, for example, ParallelPY8Card = copy.copy(
for key in finput.__dict__:
for key,value in finput.items():
return
where I added dict.__
I hope these two reports would be helpful for you.
Best,
Motoi
Changed in mg5amcnlo: | |
status: | New → Fix Committed |
Changed in mg5amcnlo: | |
status: | Fix Committed → Fix Released |
Hi,
Thanks a lot for those bug report and investigation on those, this is very helpful.
I was not aware of the first one and will investigate it.
The second bug was actually already identified and already fixed in the latest version of the code.
Thanks,
Olivier
> On 27 Feb 2021, at 08:27, Motoi Endo <email address hidden> wrote: v2_8_3_ 2/madgraph/ interface/ madevent_ interface. py: line 4068 nAndCard 1.5*self. run_card[ 'xqcut' ]): v2_8_3_ 2/madgraph/ interface/ madevent_ interface. py: line 4064- 'SysCalc: qCutList' ]: 1.5*self. run_card[ 'xqcut' ]): %self.run_ card['xqcut' ]+ card['use_ syst'] is False and PY8_Card[ 'SysCalc: qCutList' ] interface. py: line 4439. This problem originates in v2_8_3_ 2/madgraph/ various/ banner. py: line 968- getattr( finp...
>
> Public bug reported:
>
> Using Python3 versions of madgraph, v2.7.3.py3 and v2.8.3.2, I found the following two independent errors.
> The sample script is simple:
>
> ------------------
> generate p p > t t~
> add process p p > t t~ j
> output TEST
>
> launch TEST
> shower=Pythia8
> done
> set run_card nevents 500
> done
> ------------------
>
> 1. Error in turning off use_syst:
>
> When I added the following in the above madevent run,
>
> set run_card use_syst False
>
> An error is raised:
>
> MG5_aMC_
> in setup_Pythia8Ru
>
> if scale<(
>
> TypeError: '<' not supported between instances of 'str' and 'float'
>
> The reason is the following:
>
> MG5_aMC_
>
> for scale in PY8_Card[
> if scale<(
> logger.error(
> 'One of the MLM merging qCut parameter you chose (%f) in the variation list'%scale+¥
> " (either via 'SysCalc:qCutList' in the PY8 shower card or "+¥
> "'sys_matchscale' in the run_card) is less than 1.5*xqcut, where xqcut is"+
> ' the run_card parameter (=%f)¥n'
> 'It would be better/safer to use a larger qCut or a smaller xqcut.')
>
> When self.run_
> is 'auto' (default setting), the line 4065 ('if scale<(1.5*...') raises
> an error because the parameter 'scale' in the line 4064 becomes 'auto',
> whose type is 'str', and compared with a 'float' type object. (This
> error is not raised in Python2 because 'str' is allowed to be compared
> with 'float'.)
>
> 2. Error in calculating merged cross sections at jet matching with
> multicore run
>
> When I tried to perform a multicore run for the jet matching, for
> instance at N core runs, the final merged cross section becomes N times
> larger than the result of the single core run. I checked this happening
> in Mac and Ubuntu, and found out the reason; the Pythia card parameters
> are stored doubly in 'ParallelPY8Card' after 'copy.copy' at
> madevent_
> 'ConfigFile' in banner.py:
>
> MG5_aMC_
>
> class ConfigFile(dict):
> """ a class for storing/dealing with input file.
> """
>
> def __init__(self, finput=None, **opt):
> """initialize a new instance. input can be an instance of MadLoopParam,
> a file, a path to a file, or simply Nothing"""
>
> if isinstance(finput, self.__class__):
> dict.__init__(self, finput)
> for key in finput.__dict__:
> setattr(self, key, copy.copy(