ImportError : No module named allmatrix2py

Bug #1768538 reported by ComplicatedPhenomenon
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MadGraph5_aMC@NLO
Invalid
Undecided
Unassigned

Bug Description

Hi, I'm new to these tools, actually I even don't know the effect caused by this error.
```
generate_events run_04
Traceback (most recent call last):
  File "/home/wm/MG5_aMC_v2_6_2/madgraph/interface/extended_cmd.py", line 1501, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/home/wm/MG5_aMC_v2_6_2/madgraph/interface/extended_cmd.py", line 1450, in onecmd_orig
    return func(arg, **opt)
  File "/home/wm/MG5_aMC_v2_6_2/madgraph/interface/madevent_interface.py", line 2467, in do_generate_events
    self.run_generate_events(switch_mode, args)
  File "/home/wm/MG5_aMC_v2_6_2/madgraph/interface/common_run_interface.py", line 6685, in new_fct
    original_fct(obj, *args, **opts)
  File "/home/wm/MG5_aMC_v2_6_2/madgraph/interface/madevent_interface.py", line 2559, in run_generate_events
    self.exec_cmd('reweight -from_cards', postcmd=False)
  File "/home/wm/MG5_aMC_v2_6_2/madgraph/interface/extended_cmd.py", line 1528, in exec_cmd
    stop = Cmd.onecmd_orig(current_interface, line, **opt)
  File "/home/wm/MG5_aMC_v2_6_2/madgraph/interface/extended_cmd.py", line 1450, in onecmd_orig
    return func(arg, **opt)
  File "/home/wm/MG5_aMC_v2_6_2/madgraph/interface/common_run_interface.py", line 2138, in do_reweight
    reweight_cmd.import_command_file(path)
  File "/home/wm/MG5_aMC_v2_6_2/madgraph/interface/extended_cmd.py", line 1643, in import_command_file
    self.exec_cmd(line, precmd=True)
  File "/home/wm/MG5_aMC_v2_6_2/madgraph/interface/extended_cmd.py", line 1528, in exec_cmd
    stop = Cmd.onecmd_orig(current_interface, line, **opt)
  File "/home/wm/MG5_aMC_v2_6_2/madgraph/interface/extended_cmd.py", line 1450, in onecmd_orig
    return func(arg, **opt)
  File "/home/wm/MG5_aMC_v2_6_2/madgraph/various/misc.py", line 100, in f_with_no_logger
    out = f(self, *args, **opt)
  File "/home/wm/MG5_aMC_v2_6_2/madgraph/interface/reweight_interface.py", line 487, in do_launch
    self.load_module()
  File "/home/wm/MG5_aMC_v2_6_2/madgraph/interface/reweight_interface.py", line 1726, in load_module
    mymod = __import__(mod_name, globals(), locals(), [],-1)
ImportError: No module named allmatrix2py
```

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote : Re: [Bug 1768538] [NEW] ImportError : No module named allmatrix2py
Download full text (5.8 KiB)

Thanks for the report,

I will double check to see if I can reproduce this issue locally (it will probably be not before Monday).
I might have more chance of success if you tell me,
1) your model
2) the process that you are using
3) which re-weighing you try to perform
4) which operating system you are using (and if not standard which version of python, numpy and gcc you are using)

Now the issue is related to the reweighting functionality.

That part of the code use a special method to evaluate the matrix-element since it use a python binding of a fortran code. (The reason is that such code is IO/parsing intensive and this is a nightmare to do in fortran but that the matrix-element needs to be in fortran for speed reason)

Looks like that such link fails to be created in your case.

Cheers,

Olivier

> On 2 May 2018, at 15:31, ComplicatedPhenomenon <email address hidden> wrote:
>
> Public bug reported:
>
>
> Hi, I'm new to these tools, actually I even don't know the effect caused by this error.
> ```
> generate_events run_04
> Traceback (most recent call last):
> File "/home/wm/MG5_aMC_v2_6_2/madgraph/interface/extended_cmd.py", line 1501, in onecmd
> return self.onecmd_orig(line, **opt)
> File "/home/wm/MG5_aMC_v2_6_2/madgraph/interface/extended_cmd.py", line 1450, in onecmd_orig
> return func(arg, **opt)
> File "/home/wm/MG5_aMC_v2_6_2/madgraph/interface/madevent_interface.py", line 2467, in do_generate_events
> self.run_generate_events(switch_mode, args)
> File "/home/wm/MG5_aMC_v2_6_2/madgraph/interface/common_run_interface.py", line 6685, in new_fct
> original_fct(obj, *args, **opts)
> File "/home/wm/MG5_aMC_v2_6_2/madgraph/interface/madevent_interface.py", line 2559, in run_generate_events
> self.exec_cmd('reweight -from_cards', postcmd=False)
> File "/home/wm/MG5_aMC_v2_6_2/madgraph/interface/extended_cmd.py", line 1528, in exec_cmd
> stop = Cmd.onecmd_orig(current_interface, line, **opt)
> File "/home/wm/MG5_aMC_v2_6_2/madgraph/interface/extended_cmd.py", line 1450, in onecmd_orig
> return func(arg, **opt)
> File "/home/wm/MG5_aMC_v2_6_2/madgraph/interface/common_run_interface.py", line 2138, in do_reweight
> reweight_cmd.import_command_file(path)
> File "/home/wm/MG5_aMC_v2_6_2/madgraph/interface/extended_cmd.py", line 1643, in import_command_file
> self.exec_cmd(line, precmd=True)
> File "/home/wm/MG5_aMC_v2_6_2/madgraph/interface/extended_cmd.py", line 1528, in exec_cmd
> stop = Cmd.onecmd_orig(current_interface, line, **opt)
> File "/home/wm/MG5_aMC_v2_6_2/madgraph/interface/extended_cmd.py", line 1450, in onecmd_orig
> return func(arg, **opt)
> File "/home/wm/MG5_aMC_v2_6_2/madgraph/various/misc.py", line 100, in f_with_no_logger
> out = f(self, *args, **opt)
> File "/home/wm/MG5_aMC_v2_6_2/madgraph/interface/reweight_interface.py", line 487, in do_launch
> self.load_module()
> File "/home/wm/MG5_aMC_v2_6_2/madgraph/interface/reweight_interface.py", line 1726, in load_module
> mymod = __import__(mod_name, globals(), locals(), [],-1)
> ImportError: No module named allmatrix2py
> ```
>
> ** Affects...

Read more...

Revision history for this message
ComplicatedPhenomenon (livelongandprosper) wrote :
Download full text (8.8 KiB)

Thanks for reply.

1) Standard model
2) e+e- > mu+ mu-
3)
4)Ubuntu 17.10

I got python2 and python3 both installed. That seems a problem which might cause that problem.

```
$ ./bin/mg5_aMC
  File "./bin/mg5_aMC", line 75
    print "For tab completion and history, install module readline."
                                                                   ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(print "For tab completion and history, install module readline.")?
$ python2.7 ./bin/mg5_aMC
************************************************************
* *
* W E L C O M E to *
* M A D G R A P H 5 _ a M C @ N L O *
* *
* *
* * * *
* * * * * *
* * * * * 5 * * * * *
* * * * * *
* * * *
* *
* VERSION 2.6.2 2018-04-29 *
* *
* The MadGraph5_aMC@NLO Development Team - Find us at *
* https://server06.fynu.ucl.ac.be/projects/madgraph *
* and *
* http://amcatnlo.web.cern.ch/amcatnlo/ *
* *
* Type 'help' for in-line help. *
* Type 'tutorial' to learn how MG5 works *
* Type 'tutorial aMCatNLO' to learn how aMC@NLO works *
* Type 'tutorial MadLoop' to learn how MadLoop works *
* *
************************************************************
load MG5 configuration from input/mg5_configuration.txt
fastjet-config does not seem to correspond to a valid fastjet-config executable (v3+). We will use fjcore instead.
 Please set the 'fastjet'variable to the full (absolute) /PATH/TO/fastjet-config (including fastjet-config).
 MG5_aMC> set fastjet /PATH/TO/fastjet-config

set lhapdf to /home/wm/MG5_aMC_v2_6_2/HEPTools/lhapdf6/bin/lhapdf-config
Using default eps viewer "evince". Set another one in ./input/mg5_configuration.txt
Loading default model: sm
INFO: Restrict model sm with file models/sm/restrict_default.dat .
INFO: Run "set stdout_level DEBUG" before import for more information.
INFO: Change particles name to pass to MG5 convention
Defined multiparticle p = g u c d s u~ c~ d~ s~
Defined multiparticle j = g u c d s u~ c~ d~ s~
Defined multiparticle l+ = e+ mu+
Defined multiparticle l- = e- mu-
Defined multiparticle vl = ve vm vt
Defined multiparticle vl~ = ve~ vm~ vt~
Defined multiparticle all = g u c d s u~ c~ d~ s~ a ve vm vt e- mu- ve~ vm~ vt~ e+ mu+ t b t~ b~ z w+ h w- ta- ta+
MG5_aMC>launch ~/ee
************************************************************
* ...

Read more...

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

Hi,

We do not support python3. so python2.7 is the correct choice.

I've check on my mac and the reweighting module works correctly.
I'm surprised that you do not specify what you want to do for the re-weighting. Leaving the default does not make any sense for that module.
If you do not need that module, I would advise to keep it in OFF state.

Cheers,

Olivier

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