Set command in launch doesn't work if parameters missing from run_card.dat

Bug #1183334 reported by Johan Alwall
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MadGraph5_aMC@NLO
Fix Released
Low
Olivier Mattelaer

Bug Description

Hi Olivier,

I found a problem with the set command inside launch - if the run_card is missing parameters (which often happens if you use e.g. an existing banner to generate your process), then the set command crashes. The actual sequence of calls was:

generate_events
0
set nevents 10000

and then it crashes with the error described below:

set nb_core 1
generate_events
Traceback (most recent call last):
  File "/Users/alwall/MadGraph/madgraph5/PROC_sm_26/bin/internal/extended_cmd.py", line 819, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/Users/alwall/MadGraph/madgraph5/PROC_sm_26/bin/internal/extended_cmd.py", line 812, in onecmd_orig
    return func(arg, **opt)
  File "/Users/alwall/MadGraph/madgraph5/PROC_sm_26/bin/internal/madevent_interface.py", line 2208, in do_generate_events
    self.ask_run_configuration(mode)
  File "/Users/alwall/MadGraph/madgraph5/PROC_sm_26/bin/internal/madevent_interface.py", line 4368, in ask_run_configuration
    path_msg='enter path', ask_class = AskforEditCard)
  File "/Users/alwall/MadGraph/madgraph5/PROC_sm_26/bin/internal/extended_cmd.py", line 616, in ask
    fct=question_instance, fct_timeout=fct_timeout)
  File "/Users/alwall/MadGraph/madgraph5/PROC_sm_26/bin/internal/extended_cmd.py", line 1076, in timed_input
    result = fct(question)
  File "/Users/alwall/MadGraph/madgraph5/PROC_sm_26/bin/internal/extended_cmd.py", line 1395, in __call__
    return self.cmdloop()
  File "/Users/alwall/MadGraph/madgraph5/PROC_sm_26/bin/internal/extended_cmd.py", line 1465, in cmdloop
    cmd.Cmd.cmdloop(self, intro)
  File "/usr/local/lib/python2.7/cmd.py", line 142, in cmdloop
    stop = self.onecmd(line)
  File "/usr/local/lib/python2.7/cmd.py", line 221, in onecmd
    return func(arg)
  File "/Users/alwall/MadGraph/madgraph5/PROC_sm_26/bin/internal/madevent_interface.py", line 5086, in do_set
    pjoin(self.me_dir,'Cards','run_card_default.dat'))
  File "/Users/alwall/MadGraph/madgraph5/PROC_sm_26/bin/internal/banner.py", line 326, in write
    text += ' %s\t= %s %s' % (self[nline[1].strip()],nline[1], comment)
KeyError: 'ptl1min'
                              Run Options
                              -----------
               stdout_level : None

                         MadEvent Options
                         ----------------
     automatic_html_opening : True
          cluster_temp_path : None
              cluster_queue : madgraph
                    nb_core : 1 (user set)
                   run_mode : 2

                      Configuration Options
                      ---------------------
                web_browser : None
                text_editor : None
           madanalysis_path : /Users/alwall/MadGraph/MG_ME/MadAnalysis (user set)
               pythia8_path : None (user set)
            pythia-pgs_path : /Users/alwall/MadGraph/pythia-pgs-for-mg (user set)
                    td_path : /Users/alwall/MadGraph/MG_ME/td (user set)
               delphes_path : /Users/alwall/MadGraph/Delphes (user set)
                auto_update : 7 (user set)
               cluster_type : condor
           fortran_compiler : None (user set)
        exrootanalysis_path : None (user set)
                 eps_viewer : None
                    timeout : 60

Should be easy enough to fix, but I figured I'll just report it here anyway. :-)

Thanks!
Johan

Related branches

Changed in madgraph5:
assignee: nobody → Olivier Mattelaer (olivier-mattelaer)
importance: Undecided → Low
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Hi,

I've finally fix this,
and added the support for the hidden parameter of the run_card (especially lhaid)

Cheers,

Olivier

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