compute_widths Memory Error

Asked by teddym

Hi:
    When I use the command compute_widths to compute the width for some particles in mssm-full model, the madgraph crashed and display
    MemoryError

The message in MG5_DEBUG is

Traceback (most recent call last):
  File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/interface/extended_cmd.py", line 872, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/interface/extended_cmd.py", line 865, in onecmd_orig
    return func(arg, **opt)
  File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/interface/master_interface.py", line 311, in do_compute_widths
    return self.cmd.do_compute_widths(self, *args, **opts)
  File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/interface/madgraph_interface.py", line 5891, in do_compute_widths
    self.exec_cmd('output %s -f' % decay_dir)
  File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/interface/extended_cmd.py", line 912, in exec_cmd
    stop = Cmd.onecmd_orig(current_interface, line, **opt)
  File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/interface/extended_cmd.py", line 865, in onecmd_orig
    return func(arg, **opt)
  File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/interface/master_interface.py", line 264, in do_output
    self.cmd.do_output(self, line, *args, **opts)
  File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/interface/madgraph_interface.py", line 5367, in do_output
    self.export(nojpeg, main_file_name, args)
  File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/interface/master_interface.py", line 278, in export
    return self.cmd.export(self, *args, **opts)
  File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/interface/madgraph_interface.py", line 5463, in export
    ndiags, cpu_time = generate_matrix_elements(self)
  File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/interface/madgraph_interface.py", line 5446, in generate_matrix_elements
    helas_objects.HelasMultiProcess(self._curr_amps, matrix_element_opts=mode)
  File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/core/helas_objects.py", line 4994, in __init__
    matrix_element_opts=matrix_element_opts))
  File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/core/helas_objects.py", line 5214, in generate_matrix_elements
    **matrix_element_opts)]
  File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/core/helas_objects.py", line 3052, in __init__
    self.generate_helas_diagrams(amplitude, optimization, decay_ids)
  File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/core/helas_objects.py", line 3318, in generate_helas_diagrams
    number_to_wavefunctions)
  File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/core/helas_objects.py", line 2140, in check_and_fix_fermion_flow
    number_to_wavefunctions)
  File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/core/helas_objects.py", line 1284, in check_majorana_and_flip_flow
    new_wf = wavefunctions[wavefunctions.index(new_wf)]
  File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/core/base_objects.py", line 136, in __str__
    repr(self[prop]) + ',\n'
  File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/core/base_objects.py", line 136, in __str__
    repr(self[prop]) + ',\n'
MemoryError

And I change to another computer there is also similar error
Traceback (most recent call last):
  File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/interface/extended_cmd.py", line 872, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/interface/extended_cmd.py", line 865, in onecmd_orig
    return func(arg, **opt)
  File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/interface/master_interface.py", line 246, in do_import
    self.cmd.do_import(self, *args, **opts)
  File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/interface/madgraph_interface.py", line 3857, in do_import
    self.import_command_file(args[1])
  File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/interface/extended_cmd.py", line 1027, in import_command_file
    self.exec_cmd(line, precmd=True)
  File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/interface/extended_cmd.py", line 912, in exec_cmd
    stop = Cmd.onecmd_orig(current_interface, line, **opt)
  File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/interface/extended_cmd.py", line 865, in onecmd_orig
    return func(arg, **opt)
  File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/interface/master_interface.py", line 311, in do_compute_widths
    return self.cmd.do_compute_widths(self, *args, **opts)
  File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/interface/madgraph_interface.py", line 5891, in do_compute_widths
    self.exec_cmd('output %s -f' % decay_dir)
  File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/interface/extended_cmd.py", line 912, in exec_cmd
    stop = Cmd.onecmd_orig(current_interface, line, **opt)
  File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/interface/extended_cmd.py", line 865, in onecmd_orig
    return func(arg, **opt)
  File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/interface/master_interface.py", line 264, in do_output
    self.cmd.do_output(self, line, *args, **opts)
  File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/interface/madgraph_interface.py", line 5356, in do_output
    self._curr_exporter.copy_v4template(modelname=self._curr_model.get('name'))
  File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/iolibs/export_v4.py", line 2366, in copy_v4template
    super(ProcessExporterFortranME, self).copy_v4template(modelname)
  File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/iolibs/export_v4.py", line 155, in copy_v4template
    % (os.path.basename(self.dir_path),why))
MadGraph5Error: Failed to clean correctly temp_decay:
 [Errno 12] Cannot allocate memory

What should I do to avoid this?

Thanks

Teddy

Question information

Language:
English Edit question
Status:
Answered
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#1

Hi,

Since this is a memory error, the best is to optimize your work.
So instead of using the gigantic mssm-full work with a restricted model which contains only what you need.

Cheers,

Olivier

On May 1, 2014, at 3:16 PM, teddym <email address hidden> wrote:

> New question #247991 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/247991
>
> Hi:
> When I use the command compute_widths to compute the width for some particles in mssm-full model, the madgraph crashed and display
> MemoryError
>
> The message in MG5_DEBUG is
>
> Traceback (most recent call last):
> File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/interface/extended_cmd.py", line 872, in onecmd
> return self.onecmd_orig(line, **opt)
> File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/interface/extended_cmd.py", line 865, in onecmd_orig
> return func(arg, **opt)
> File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/interface/master_interface.py", line 311, in do_compute_widths
> return self.cmd.do_compute_widths(self, *args, **opts)
> File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/interface/madgraph_interface.py", line 5891, in do_compute_widths
> self.exec_cmd('output %s -f' % decay_dir)
> File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/interface/extended_cmd.py", line 912, in exec_cmd
> stop = Cmd.onecmd_orig(current_interface, line, **opt)
> File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/interface/extended_cmd.py", line 865, in onecmd_orig
> return func(arg, **opt)
> File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/interface/master_interface.py", line 264, in do_output
> self.cmd.do_output(self, line, *args, **opts)
> File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/interface/madgraph_interface.py", line 5367, in do_output
> self.export(nojpeg, main_file_name, args)
> File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/interface/master_interface.py", line 278, in export
> return self.cmd.export(self, *args, **opts)
> File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/interface/madgraph_interface.py", line 5463, in export
> ndiags, cpu_time = generate_matrix_elements(self)
> File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/interface/madgraph_interface.py", line 5446, in generate_matrix_elements
> helas_objects.HelasMultiProcess(self._curr_amps, matrix_element_opts=mode)
> File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/core/helas_objects.py", line 4994, in __init__
> matrix_element_opts=matrix_element_opts))
> File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/core/helas_objects.py", line 5214, in generate_matrix_elements
> **matrix_element_opts)]
> File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/core/helas_objects.py", line 3052, in __init__
> self.generate_helas_diagrams(amplitude, optimization, decay_ids)
> File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/core/helas_objects.py", line 3318, in generate_helas_diagrams
> number_to_wavefunctions)
> File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/core/helas_objects.py", line 2140, in check_and_fix_fermion_flow
> number_to_wavefunctions)
> File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/core/helas_objects.py", line 1284, in check_majorana_and_flip_flow
> new_wf = wavefunctions[wavefunctions.index(new_wf)]
> File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/core/base_objects.py", line 136, in __str__
> repr(self[prop]) + ',\n'
> File "/home/zyan12/workingspace/MG5_aMC_v2_1_0/madgraph/core/base_objects.py", line 136, in __str__
> repr(self[prop]) + ',\n'
> MemoryError
>
> And I change to another computer there is also similar error
> Traceback (most recent call last):
> File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/interface/extended_cmd.py", line 872, in onecmd
> return self.onecmd_orig(line, **opt)
> File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/interface/extended_cmd.py", line 865, in onecmd_orig
> return func(arg, **opt)
> File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/interface/master_interface.py", line 246, in do_import
> self.cmd.do_import(self, *args, **opts)
> File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/interface/madgraph_interface.py", line 3857, in do_import
> self.import_command_file(args[1])
> File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/interface/extended_cmd.py", line 1027, in import_command_file
> self.exec_cmd(line, precmd=True)
> File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/interface/extended_cmd.py", line 912, in exec_cmd
> stop = Cmd.onecmd_orig(current_interface, line, **opt)
> File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/interface/extended_cmd.py", line 865, in onecmd_orig
> return func(arg, **opt)
> File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/interface/master_interface.py", line 311, in do_compute_widths
> return self.cmd.do_compute_widths(self, *args, **opts)
> File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/interface/madgraph_interface.py", line 5891, in do_compute_widths
> self.exec_cmd('output %s -f' % decay_dir)
> File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/interface/extended_cmd.py", line 912, in exec_cmd
> stop = Cmd.onecmd_orig(current_interface, line, **opt)
> File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/interface/extended_cmd.py", line 865, in onecmd_orig
> return func(arg, **opt)
> File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/interface/master_interface.py", line 264, in do_output
> self.cmd.do_output(self, line, *args, **opts)
> File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/interface/madgraph_interface.py", line 5356, in do_output
> self._curr_exporter.copy_v4template(modelname=self._curr_model.get('name'))
> File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/iolibs/export_v4.py", line 2366, in copy_v4template
> super(ProcessExporterFortranME, self).copy_v4template(modelname)
> File "/home/teddy/workingspace/MG5_aMC_v2_1_0/madgraph/iolibs/export_v4.py", line 155, in copy_v4template
> % (os.path.basename(self.dir_path),why))
> MadGraph5Error: Failed to clean correctly temp_decay:
> [Errno 12] Cannot allocate memory
>
> What should I do to avoid this?
>
> Thanks
>
> Teddy
>
>
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Can you help with this problem?

Provide an answer of your own, or ask teddym for more information if necessary.

To post a message you must log in.