error standalone output

Bug #1730971 reported by Jordy Degens
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MadGraph5_aMC@NLO
Fix Released
Undecided
Unassigned

Bug Description

I want to calculate matrix elements with madgraph_2_6_0 and use the following guide

https://cp3.irmp.ucl.ac.be/projects/madgraph/wiki/FAQ-General-4#Fulllibraryofprocessinpython

the command I use is:

import model HC_NLO_X0_UFO-heft

define p = g u c d s b u~ c~ d~ s~ b~
define j = g u c d s b u~ c~ d~ s~ b~

generate p p > X0 / t @0
add process p p > X0 j / t @1
add process p p > X0 j j / t @2
add process p p > X0 j j j / t @3

output standalone $CMSSW_BASE/src/CMSAachen3B/GeneratorTools/data/ggh --prefix=int

however when I create the standalone package I get the error
TypeError : subn() got an unexpected keyword argument 'flags'

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

Do you have the debug file associate to the crash?
This can be usefull

Can you also specify which python version you are using?

Thanks,

Olivier

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

Actually I have found the problem.

Here is a simple patch (using python2.7 would also solve the problem):

Thanks for the feedback.

Olivier

=== modified file 'madgraph/iolibs/export_v4.py'
--- madgraph/iolibs/export_v4.py 2017-09-14 22:17:09 +0000
+++ madgraph/iolibs/export_v4.py 2017-11-08 17:27:32 +0000
@@ -2270,7 +2270,8 @@

         if proc_prefix and os.path.exists(pjoin(dirpath, '..', 'check_sa.f')):
             text = open(pjoin(dirpath, '..', 'check_sa.f')).read()
- new_text, n = re.subn('smatrix', '%ssmatrix' % proc_prefix, text, flags=re.I)
+ pat = re.compile('smatrix', re.I)
+ new_text, n = re.subn(pat, '%ssmatrix' % proc_prefix, text)
             with open(pjoin(dirpath, 'check_sa.f'),'w') as f:
                 f.write(new_text)
             linkfiles.pop(0)

Changed in mg5amcnlo:
status: New → Fix Committed
Changed in mg5amcnlo:
status: Fix Committed → Fix Released
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.