Madgraph through batch

Asked by JamesB

Hello,

I want to run Madgraph through a batch system (and have done previously). The submission script settings I used are as follows:

import model heft
define l = l+ l-
define nu = vl vl~
generate p p > h j, h > j j l nu
    output higgs_lvjj_200
    launch higgs_lvjj_200

    pythia=ON
    pgs=OFF
    done
    set nevents 5000
    set ptj 200
    done

My problem is that this does not set the number of events or transverse jet momentum to the required values - it just ignores them. Note, this worked as desired when I had 'pythia=OFF'. Any thoughts as to how to solve this? Also note: the output from the batch of what happened does not show the option where you change the cards (it did previously).

Many thanks,
James

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
JamesB
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#1

Hi James,

Thanks for the information. This is indeed a bug of the new version.
One quick workaround is to remove your first "done" in the script. i.e. do

import model heft
define l = l+ l-
define nu = vl vl~
generate p p > h j, h > j j l nu
    output higgs_lvjj_200
    launch higgs_lvjj_200

    pythia=ON
    pgs=OFF
    set nevents 5000
    set ptj 200
    done

I will fix this for the next version.
Thanks a lot for the information,

Olivier

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#2

Hi,

Just to be complete, here is the patch that fix the issue:
=== modified file 'madgraph/interface/extended_cmd.py'
--- madgraph/interface/extended_cmd.py 2018-01-11 19:56:01 +0000
+++ madgraph/interface/extended_cmd.py 2018-01-14 14:30:24 +0000
@@ -2365,7 +2365,8 @@
         if 'allow_arg' in opts:
             allowed_args += opts['allow_arg']
             del opts['allow_arg']
-
+
+ allowed_args +=["0", "done"]
         super(ControlSwitch, self).__init__(question, allowed_args, *args, **opts)
         self.options = self.mother_interface.options

Thanks,

Olivier

Revision history for this message
JamesB (jamesb8) said :
#3

Hi Oliver,

I am repeating this process, with the inputs exactly as above:

import model heft
define l = l+ l-
define nu = vl vl~
generate p p > h j, h > j j l nu
    output higgs_lvjj_200
    launch higgs_lvjj_200

    pythia=ON
    pgs=OFF
    set nevents 5000
    set ptj 200
    done

But this no longer runs pythia. I only get the unweighted_events.lhe.gz file

Thanks,
James

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#4

Hi,

This runs for me nicely (but with 2.6.1 and the development version which has the above patch).
What is your screen output?

Cheers,

Olivier

On 29 Jan 2018, at 17:57, JamesB <<email address hidden><mailto:<email address hidden>>> wrote:

import model heft
define l = l+ l-
define nu = vl vl~
generate p p > h j, h > j j l nu
   output higgs_lvjj_200
   launch higgs_lvjj_200

   pythia=ON
   pgs=OFF
   set nevents 5000
   set ptj 200
   done

Revision history for this message
JamesB (jamesb8) said :
#5

Hello Oliver,

The output from the batch job has the following line:

'pythia-pgs not available. Ignore commmand'

I re-downloaded Madgraph (MG5_aMC_v2_6_1) and installed Pythia8 through the interface as well but I still can't get Pythia to run.

Thoughts,
James

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#6

Hi James,

Pythia=ON is an old syntax that is still supported but which is not recommended.
Due to that reason, when you use that version, we assume that you still want to have the same stack of program that were
activated when such command were mainstream. (i.e. this command ask to run Pythia6 and not Pythia8)

This is why if you want to keep such script, you first have to install the pythia-pgs package.
If you want to use PY8, you should replace that line by shower=Pythia8

Cheers,

Olivier

> On 1 Feb 2018, at 15:27, JamesB <email address hidden> wrote:
>
> Question #663012 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/663012
>
> Status: Answered => Open
>
> JamesB is still having a problem:
> Hello Oliver,
>
> The output from the batch job has the following line:
>
> 'pythia-pgs not available. Ignore commmand'
>
> I re-downloaded Madgraph (MG5_aMC_v2_6_1) and installed Pythia8 through
> the interface as well but I still can't get Pythia to run.
>
> Thoughts,
> James
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
JamesB (jamesb8) said :
#7

Thanks Olivier Mattelaer, that solved my question.

Revision history for this message
JamesB (jamesb8) said :
#8

In fact, this still does not seem to work.

The output is:

The following switches determine which programs are run:
/==============================================================================\
| 1. Choose the shower/hadronization program ESC[1m showerESC[0m = ESC[32mPythia8ESC[0m |
| 2. Choose the detector simulation program ESC[1mdetectorESC[0m = ESC[31mOFFESC[0m |
| 3. Choose an analysis package (plot/convert) ESC[1manalysisESC[0m = ESC[32mMadAnalysis5ESC[0m |
| 4. Decay onshell particles ESC[1m madspinESC[0m = ESC[31mOFFESC[0m |
| 5. Add weights to events for new hypp. ESC[1mreweightESC[0m = ESC[31mOFFESC[0m |
\==============================================================================/
Either type the switch number (1 to 5) to change its setting,
Set any switch explicitly (e.g. type 'shower=OFF' at the prompt)
Type 'help' for the list of all valid option
Type '0', 'auto', 'done' or just press enter when you are done.
set nevents 20000
ESC[1;60mINFO: modify parameter nevents of the run_card.dat to 20000 ESC[0m
set ptj 200
ESC[1;60mINFO: modify parameter ptj of the run_card.dat to 200.0 ESC[0m
INFO: Update the dependent parameter of the param_card.dat
Generating 20000 events with run name run_01

What do you reckon?
Regards,
James

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#9

Hi,

Sorry I should miss a point, but now you have correctly
> showerESC[0m = ESC[32mPythia8ESC[0m
so I do not see anything kind of wrong in that output.

Cheers,

Olivier

> On 1 Feb 2018, at 18:02, JamesB <email address hidden> wrote:
>
> Question #663012 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/663012
>
> JamesB posted a new comment:
> In fact, this still does not seem to work.
>
> The output is:
>
>
> The following switches determine which programs are run:
> /==============================================================================\
> | 1. Choose the shower/hadronization program ESC[1m showerESC[0m = ESC[32mPythia8ESC[0m |
> | 2. Choose the detector simulation program ESC[1mdetectorESC[0m = ESC[31mOFFESC[0m |
> | 3. Choose an analysis package (plot/convert) ESC[1manalysisESC[0m = ESC[32mMadAnalysis5ESC[0m |
> | 4. Decay onshell particles ESC[1m madspinESC[0m = ESC[31mOFFESC[0m |
> | 5. Add weights to events for new hypp. ESC[1mreweightESC[0m = ESC[31mOFFESC[0m |
> \==============================================================================/
> Either type the switch number (1 to 5) to change its setting,
> Set any switch explicitly (e.g. type 'shower=OFF' at the prompt)
> Type 'help' for the list of all valid option
> Type '0', 'auto', 'done' or just press enter when you are done.
> set nevents 20000
> ESC[1;60mINFO: modify parameter nevents of the run_card.dat to 20000 ESC[0m
> set ptj 200
> ESC[1;60mINFO: modify parameter ptj of the run_card.dat to 200.0 ESC[0m
> INFO: Update the dependent parameter of the param_card.dat
> Generating 20000 events with run name run_01
>
> What do you reckon?
> Regards,
> James
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
JamesB (jamesb8) said :
#10

Hi Oliver,

I'm still having the same problem. Madgraph runs fine through the batch but Pythia is not used, so only unweighted_events.lhe.gz is produced. I'm using Pythia8 with Madgraph v2.6.1. Would you mind trying a batch submission to see if you have the same issue, as there doesn't seem to be any error here?

Many thanks,
James

My run settings are as follows:

import model heft
define l = l+ l-
define nu = ve ve~ vm vm~
generate p p > h j, h > j j l nu

output lvjj
launch lvjj

shower=Pythia8

set nevents 100
set ptj1min 200
done

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#11

Hi,

Here is after a run on my university cluster (this slurm scheduler).
Everything seems fine here.

run_01_tag_1_banner.txt tag_1_djrs.dat tag_1_pythia8.cmd tag_1_pythia8.log
run_shower.sh tag_1_pts.dat tag_1_pythia8_events.hepmc.gz unweighted_events.lhe.gz

What scheduler are you using?

Cheers,

Olivier

Revision history for this message
JamesB (jamesb8) said :
#12

Hello,

Thanks for looking into this.

The problem is that Pythia does not run:
<location>/Events/run_01/PY8_parallelization/run_PY8.sh 0 launch ends with non zero status: 1. Stop all computation

I believe this error is due to lhapdf.

In MG5_aMC_v2_6_1/input/mg5_configuration.txt, lhapdf is set:
set lhapdf to <location>/MG5_aMC_v2_6_1/HEPTools/lhapdf5/bin/lhapdf-config

I have googled this error but I don't really understand it. Any ideas on how to fix it?

Regards,
James

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#13

Do you have some log file for PY8?
This might help to understand why PY8 is crashing.

Cheers,

Olivier

> On 23 Feb 2018, at 15:47, JamesB <email address hidden> wrote:
>
> Question #663012 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/663012
>
> Status: Answered => Open
>
> JamesB is still having a problem:
> Hello,
>
> Thanks for looking into this.
>
> The problem is that Pythia does not run:
> <location>/Events/run_01/PY8_parallelization/run_PY8.sh 0 launch ends with non zero status: 1. Stop all computation
>
> I believe this error is due to lhapdf.
>
> In MG5_aMC_v2_6_1/input/mg5_configuration.txt, lhapdf is set:
> set lhapdf to <location>/MG5_aMC_v2_6_1/HEPTools/lhapdf5/bin/lhapdf-config
>
> I have googled this error but I don't really understand it. Any ideas on
> how to fix it?
>
> Regards,
> James
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
JamesB (jamesb8) said :
#14

This is the debug.log:

#************************************************************
#* MadGraph5_aMC@NLO/MadEvent *
#* *
#* * * *
#* * * * * *
#* * * * * 5 * * * * *
#* * i* * * *
#* * * *
#* *
#* *
#* VERSION 2.6.1 2017-12-12 *
#* *
#* The MadGraph5_aMC@NLO Development Team - Find us at *
#* https://server06.fynu.ucl.ac.be/projects/madgraph *
#* *
#************************************************************
#* *
#* Command File for MadEvent *
#* *
#* run as ./bin/madevent.py filename *
#* *
#************************************************************
generate_events run_01
Traceback (most recent call last):
  File "/home/spet3829/MG5_aMC_v2_6_1/madgraph/interface/extended_cmd.py", line 1467, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/home/spet3829/MG5_aMC_v2_6_1/madgraph/interface/extended_cmd.py", line 1421, in onecmd_orig
    return func(arg, **opt)
  File "/home/spet3829/MG5_aMC_v2_6_1/madgraph/interface/madevent_interface.py", line 2562, in do_generate_events
    self.exec_cmd('shower --no_default', postcmd=False, printcmd=False)
  File "/home/spet3829/MG5_aMC_v2_6_1/madgraph/interface/extended_cmd.py", line 1494, in exec_cmd
    stop = Cmd.onecmd_orig(current_interface, line, **opt)
  File "/home/spet3829/MG5_aMC_v2_6_1/madgraph/interface/extended_cmd.py", line 1421, in onecmd_orig
    return func(arg, **opt)
  File "/home/spet3829/MG5_aMC_v2_6_1/madgraph/interface/madevent_interface.py", line 3819, in do_shower
    postcmd=False, printcmd=False)
  File "/home/spet3829/MG5_aMC_v2_6_1/madgraph/interface/extended_cmd.py", line 1494, in exec_cmd
    stop = Cmd.onecmd_orig(current_interface, line, **opt)
  File "/home/spet3829/MG5_aMC_v2_6_1/madgraph/interface/extended_cmd.py", line 1421, in onecmd_orig
    return func(arg, **opt)
  File "/home/spet3829/MG5_aMC_v2_6_1/madgraph/interface/madevent_interface.py", line 4485, in do_pythia8
    self.cluster.wait(parallelization_dir,wait_monitoring)
  File "/home/spet3829/MG5_aMC_v2_6_1/madgraph/various/cluster.py", line 822, in wait
    raise Exception, self.fail_msg
Exception: program /data/atlas/atlasdata/spet3829/lvjjj_signal_50k/Events/run_01/PY8_parallelization/run_PY8.sh 0 launch ends with non zero status: 1. Stop all computation
                              Run Options
                              -----------
               stdout_level : 20 (user set)

                         MadEvent Options
                         ----------------
     automatic_html_opening : False (user set)
        notification_center : True
          cluster_temp_path : None
             cluster_memory : None (user set)
              cluster_size : 100
              cluster_queue : None (user set)
                    nb_core : 24 (user set)
               cluster_time : 24 (user set)
                   run_mode : 2

                      Configuration Options
                      ---------------------
                text_editor : None
         cluster_local_path : None
      cluster_status_update : (600, 30)
               pythia8_path : /home/spet3829/MG5_aMC_v2_6_1/HEPTools/pythia8 (user set)
                  hwpp_path : None (user set)
            pythia-pgs_path : None (user set)
                    td_path : None (user set)
               delphes_path : /home/spet3829/MG5_aMC_v2_6_1/Delphes (user set)
                thepeg_path : None (user set)
               cluster_type : condor
          madanalysis5_path : /home/spet3829/MG5_aMC_v2_6_1/HEPTools/madanalysis5 (user set)
           cluster_nb_retry : 1
                 eps_viewer : None
                web_browser : None
               syscalc_path : None (user set)
           madanalysis_path : None (user set)
                     lhapdf : /home/spet3829/MG5_aMC_v2_6_1/HEPTools/lhapdf5/bin/lhapdf-config (user set)
              f2py_compiler : None
                 hepmc_path : None (user set)
         cluster_retry_wait : 300
           fortran_compiler : None
                auto_update : 7 (user set)
        exrootanalysis_path : /home/spet3829/MG5_aMC_v2_6_1/ExRootAnalysis (user set)
                    timeout : 60
               cpp_compiler : None

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#15

That's the MG log,

If you look in Events/run_01
you might see some file (and/or directory) related to py8.
Which should contain the py8 log.

Cheers,

Olivier

> On 23 Feb 2018, at 16:07, JamesB <email address hidden> wrote:
>
> Question #663012 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/663012
>
> Status: Answered => Open
>
> JamesB is still having a problem:
> This is the debug.log:
>
>
> #************************************************************
> #* MadGraph5_aMC@NLO/MadEvent *
> #* *
> #* * * *
> #* * * * * *
> #* * * * * 5 * * * * *
> #* * i* * * *
> #* * * *
> #* *
> #* *
> #* VERSION 2.6.1 2017-12-12 *
> #* *
> #* The MadGraph5_aMC@NLO Development Team - Find us at *
> #* https://server06.fynu.ucl.ac.be/projects/madgraph *
> #* *
> #************************************************************
> #* *
> #* Command File for MadEvent *
> #* *
> #* run as ./bin/madevent.py filename *
> #* *
> #************************************************************
> generate_events run_01
> Traceback (most recent call last):
> File "/home/spet3829/MG5_aMC_v2_6_1/madgraph/interface/extended_cmd.py", line 1467, in onecmd
> return self.onecmd_orig(line, **opt)
> File "/home/spet3829/MG5_aMC_v2_6_1/madgraph/interface/extended_cmd.py", line 1421, in onecmd_orig
> return func(arg, **opt)
> File "/home/spet3829/MG5_aMC_v2_6_1/madgraph/interface/madevent_interface.py", line 2562, in do_generate_events
> self.exec_cmd('shower --no_default', postcmd=False, printcmd=False)
> File "/home/spet3829/MG5_aMC_v2_6_1/madgraph/interface/extended_cmd.py", line 1494, in exec_cmd
> stop = Cmd.onecmd_orig(current_interface, line, **opt)
> File "/home/spet3829/MG5_aMC_v2_6_1/madgraph/interface/extended_cmd.py", line 1421, in onecmd_orig
> return func(arg, **opt)
> File "/home/spet3829/MG5_aMC_v2_6_1/madgraph/interface/madevent_interface.py", line 3819, in do_shower
> postcmd=False, printcmd=False)
> File "/home/spet3829/MG5_aMC_v2_6_1/madgraph/interface/extended_cmd.py", line 1494, in exec_cmd
> stop = Cmd.onecmd_orig(current_interface, line, **opt)
> File "/home/spet3829/MG5_aMC_v2_6_1/madgraph/interface/extended_cmd.py", line 1421, in onecmd_orig
> return func(arg, **opt)
> File "/home/spet3829/MG5_aMC_v2_6_1/madgraph/interface/madevent_interface.py", line 4485, in do_pythia8
> self.cluster.wait(parallelization_dir,wait_monitoring)
> File "/home/spet3829/MG5_aMC_v2_6_1/madgraph/various/cluster.py", line 822, in wait
> raise Exception, self.fail_msg
> Exception: program /data/atlas/atlasdata/spet3829/lvjjj_signal_50k/Events/run_01/PY8_parallelization/run_PY8.sh 0 launch ends with non zero status: 1. Stop all computation
> Run Options
> -----------
> stdout_level : 20 (user set)
>
> MadEvent Options
> ----------------
> automatic_html_opening : False (user set)
> notification_center : True
> cluster_temp_path : None
> cluster_memory : None (user set)
> cluster_size : 100
> cluster_queue : None (user set)
> nb_core : 24 (user set)
> cluster_time : 24 (user set)
> run_mode : 2
>
> Configuration Options
> ---------------------
> text_editor : None
> cluster_local_path : None
> cluster_status_update : (600, 30)
> pythia8_path : /home/spet3829/MG5_aMC_v2_6_1/HEPTools/pythia8 (user set)
> hwpp_path : None (user set)
> pythia-pgs_path : None (user set)
> td_path : None (user set)
> delphes_path : /home/spet3829/MG5_aMC_v2_6_1/Delphes (user set)
> thepeg_path : None (user set)
> cluster_type : condor
> madanalysis5_path : /home/spet3829/MG5_aMC_v2_6_1/HEPTools/madanalysis5 (user set)
> cluster_nb_retry : 1
> eps_viewer : None
> web_browser : None
> syscalc_path : None (user set)
> madanalysis_path : None (user set)
> lhapdf : /home/spet3829/MG5_aMC_v2_6_1/HEPTools/lhapdf5/bin/lhapdf-config (user set)
> f2py_compiler : None
> hepmc_path : None (user set)
> cluster_retry_wait : 300
> fortran_compiler : None
> auto_update : 7 (user set)
> exrootanalysis_path : /home/spet3829/MG5_aMC_v2_6_1/ExRootAnalysis (user set)
> timeout : 60
> cpp_compiler : None
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
JamesB (jamesb8) said :
#16

Apologies.

Here is PY8_log.txt

./MG5aMC_PY8_interface: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by ./MG5aMC_PY8_interface)
./MG5aMC_PY8_interface: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by ./MG5aMC_PY8_interface)
./MG5aMC_PY8_interface: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by ./MG5aMC_PY8_interface)
./MG5aMC_PY8_interface: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ./MG5aMC_PY8_interface)
./MG5aMC_PY8_interface: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./MG5aMC_PY8_interface)

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#17

Hi,

This seems to be a path/ld_librarypath isssue related to C++.
I would suggest to reinstall pythia8, if that does not help it might indicate some incompatibility between mounting point where you install the code and where you run it. In that case you should contact the IT responsible of your cluster for instructions.

Cheers,

Olivier

Revision history for this message
JamesB (jamesb8) said :
#18

Hi Oliver,

Problem solved. There was an environment issue with my ROOT setup.

Thanks for your help,
James