Madspin failure in onshell mode due to DEFAULT_F2PY_COMPILER
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MadGraph5_aMC@NLO |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Dear MG5 team,
I was trying to run madspin with onshell mode but I got following error so I'm leaving a report here.
MG5 version: 2.6.0
MG5 command:
import model MSSM_SLHA2
output p p > go go
launch
(turn on madspin only)
madspin_card.dat (only changed commands are written):
set spinmode onshell
define qq = u u~ d d~ s s~ c c~ b b~
decay go > qq qq n1
Madspin output:
*******
* *
* W E L C O M E to M A D S P I N *
* *
*******
INFO: Extracting the banner ...
INFO: process: p p > go go
INFO: options:
INFO: detected model: MSSM_SLHA2. Loading...
set spinmode onshell # Use one of the madspin special mode
set max_weight_ps_point 400 # number of PS to estimate the maximum for each event
define qq = u u~ d d~ s s~ c c~ b b~
define qq = u u~ d d~ s s~ c c~ b b~
Defined multiparticle qq = u d s c u~ d~ s~ c~ b b~
decay go > qq qq n1
decay t > w+ b, w+ > all all
decay t~ > w- b~, w- > all all
decay w+ > all all
decay w- > all all
decay z > all all
launch
INFO: Will use seed 534609587
INFO: generate 64000 decay event for particle go
INFO: generating the production square matrix element
INFO: generating the full matrix element squared (with decay)
INFO: generate matrix element for decay only (1 - > N).
INFO: output standalone /disk2/
INFO: Done 80.91
INFO: Compiling code
INFO: Compiling code stage 1
INFO: Compiling code stage 2
INFO: Compiling code path /disk2/
Error detected in "generate_events run_04"
write debug file /disk2/
If you need help with this issue please contact us on https:/
MadGraph5Error : A compilation Error occurs when trying to compile /disk2/
The compilation fails with the following output message:
cd P2_gg_gogo_
cd P2_gg_gogo_
cd P2_gg_gogo_
cd P2_gg_gogo_
cd P2_gg_gogo_
cd P2_gg_gogo_
(....)
make: *** [P2_uux_
{'cpp': 'g++', 'fortran': 'gfortran', 'f2py': 'f2py'} -L../../lib/ -ldhelas -lmodel -c matrix.f -m matrix2py --f77exec=gfortran
make: *** [P2_uux_
{'cpp': 'g++', 'fortran': 'gfortran', 'f2py': 'f2py'} -L../../lib/ -ldhelas -lmodel -c matrix.f -m matrix2py --f77exec=gfortran
{'cpp': 'g++', 'fortran': 'gfortran', 'f2py': 'f2py'} -L../../lib/ -ldhelas -lmodel -c matrix.f -m matrix2py --f77exec=gfortran
{'cpp': 'g++', 'fortran': 'gfortran', 'f2py': 'f2py'} -L../../lib/ -ldhelas -lmodel -c matrix.f -m matrix2py --f77exec=gfortran
/bin/bash: {cpp:: command not found
(....)
make[1]: Leaving directory `/disk2/
make: *** [P2_ccx_
make: *** [P2_ccx_
/bin/bash: {cpp:: command not found
make: *** [P2_ccx_
make[1]: *** [matrix2py.so] 오류 127
make[1]: Leaving directory `/disk2/
make: *** [P2_ccx_
Please try to fix this compilations issue and retry.
Help might be found at https:/
If you think that this is a bug, you can report this at https:/
Following two lines look relevant for this failure
{'cpp': 'g++', 'fortran': 'gfortran', 'f2py': 'f2py'} -L../../lib/ -ldhelas -lmodel -c matrix.f -m matrix2py --f77exec=gfortran
/bin/bash: {cpp:: command not found
So I trace back Madspin ME compilation code [MG5_process]
include ../../Source/
(......)
matrix$
touch __init__.py
$(F2PY) $(LINKLIBS) -c matrix.f -m matrix$(MENUM)py --f77exec=$(FC)
and reached [MG5_process]
DEFAULT_
This should be f2py but may I know why the dictionary is pasted here?
Is this a bug or my misconfiguration of MG5?
Best wishes,
Sung Hak
Changed in mg5amcnlo: | |
status: | New → Fix Committed |
Changed in mg5amcnlo: | |
status: | Fix Committed → Fix Released |
Dear MG5 team,
I just trace back code more deeper and found a location of bug origin:
[MG5]/madgraph/ iolibs/ export_ v4.py:
from line 1740: compiler[ 'f2py'] and misc.which( default_ compiler[ 'f2py'] ):
f2py_ compiler = default_compiler
# Try to find the correct one.
if default_
['f2py'] is missing there so f2py_compiler is just replaced by a dictionary.
after then, f2py compiler is propagated well into make_opts.
I also just noticed that this bug report is duplication of https:/ /answers. launchpad. net/mg5amcnlo/ +question/ 657970 .
======= ======= ======= ======= ======= ======= ======= ======= ======= =====
However, I got another bug:
Command "generate_events run_16" interrupted with error: /bugs.launchpad .net/mg5amcnlo starlight/ Pub_Event_ MG5/gogo_ m400/test/ run_16_ tag_1_debug. log'.
AttributeError : 'module' object has no attribute 'initialise'
Please report this bug on https:/
More information is found in '/disk2/
Please attach this file to your report.
The debug log contains:
(....) starlight/ Programs/ MG5_aMC_ v2_6_0/ MadSpin/ interface_ madspin. py", line 1386, in get_maxwgt_ for_onshell onshell_ evt_and_ wgt(base_ event, decays) starlight/ Programs/ MG5_aMC_ v2_6_0/ MadSpin/ interface_ madspin. py", line 1430, in get_onshell_ evt_and_ wgt matrix_ element( production) starlight/ Programs/ MG5_aMC_ v2_6_0/ MadSpin/ interface_ madspin. py", line 1471, in calculate_ matrix_ element initialise( pjoin(self. path_me, 'Cards' ,'param_ card.dat' ))
File "/home/
_, wgt = self.get_
File "/home/
production_me = self.calculate_
File "/home/
mymod.
AttributeError: 'module' object has no attribute 'initialise'
If I see code [MG5]/MadSpin/ interface_ madspin. py", line 1471,
mymod = __import_ _("%s.matrix2py " % (pdir))
reload( mymod) pjoin(self. path_me, 'madspin_me', 'SubProcesses', pdir)):
with misc.stdchannel _redirected( sys.stdout, os.devnull):
mymod. initialise( pjoin(self. path_me, 'Cards' ,'param_ card.dat' ))
self. all_f2py[ pdir] = mymod.get_me matrix_ element( event)
mymod = getattr(mymod, 'matrix2py')
with misc.chdir(
return self.calculate_
but matrix.f does not contain subroutine initialise and get_me.
For initialise, I can be changed into subroutine intitializemodel
For get_me, I don't know which is a correct replacement, but guessing from line which calling this module:
if event[0].color1 == 599 and event.aqcd==0:
return self.all_ f2py[pdir] (p, 0.113, 0)
return self.all_ f2py[pdir] (p, event.aqcd, 0)
else:
I replaced it into subroutine get_value, i.e.
mymod = __import_ _("%s.matrix2py " % (pdir))
reload( mymod) pjoin(self. path_me, 'madspin_me', 'SubProcesses', pdir)):
with misc.stdchannel _redirected( sys.stdout, os.devnull):
mymod. initialisemodel (pjoin( self.path_ me, 'Cards' ,'param_ card.dat' ))
self. all_f2py[ pdir] = mymod.get_value matrix_ element( event)
mymod = getattr(mymod, 'matrix2py')
with misc.chdir(
return self.calculate_
May I kno...