KeyError : 't~'

Asked by Inês Ochoa

Hi,

I'm generating p p > w+ z with aMC@NLO, decaying the bosons with MadSpin and showering with Herwig++.
However, after the generation and apparently during the Madspin routine the code breaks with the following error:

Command "launch " interrupted with error:
KeyError : 't~'
Please report this bug on https://bugs.launchpad.net/madgraph5
More information is found in '/unix/atlas2/ines/software/MG5_aMC_v2_1_0/WpZ_14TeV/run_03_tag_1_debug.log'.
Please attach this file to your report.

I've pasted the contents of the debug file below:

Traceback (most recent call last):
  File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/WpZ_14TeV/bin/internal/extended_cmd.py", line 872, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/WpZ_14TeV/bin/internal/extended_cmd.py", line 865, in onecmd_orig
    return func(arg, **opt)
  File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/WpZ_14TeV/bin/internal/amcatnlo_run_interface.py", line 1194, in do_launch
    self.exec_cmd('decay_events -from_cards', postcmd=False)
  File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/WpZ_14TeV/bin/internal/extended_cmd.py", line 912, in exec_cmd
    stop = Cmd.onecmd_orig(current_interface, line, **opt)
  File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/WpZ_14TeV/bin/internal/extended_cmd.py", line 865, in onecmd_orig
    return func(arg, **opt)
  File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/WpZ_14TeV/bin/internal/common_run_interface.py", line 1511, in do_decay_events
    madspin_cmd.import_command_file(path)
  File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/madgraph/interface/extended_cmd.py", line 1027, in import_command_file
    self.exec_cmd(line, precmd=True)
  File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/madgraph/interface/extended_cmd.py", line 912, in exec_cmd
    stop = Cmd.onecmd_orig(current_interface, line, **opt)
  File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/madgraph/interface/extended_cmd.py", line 865, in onecmd_orig
    return func(arg, **opt)
  File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/MadSpin/interface_madspin.py", line 459, in do_launch
    self.options)
  File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/MadSpin/decay.py", line 1966, in __init__
    self.generate_all_matrix_element()
  File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/madgraph/various/misc.py", line 88, in f_with_no_logger
    out = f(self, *args, **opt)
  File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/tests/unit_tests/various/test_aloha.py", line 50, in deco_f_set
    out = f(*args, **opt)
  File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/MadSpin/decay.py", line 2503, in generate_all_matrix_element
    self.get_branching_ratio()
  File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/MadSpin/decay.py", line 2740, in get_branching_ratio
    width.extract_br(self.list_branches, self.mgcmd)
  File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/MadSpin/decay.py", line 1302, in extract_br
    self.launch_width_evaluation(to_decay, mgcmd)
  File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/MadSpin/decay.py", line 1567, in launch_width_evaluation
    self.extract_br_from_card(pjoin(self.path_me, 'param_card.dat'))
  File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/MadSpin/decay.py", line 1652, in extract_br_from_card
    self.extract_br_for_antiparticle()
  File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/MadSpin/decay.py", line 1527, in extract_br_for_antiparticle
    self.width_value[anti_res]=self.width_value[res]
KeyError: 't~'
Value of current Options:
              web_browser : None
              text_editor : nano
        cluster_temp_path : None
             syscalc_path : None
            cluster_queue : madgraph
         madanalysis_path : None
                   lhapdf : lhapdf-config
                 mg5_path : /unix/atlas2/ines/software/MG5_aMC_v2_1_0
           cluster_memory : None
    cluster_status_update : (600, 30)
             cluster_time : None
               hepmc_path : /unix/atlas2/ines/software/HepMC/HepMC-2.06.09
             pythia8_path : None
                hwpp_path : /unix/atlas2/ines/software/Herwigpp
   automatic_html_opening : False
       cluster_retry_wait : 300
             stdout_level : None
          pythia-pgs_path : None
                  td_path : None
             delphes_path : None
              thepeg_path : /unix/atlas2/ines/software/ThePEG
             cluster_type : condor
      exrootanalysis_path : None
         fortran_compiler : None
              auto_update : 7
         cluster_nb_retry : 1
               eps_viewer : None
                  timeout : 60
                  fastjet : fastjet-config
                  nb_core : 8
                 run_mode : 2

The madspin card considers the following decays:
w+ > mu+ vm
z > b b~~

Let me know if you need more details.

Thanks in advance!

Question information

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

Hi Ines,

I have tested with our latest version of the code (2.2.3) and I can not reproduce the problem.
So I would suggest to upgrade your version of the code and give it another try.

Cheers,

Olivier

On 19 Feb 2015, at 14:36, Inês Ochoa <email address hidden> wrote:

> New question #262403 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/262403
>
> Hi,
>
> I'm generating p p > w+ z with aMC@NLO, decaying the bosons with MadSpin and showering with Herwig++.
> However, after the generation and apparently during the Madspin routine the code breaks with the following error:
>
> Command "launch " interrupted with error:
> KeyError : 't~'
> Please report this bug on https://bugs.launchpad.net/madgraph5
> More information is found in '/unix/atlas2/ines/software/MG5_aMC_v2_1_0/WpZ_14TeV/run_03_tag_1_debug.log'.
> Please attach this file to your report.
>
>
> I've pasted the contents of the debug file below:
>
> Traceback (most recent call last):
> File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/WpZ_14TeV/bin/internal/extended_cmd.py", line 872, in onecmd
> return self.onecmd_orig(line, **opt)
> File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/WpZ_14TeV/bin/internal/extended_cmd.py", line 865, in onecmd_orig
> return func(arg, **opt)
> File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/WpZ_14TeV/bin/internal/amcatnlo_run_interface.py", line 1194, in do_launch
> self.exec_cmd('decay_events -from_cards', postcmd=False)
> File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/WpZ_14TeV/bin/internal/extended_cmd.py", line 912, in exec_cmd
> stop = Cmd.onecmd_orig(current_interface, line, **opt)
> File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/WpZ_14TeV/bin/internal/extended_cmd.py", line 865, in onecmd_orig
> return func(arg, **opt)
> File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/WpZ_14TeV/bin/internal/common_run_interface.py", line 1511, in do_decay_events
> madspin_cmd.import_command_file(path)
> File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/madgraph/interface/extended_cmd.py", line 1027, in import_command_file
> self.exec_cmd(line, precmd=True)
> File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/madgraph/interface/extended_cmd.py", line 912, in exec_cmd
> stop = Cmd.onecmd_orig(current_interface, line, **opt)
> File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/madgraph/interface/extended_cmd.py", line 865, in onecmd_orig
> return func(arg, **opt)
> File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/MadSpin/interface_madspin.py", line 459, in do_launch
> self.options)
> File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/MadSpin/decay.py", line 1966, in __init__
> self.generate_all_matrix_element()
> File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/madgraph/various/misc.py", line 88, in f_with_no_logger
> out = f(self, *args, **opt)
> File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/tests/unit_tests/various/test_aloha.py", line 50, in deco_f_set
> out = f(*args, **opt)
> File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/MadSpin/decay.py", line 2503, in generate_all_matrix_element
> self.get_branching_ratio()
> File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/MadSpin/decay.py", line 2740, in get_branching_ratio
> width.extract_br(self.list_branches, self.mgcmd)
> File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/MadSpin/decay.py", line 1302, in extract_br
> self.launch_width_evaluation(to_decay, mgcmd)
> File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/MadSpin/decay.py", line 1567, in launch_width_evaluation
> self.extract_br_from_card(pjoin(self.path_me, 'param_card.dat'))
> File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/MadSpin/decay.py", line 1652, in extract_br_from_card
> self.extract_br_for_antiparticle()
> File "/unix/atlas2/ines/software/MG5_aMC_v2_1_0/MadSpin/decay.py", line 1527, in extract_br_for_antiparticle
> self.width_value[anti_res]=self.width_value[res]
> KeyError: 't~'
> Value of current Options:
> web_browser : None
> text_editor : nano
> cluster_temp_path : None
> syscalc_path : None
> cluster_queue : madgraph
> madanalysis_path : None
> lhapdf : lhapdf-config
> mg5_path : /unix/atlas2/ines/software/MG5_aMC_v2_1_0
> cluster_memory : None
> cluster_status_update : (600, 30)
> cluster_time : None
> hepmc_path : /unix/atlas2/ines/software/HepMC/HepMC-2.06.09
> pythia8_path : None
> hwpp_path : /unix/atlas2/ines/software/Herwigpp
> automatic_html_opening : False
> cluster_retry_wait : 300
> stdout_level : None
> pythia-pgs_path : None
> td_path : None
> delphes_path : None
> thepeg_path : /unix/atlas2/ines/software/ThePEG
> cluster_type : condor
> exrootanalysis_path : None
> fortran_compiler : None
> auto_update : 7
> cluster_nb_retry : 1
> eps_viewer : None
> timeout : 60
> fastjet : fastjet-config
> nb_core : 8
> run_mode : 2
>
>
> The madspin card considers the following decays:
> w+ > mu+ vm
> z > b b~~
>
> Let me know if you need more details.
>
> Thanks in advance!
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Inês Ochoa (inesochoa) said :
#2

Hi Olivier,

Just to add that I have already run this before, but suddenly this crash started occurring, and it's not clear to me what I might have changed.

Thanks
Inês

Revision history for this message
Inês Ochoa (inesochoa) said :
#3

Hi Olivier,

I am currently running v2.1.0. Is there anything obvious that I should pay attention to when updating to the new version, given that I will need to mix the files from the two different versions?

Cheers
Inês

Revision history for this message
Inês Ochoa (inesochoa) said :
#4

Hi Olivier,

I moved to version 2.2.3 as advised, and rerun the same process. My job now breaks with the following error:

Command "launch " interrupted with error:
IOError : [Errno 2] No such file or directory: '/unix/atlas2/ines/software/MG5_aMC_v2_2_3/WpZ_14TeV/MCatNLO/RUN_HERWIGPP_1/events.hepmc.gz'
Please report this bug on https://bugs.launchpad.net/madgraph5
More information is found in '/unix/atlas2/ines/software/MG5_aMC_v2_2_3/WpZ_14TeV/run_02_decayed_1_tag_1_debug.log'.
Please attach this file to your report.

I am pasting the contents of the log file below.

Cheers
Inês

launch
Traceback (most recent call last):
  File "/unix/atlas2/ines/software/MG5_aMC_v2_2_3/WpZ_14TeV/bin/internal/extended_cmd.py", line 879, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/unix/atlas2/ines/software/MG5_aMC_v2_2_3/WpZ_14TeV/bin/internal/extended_cmd.py", line 872, in onecmd_orig
    return func(arg, **opt)
  File "/unix/atlas2/ines/software/MG5_aMC_v2_2_3/WpZ_14TeV/bin/internal/amcatnlo_run_interface.py", line 1206, in do_launch
    self.run_mcatnlo(evt_file)
  File "/unix/atlas2/ines/software/MG5_aMC_v2_2_3/WpZ_14TeV/bin/internal/amcatnlo_run_interface.py", line 2554, in run_mcatnlo
    files.mv(os.path.join(rundir, 'events.%s.gz' % ext), hep_file)
  File "/unix/atlas2/ines/software/MG5_aMC_v2_2_3/WpZ_14TeV/bin/internal/files.py", line 172, in mv
    shutil.move(path1, path2)
  File "/afs/cern.ch/sw/lcg/external/Python/2.7.3/x86_64-slc5-gcc47-opt/lib/python2.7/shutil.py", line 299, in move
    copy2(src, real_dst)
  File "/afs/cern.ch/sw/lcg/external/Python/2.7.3/x86_64-slc5-gcc47-opt/lib/python2.7/shutil.py", line 128, in copy2
    copyfile(src, dst)
  File "/afs/cern.ch/sw/lcg/external/Python/2.7.3/x86_64-slc5-gcc47-opt/lib/python2.7/shutil.py", line 82, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '/unix/atlas2/ines/software/MG5_aMC_v2_2_3/WpZ_14TeV/MCatNLO/RUN_HERWIGPP_1/events.hepmc.gz'
Value of current Options:
              text_editor : nano
              web_browser : None
        cluster_temp_path : None
                  timeout : 60
            cluster_queue : madgraph
         madanalysis_path : None
                   lhapdf : lhapdf-config
                 mg5_path : /unix/atlas2/ines/software/MG5_aMC_v2_2_3
           cluster_memory : None
    cluster_status_update : (600, 30)
             cluster_time : None
               hepmc_path : /unix/atlas2/ines/software/HepMC/HepMC-2.06.09
             pythia8_path : None
                hwpp_path : /unix/atlas2/ines/software/Herwigpp
   automatic_html_opening : False
       cluster_retry_wait : 300
             stdout_level : None
          pythia-pgs_path : None
                  td_path : None
             delphes_path : None
              thepeg_path : /unix/atlas2/ines/software/ThePEG
             cluster_type : condor
         cluster_nb_retry : 1
         fortran_compiler : None
                  nb_core : 8
              auto_update : 7
      exrootanalysis_path : None
               eps_viewer : None
             syscalc_path : None
                  fastjet : fastjet-config
             cpp_compiler : None
                 run_mode : 2

Revision history for this message
marco zaro (marco-zaro) said :
#5

Dear Ines,
can you please tell me the commands that bring you to the error concerning the hepmc file?
Thanks a lot,

Marco

Revision history for this message
Inês Ochoa (inesochoa) said :
#6

Dear Marco,

I am running the command

./bin/generate_events

on a previously created folder, generated as:

import model sm
generate p p > w+ z [QCD]
output WpZ_14TeV
launch -p

Cheers
Inês

Revision history for this message
marco zaro (marco-zaro) said :
#7

Hi Ines,
I cannot reproduce your bug, as with the commands you mention I successfully have an .hep event file...
what am i missing?
Cheers,

MArco
      Summary:
      Process p p > w+ z [QCD]
      Run at p-p collider (6500 + 6500 GeV)
      Total cross-section: 2.743e+01 +- 1.0e-01 pb
      Ren. and fac. scale uncertainty: +4.1% -4.2%
      Number of events generated: 10000
      Parton shower to be used: HERWIG6
      Fraction of negative weights: 0.06
      Total running time : 1m 11s

INFO: The /Users/marcozaro/Physics/MadGraph/2.2.3new/WpZ_14TeV/Events/run_03/events.lhe.gz file has been generated.

INFO: Events generated
decay_events -from_cards
INFO: Preparing MCatNLO run
INFO: Compiling MCatNLO for HERWIG6...
INFO: ... done
INFO: Showering events...
INFO: (Running in /Users/marcozaro/Physics/MadGraph/2.2.3new/WpZ_14TeV/MCatNLO/RUN_HERWIG6_1)
INFO: Idle: 0, Running: 1, Completed: 0 [ current time: 09h37 ]
INFO: Idle: 0, Running: 1, Completed: 0 [ 5s ]
INFO: Idle: 0, Running: 0, Completed: 1 [ 55.9s ]
INFO: Idle: 0, Running: 0, Completed: 0 [ current time: 09h38 ]
INFO: Retry to read configuration file to find madanalysis/td
INFO: load configuration from /Users/marcozaro/Physics/MadGraph/2.2.3new/WpZ_14TeV/Cards/amcatnlo_configuration.txt
INFO: load configuration from /Users/marcozaro/Physics/MadGraph/2.2.3new/input/mg5_configuration.txt
INFO: load configuration from /Users/marcozaro/Physics/MadGraph/2.2.3new/WpZ_14TeV/Cards/amcatnlo_configuration.txt
INFO: Fail to make the plot. Continue...
INFO: The file /Users/marcozaro/Physics/MadGraph/2.2.3new/WpZ_14TeV/Events/run_03/events_HERWIG6_0.hep.gz has been generated.
It contains showered and hadronized events in the StdHEP format obtained showering the parton-level event file /Users/marcozaro/Physics/MadGraph/2.2.3new/WpZ_14TeV/Events/run_03/events.lhe.gz with HERWIG6
INFO: Run complete
INFO:
quit
INFO:

Revision history for this message
Inês Ochoa (inesochoa) said :
#8

Hi Marco,

Thanks for the quick reply.
I am also running a MadSpin step, which from your results might be the source of the problem...

Cheers
Inês

Revision history for this message
marco zaro (marco-zaro) said :
#9

Hi Ines,
can you send me the cards (to my email address, not to launchpad)?
Thanks,

Marco

On 02 Mar 2015, at 11:01, Inês Ochoa <email address hidden> wrote:

> Question #262403 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/262403
>
> Status: Needs information => Open
>
> Inês Ochoa gave more information on the question:
> Hi Marco,
>
> Thanks for the quick reply.
> I am also running a MadSpin step, which from your results might be the source of the problem...
>
> Cheers
> Inês
>
> --
> You received this question notification because you are a direct
> subscriber of the question.

Revision history for this message
Inês Ochoa (inesochoa) said :
#10

Hi Marco,

The crash does not occur anymore if I change the two following flags to the default values in the shower_card.dat:

pdfcode = 1 # 0 = internal, 1 = same as NLO, other = lhaglue
ue_enabled = T # underlying event

The defaults being 0 and F respectively. I haven't yet checked which one is the problematic one, but I have sent you the cards by email.

Thanks!
Inês

Revision history for this message
marco zaro (marco-zaro) said :
#11

Ciao Ines,
ok, herwg6 uses lhapdf to simulate the underlying event, loading a quite old set (MRST LO**)
You have to install that set yourself in the lhapdf installation.
You find more details inside
MCatTLO/run_HERWIG6_1/mcatnlo_run.log (can you also send the content?)
Many thanks
Marco

Revision history for this message
Inês Ochoa (inesochoa) said :
#12

Hi Marco,

I'm using HerwigPP though, as defined in the run card. This is the same setup I was using with version v2.1.0.

Cheers
Inês

Revision history for this message
marco zaro (marco-zaro) said :
#13

ok, can you send the log files inside the MCatNLO/RUN_HERWIGPP_1/ folder?
the problem should be the same…
Cheers,

Marco

On 05 Mar 2015, at 12:26, Inês Ochoa <email address hidden> wrote:

> v2.1.0

Revision history for this message
Inês Ochoa (inesochoa) said :
#14

Hi Marco,

Sorry I missed your previous suggestion to look into that log file.
It has a much clearer error message, as you suggested:

 File /afs/cern.ch/sw/lcg/external/MCGenerators/lhapdf/5.8.8/share/lhapdf/PDFsets/ cannot be opened !
 If you have not already done so:
 Use the bin/lhapdf-getdata script to download the file.
 Set the environmental variable LHAPATH to specify the directory if not as default (above).
Herwig++: EventGenerator not available.
Check if 'MCATNLO_HERWIGPP.run' is a valid run file.

But since I'm using the same LHAPDF installation, the files are already there. It's probably that I haven't set up the path properly...

Cheers
Inês

Revision history for this message
marco zaro (marco-zaro) said :
#15

Dear Ines,
can you try using a later version of lhapdf (5.9.1 or 6)?
Then It is quite puzzling that why is it pointing to a dir, rather than to a file…
Let me know,
Cheers,
Marco

On 05 Mar 2015, at 12:46, Inês Ochoa <email address hidden> wrote:

> Question #262403 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/262403
>
> Status: Answered => Open
>
> Inês Ochoa is still having a problem:
> Hi Marco,
>
> Sorry I missed your previous suggestion to look into that log file.
> It has a much clearer error message, as you suggested:
>
> File /afs/cern.ch/sw/lcg/external/MCGenerators/lhapdf/5.8.8/share/lhapdf/PDFsets/ cannot be opened !
> If you have not already done so:
> Use the bin/lhapdf-getdata script to download the file.
> Set the environmental variable LHAPATH to specify the directory if not as default (above).
> Herwig++: EventGenerator not available.
> Check if 'MCATNLO_HERWIGPP.run' is a valid run file.
>
> But since I'm using the same LHAPDF installation, the files are already
> there. It's probably that I haven't set up the path properly...
>
> Cheers
> Inês
>
> --
> You received this question notification because you are a direct
> subscriber of the question.

Revision history for this message
marco zaro (marco-zaro) said :
#16

Dear Ines,
in order to narrow down the problem, can you please run hw++ enabling the UE but leaving PDFcode as default?
This should work.
Then, concerning lhapdf.
When you compiled everything (HWPP, Thepeg, hepmc) did you specify the path to lhapdf at the configure stage?

Let me know,

Marco

Revision history for this message
Inês Ochoa (inesochoa) said :
#17

Dear Marco,

Yes, indeed, the problem is only on the pdfcode being defined as 1, and not related to the underlying event flag.

Regarding the installation, yes, I specified the option --with-lhapdf for the ThePEG installation (I don't recall it being available for Herwig++ and hepmc).

Cheers
Inês

Can you help with this problem?

Provide an answer of your own, or ask Inês Ochoa for more information if necessary.

To post a message you must log in.