AttributeError: 'int' object has no attribute 'simplify' --invalid

Bug #947529 reported by William Shepherd
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MadGraph5_aMC@NLO
Invalid
Undecided
Unassigned

Bug Description

I've created a particularly simple model, SM plus a new scalar singlet chi. In importing the model I get the error:

mg5>import mindm
The import format was not given, so we guess it as model
models.import_ufo: load particles
models.import_ufo: load vertices
Command "import mindm" interrupted in sub-command:
"import model mindm" with error:
AttributeError : 'int' object has no attribute 'simplify'
Please report this bug on https://bugs.launchpad.net/madgraph5
More information is found in 'MG5_debug'.
Please attach this file to your report.

The contents of MG5_debug (less header) are:

import model sm
import model mindm
Traceback (most recent call last):
  File "/home/wshepherd/MadGraph5_v1_4_2/madgraph/interface/extended_cmd.py", line 405, in onecmd
    return cmd.Cmd.onecmd(self, line)
  File "/usr/lib/python2.6/cmd.py", line 219, in onecmd
    return func(arg)
  File "/home/wshepherd/MadGraph5_v1_4_2/madgraph/interface/cmd_interface.py", line 2441, in do_import
    self._curr_model = import_ufo.import_model(args[1])
  File "/home/wshepherd/MadGraph5_v1_4_2/models/import_ufo.py", line 98, in import_model
    model = import_full_model(model_path)
  File "/home/wshepherd/MadGraph5_v1_4_2/models/import_ufo.py", line 157, in import_full_model
    model = ufo2mg5_converter.load_model()
  File "/home/wshepherd/MadGraph5_v1_4_2/models/import_ufo.py", line 233, in load_model
    self.add_interaction(interaction_info, color_info)
  File "/home/wshepherd/MadGraph5_v1_4_2/models/import_ufo.py", line 415, in add_interaction
    if helas.name not in self.checked_lor]
  File "/home/wshepherd/MadGraph5_v1_4_2/aloha/aloha_fct.py", line 32, in check_flow_validity
    expr = expr.simplify()
AttributeError: 'int' object has no attribute 'simplify'
Value of current Options:
              web_browser : None
              text_editor : None
          pythia-pgs_path : ./pythia-pgs
                  td_path : ./td
            cluster_queue : madgraph
             cluster_type : condor
         madanalysis_path : ./MadAnalysis
             delphes_path : ./Delphes
         fortran_compiler : None
                  nb_core : None
      exrootanalysis_path : ./ExRootAnalysis
               eps_viewer : None
   automatic_html_opening : True
             pythia8_path : None
                 run_mode : 0
       group_subprocesses : Auto
ignore_six_quark_processes : False

I have attached the model folder I'm using. It's very likely that I've simply formatted something incorrectly for my model, but I can't spot the error.

Thanks for your help,

Will Shepherd

Revision history for this message
William Shepherd (will-shepherd) wrote :
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Hi Will,

I can not reproduce your error with the model that you attach.
so could you check that this indeed happens with your model after removing ./mindm/model.pkl

This are the outputs that I obtained:

with MG5 1.4.2 (current release)
I have the following output:
models.import_ufo: load particles
WARNING: Property spin cannot be changed:Spin 0 is smaller than one
models.import_ufo: load vertices
models.import_ufo: Restrict model ../1.4.3/models/mindm with file ../1.4.3/models/mindm/restrict_default.dat .
Command "import model ../1.4.3/models/mindm" interrupted with error:
NameError : name 'GCHI' is not defined
Please report this bug on https://bugs.launchpad.net/madgraph5
More information is found in 'MG5_debug'.
Please attach this file to your report.

and with MG5 1.4.3 (the current beta version)
WARNING: Property spin cannot be changed:Spin 0 is smaller than one
models.import_ufo: load vertices
models.import_ufo: Restrict model mindm with file models/mindm/restrict_default.dat .
Error detected in "import model mindm"
write debug file MG5_debug
If you need help with this issue please contact us on https://answers.launchpad.net/madgraph5
MadGraph5Error : Invalid restriction card (not same block)
                 set(['mass', 'wolfenstein', 'yukawa', 'sminputs', 'decay']) != set(['wolfenstein', 'yukawa', 'decay', 'mass', 'dminputs', 'sminputs'])

The Warning is in this case VERY problematic. This is due that UFO use the 2*S+1 convention for the spin.
the spin of a scalar is therefore 1 and not 0. (In this case since 0 is not allowed we kept the default (1) so by luck this is fine in your case)

Both the error reported in 1.4.2 and 1.4.3 are linked to the restriction card which are not valid.
If I bypassed this (by doing
import model mindm-full)
then the import of the model works fine.

Concerning the actual problem that you point (and that I can not reproduce), this error can occur only if
1) They are vertex a with at least one fermion.
2) The Lorentz structure is a number.
Such lorentz structure is not possible in presence of fermion, so this is probably due to a wrong model implementation (that's why I ask you to cross-check if you give me the correct model).

One last advice, when you develop a model:
1) remove all the restrict_xxx.dat file
2) run mg5 in debug mode
./bin/mg5 --debug

Cheers,

Olivier

Changed in madgraph5:
status: New → Triaged
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Hi Will,

I'll close this bug.
If you still have problem, don't hesitate to re-open it.

Cheers,

Olivier

Changed in madgraph5:
status: Triaged → Invalid
summary: - AttributeError: 'int' object has no attribute 'simplify'
+ AttributeError: 'int' object has no attribute 'simplify' --invalid
Revision history for this message
William Shepherd (will-shepherd) wrote : Re: [Bug 947529] Re: AttributeError: 'int' object has no attribute 'simplify'
Download full text (3.9 KiB)

Olivier,

Thanks for your help. I have a very hectic schedule at the moment and so
haven't found the time to check out your suggestions. I'll let you know
what the result is.

Thanks again,

Will
On Mar 8, 2012 10:11 AM, "Olivier Mattelaer" <email address hidden>
wrote:

> Hi Will,
>
> I'll close this bug.
> If you still have problem, don't hesitate to re-open it.
>
> Cheers,
>
> Olivier
>
> ** Changed in: madgraph5
> Status: Triaged => Invalid
>
> ** Summary changed:
>
> - AttributeError: 'int' object has no attribute 'simplify'
> + AttributeError: 'int' object has no attribute 'simplify' --invalid
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/947529
>
> Title:
> AttributeError: 'int' object has no attribute 'simplify' --invalid
>
> Status in The MadGraph Matrix Element Generator version 5:
> Invalid
>
> Bug description:
> I've created a particularly simple model, SM plus a new scalar singlet
> chi. In importing the model I get the error:
>
> mg5>import mindm
> The import format was not given, so we guess it as model
> models.import_ufo: load particles
> models.import_ufo: load vertices
> Command "import mindm" interrupted in sub-command:
> "import model mindm" with error:
> AttributeError : 'int' object has no attribute 'simplify'
> Please report this bug on https://bugs.launchpad.net/madgraph5
> More information is found in 'MG5_debug'.
> Please attach this file to your report.
>
> The contents of MG5_debug (less header) are:
>
> import model sm
> import model mindm
> Traceback (most recent call last):
> File
> "/home/wshepherd/MadGraph5_v1_4_2/madgraph/interface/extended_cmd.py", line
> 405, in onecmd
> return cmd.Cmd.onecmd(self, line)
> File "/usr/lib/python2.6/cmd.py", line 219, in onecmd
> return func(arg)
> File
> "/home/wshepherd/MadGraph5_v1_4_2/madgraph/interface/cmd_interface.py",
> line 2441, in do_import
> self._curr_model = import_ufo.import_model(args[1])
> File "/home/wshepherd/MadGraph5_v1_4_2/models/import_ufo.py", line 98,
> in import_model
> model = import_full_model(model_path)
> File "/home/wshepherd/MadGraph5_v1_4_2/models/import_ufo.py", line 157,
> in import_full_model
> model = ufo2mg5_converter.load_model()
> File "/home/wshepherd/MadGraph5_v1_4_2/models/import_ufo.py", line 233,
> in load_model
> self.add_interaction(interaction_info, color_info)
> File "/home/wshepherd/MadGraph5_v1_4_2/models/import_ufo.py", line 415,
> in add_interaction
> if helas.name not in self.checked_lor]
> File "/home/wshepherd/MadGraph5_v1_4_2/aloha/aloha_fct.py", line 32, in
> check_flow_validity
> expr = expr.simplify()
> AttributeError: 'int' object has no attribute 'simplify'
> Value of current Options:
> web_browser : None
> text_editor : None
> pythia-pgs_path : ./pythia-pgs
> td_path : ./td
> cluster_queue : madgraph
> cluster_type : condor
> madanalysis_path : ./MadAnalysis
> ...

Read more...

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

Other bug subscribers

Bug attachments

Remote bug watches

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