# Code is loaded, but getting errors before a run

Asked by Joseph Bevelacqua on 2018-08-16

I managed to install Python and to execute the code with the output that follows. It appears that I need to perform a number of configuration commands. What specific commands do I enter and in what folder should they occur. I am using the xed editor. How do I get the code to recognize that?

Command 1:

Please set the 'fastjet'variable to the full (absolute) /PATH/TO/fastjet-config (including fastjet-config).
MG5_aMC> set fastjet /PATH/TO/fastjet-config

save options fastjet
save configuration file to /home/eightvirtues/Desktop/Madgraph/MG5_aMC_v2_6_3_2/input/mg5_configuration.txt

I can not find a file with this name so I created a folder input with the name mg5_configuration.txt with he requested set commands. There was no change in the output listed below.

How do I change the default text editor?

Any assistance would be greatly appreciated.

eightvirtues@eightvirtues-desktop:~/Desktop/Madgraph/MG5_aMC_v2_6_3_2/bin$./mg5_aMC CODE OUTPUT: ************************************************************ * * * W E L C O M E to * * M A D G R A P H 5 _ a M C @ N L O * * * * * * * * * * * * * * * * * * * * 5 * * * * * * * * * * * * * * * * * * VERSION 2.6.3.2 2018-06-22 * * * * The MadGraph5_aMC@NLO Development Team - Find us at * * https://server06.fynu.ucl.ac.be/projects/madgraph * * and * * http://amcatnlo.web.cern.ch/amcatnlo/ * * * * Type 'help' for in-line help. * * Type 'tutorial' to learn how MG5 works * * Type 'tutorial aMCatNLO' to learn how aMC@NLO works * * Type 'tutorial MadLoop' to learn how MadLoop works * * * ************************************************************ load MG5 configuration from ../input/mg5_configuration.txt None does not seem to correspond to a valid fastjet-config executable (v3+). We will use fjcore instead. Please set the 'fastjet'variable to the full (absolute) /PATH/TO/fastjet-config (including fastjet-config). MG5_aMC> set fastjet /PATH/TO/fastjet-config lhapdf-config does not seem to correspond to a valid lhapdf-config executable. Please set the 'lhapdf' variable to the (absolute) /PATH/TO/lhapdf-config (including lhapdf-config). Note that you can still compile and run aMC@NLO with the built-in PDFs MG5_aMC> set lhapdf /PATH/TO/lhapdf-config Using default text editor "vi". Set another one in ./input/mg5_configuration.txt No valid eps viewer found. Please set in ./input/mg5_configuration.txt Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt Loading default model: sm INFO: Restrict model sm with file ../models/sm/restrict_default.dat . INFO: Run "set stdout_level DEBUG" before import for more information. INFO: Change particles name to pass to MG5 convention Defined multiparticle p = g u c d s u~ c~ d~ s~ Defined multiparticle j = g u c d s u~ c~ d~ s~ Defined multiparticle l+ = e+ mu+ Defined multiparticle l- = e- mu- Defined multiparticle vl = ve vm vt Defined multiparticle vl~ = ve~ vm~ vt~ Defined multiparticle all = g u c d s u~ c~ d~ s~ a ve vm vt e- mu- ve~ vm~ vt~ e+ mu+ t b t~ b~ z w+ h w- ta- ta+ MG5_aMC> ## Question information Language: English Edit question Status: Answered For: MadGraph5_aMC@NLO Edit question Assignee: No assignee Edit question Last query: 2018-08-31 Last reply: 2018-09-01  Olivier Mattelaer (olivier-mattelaer) said on 2018-08-16: #1 Dear Joseph, Setting lhapdf is not required. Not setting it, will obviously forbids you to use it later on. But we have a small number of PDF included in our code, if you are ok to use those, then you do not need lhpadf. (actually it is highly advised to have it since some feature will automatically be de-activated if you do not have it) One way to install lhapdf is to type "install lhapdf" within the MG5_aMC shell. Note that this will install lhapdf6.1.6 if you want a more recent version, then you need to install it manually (by downloading the source from hepforge) For the text editor, I'm not sure that setting xed will work nicely. Since graphical text editor have often issue that they give back the hand to quickly to the main code. So I would advise terminal based text editor like emacs and vi. Now you can obviously try. you can set it via the command (within the MG5 shell) set text_editor xed Cheers, Olivier > On 16 Aug 2018, at 02:57, Joseph Bevelacqua <email address hidden> wrote: > > New question #672314 on MadGraph5_aMC@NLO: > https://answers.launchpad.net/mg5amcnlo/+question/672314 > > I managed to install Python and to execute the code with the output that follows. It appears that I need to perform a number of configuration commands. What specific commands do I enter and in what folder should they occur. I am using the xed editor. How do I get the code to recognize that? > > Command 1: > > Please set the 'fastjet'variable to the full (absolute) /PATH/TO/fastjet-config (including fastjet-config). > MG5_aMC> set fastjet /PATH/TO/fastjet-config > > save options fastjet > save configuration file to /home/eightvirtues/Desktop/Madgraph/MG5_aMC_v2_6_3_2/input/mg5_configuration.txt > > I can not find a file with this name so I created a folder input with the name mg5_configuration.txt with he requested set commands. There was no change in the output listed below. > > How do I change the default text editor? > > Any assistance would be greatly appreciated. > > eightvirtues@eightvirtues-desktop:~/Desktop/Madgraph/MG5_aMC_v2_6_3_2/bin$ ./mg5_aMC
>
> CODE OUTPUT:
>
> ************************************************************
> * *
> * W E L C O M E to *
> * M A D G R A P H 5 _ a M C @ N L O *
> * *
> * *
> * * * *
> * * * * * *
> * * * * * 5 * * * * *
> * * * * * *
> * * * *
> * *
> * VERSION 2.6.3.2 2018-06-22 *
> * *
> * The MadGraph5_aMC@NLO Development Team - Find us at *
> * https://server06.fynu.ucl.ac.be/projects/madgraph *
> * and *
> * http://amcatnlo.web.cern.ch/amcatnlo/ *
> * *
> * Type 'help' for in-line help. *
> * Type 'tutorial' to learn how MG5 works *
> * Type 'tutorial aMCatNLO' to learn how aMC@NLO works *
> * Type 'tutorial MadLoop' to learn how MadLoop works *
> * *
> ************************************************************
> load MG5 configuration from ../input/mg5_configuration.txt
> None does not seem to correspond to a valid fastjet-config executable (v3+). We will use fjcore instead.
> Please set the 'fastjet'variable to the full (absolute) /PATH/TO/fastjet-config (including fastjet-config).
> MG5_aMC> set fastjet /PATH/TO/fastjet-config
>
> lhapdf-config does not seem to correspond to a valid lhapdf-config executable.
> Please set the 'lhapdf' variable to the (absolute) /PATH/TO/lhapdf-config (including lhapdf-config).
> Note that you can still compile and run aMC@NLO with the built-in PDFs
> MG5_aMC> set lhapdf /PATH/TO/lhapdf-config
>
> Using default text editor "vi". Set another one in ./input/mg5_configuration.txt
> No valid eps viewer found. Please set in ./input/mg5_configuration.txt
> Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt
> INFO: Restrict model sm with file ../models/sm/restrict_default.dat .
> INFO: Run "set stdout_level DEBUG" before import for more information.
> INFO: Change particles name to pass to MG5 convention
> Defined multiparticle p = g u c d s u~ c~ d~ s~
> Defined multiparticle j = g u c d s u~ c~ d~ s~
> Defined multiparticle l+ = e+ mu+
> Defined multiparticle l- = e- mu-
> Defined multiparticle vl = ve vm vt
> Defined multiparticle vl~ = ve~ vm~ vt~
> Defined multiparticle all = g u c d s u~ c~ d~ s~ a ve vm vt e- mu- ve~ vm~ vt~ e+ mu+ t b t~ b~ z w+ h w- ta- ta+
> MG5_aMC>
>
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

 Joseph Bevelacqua (jack-224) said on 2018-08-16: #2

Thank you for the suggestions. I performed the following:

Sudo_apt_install_v1
Sudo_apt_install lhapds
Set fastjet/PATH/TO/fast-jet-config
Set lhapdf /PATH/TO/lhapdf-config

Unfortunately there was no change in the output (Appended)

Any suggestions on how to proceed?

************************************************************
* *
* W E L C O M E to *
* M A D G R A P H 5 _ a M C @ N L O *
* *
* *
* * * *
* * * * * *
* * * * * 5 * * * * *
* * * * * *
* * * *
* *
* VERSION 2.6.3.2 2018-06-22 *
* *
* The MadGraph5_aMC@NLO Development Team - Find us at *
* and *
* http://amcatnlo.web.cern.ch/amcatnlo/ *
* *
* Type 'help' for in-line help. *
* Type 'tutorial' to learn how MG5 works *
* Type 'tutorial aMCatNLO' to learn how aMC@NLO works *
* Type 'tutorial MadLoop' to learn how MadLoop works *
* *
************************************************************
load MG5 configuration from ../input/mg5_configuration.txt
None does not seem to correspond to a valid fastjet-config executable (v3+). We will use fjcore instead.
Please set the 'fastjet'variable to the full (absolute) /PATH/TO/fastjet-config (including fastjet-config).
MG5_aMC> set fastjet /PATH/TO/fastjet-config

lhapdf-config does not seem to correspond to a valid lhapdf-config executable.
Please set the 'lhapdf' variable to the (absolute) /PATH/TO/lhapdf-config (including lhapdf-config).
Note that you can still compile and run aMC@NLO with the built-in PDFs
MG5_aMC> set lhapdf /PATH/TO/lhapdf-config

Using default text editor "vi". Set another one in ./input/mg5_configuration.txt
No valid eps viewer found. Please set in ./input/mg5_configuration.txt
Using default web browser "firefox". Set another one in ./input/mg5_configuration.txt
INFO: Restrict model sm with file ../models/sm/restrict_default.dat .
INFO: Run "set stdout_level DEBUG" before import for more information.
INFO: Change particles name to pass to MG5 convention
Defined multiparticle p = g u c d s u~ c~ d~ s~
Defined multiparticle j = g u c d s u~ c~ d~ s~
Defined multiparticle l+ = e+ mu+
Defined multiparticle l- = e- mu-
Defined multiparticle vl = ve vm vt
Defined multiparticle vl~ = ve~ vm~ vt~
Defined multiparticle all = g u c d s u~ c~ d~ s~ a ve vm vt e- mu- ve~ vm~ vt~ e+ mu+ t b t~ b~ z w+ h w- ta- ta+
MG5_aMC>

 Olivier Mattelaer (olivier-mattelaer) said on 2018-08-17: #3

What are those commands?
Sudo_apt_install_v1
Sudo_apt_install lhapds

Now you have your interface working.
You can just type "tutorial" to learn how MG5aMC is working

Cheers,

Olivier

 Joseph Bevelacqua (jack-224) said on 2018-08-23: #4

Thank you for the suggestion to run the tutorial. After correcting numerous errors (red output), I managed to complete the run. The output produced a cross section of 505.7+-0.79 pb for pp 6500.0x6500.0 GeV. Does this mean the code is running properly. I am still getting the previously noted "errors messages" but they may just be warnings.

Could you be kind enough to provide an input file that I could run with the test output to satisfy me that the code is in fact properly installed. The input file would be the list of input commends to be input through the terminal after the ./bin mg5_aMC command.

 Olivier Mattelaer (olivier-mattelaer) said on 2018-08-23: #5

Yes your code is working and if I run
generate p p > t t~; output; launch

then I get:
=== Results Summary for run: run_01 tag: tag_1 ===

Cross-section : 505.7 +- 0.7905 pb
Nb of events : 10000
INFO: Running Systematics computation
INFO: Idle: 1, Running: 3, Completed: 0 [ current time: 17h09 ]
INFO: Idle: 0, Running: 3, Completed: 1 [ 25.6s ]
INFO: # events generated with PDF: NNPDF23_lo_as_0130_qed (247000)
INFO: #Will Compute 145 weights per event.
INFO: #***************************************************************************
#
# original cross-section: 505.594336865
# scale variation: +30.3% -21.7%
# central scheme variation: +5.79e-09% -26.1%
# PDF variation: +4.26% -4.26%
#
# dynamical scheme # 1 : 484.085 +30.2% -21.7% # \sum ET
# dynamical scheme # 2 : 395.643 +27.8% -20.5% # \sum\sqrt{m^2+pt^2}
# dynamical scheme # 3 : 505.594 +30.3% -21.7% # 0.5 \sum\sqrt{m^2+pt^2}
# dynamical scheme # 4 : 373.883 +27.1% -20.2% # \sqrt{\hat s}
#***************************************************************************

You probably do not have the systematic information (the theoretical error) in your case since you do not have lhapdf linked to the code.

Cheers,

Olivier

> On 23 Aug 2018, at 04:32, Joseph Bevelacqua <email address hidden> wrote:
>
> Question #672314 on MadGraph5_aMC@NLO changed:
>
> Status: Answered => Open
>
> Joseph Bevelacqua is still having a problem:
> Thank you for the suggestion to run the tutorial. After correcting
> numerous errors (red output), I managed to complete the run. The output
> produced a cross section of 505.7+-0.79 pb for pp 6500.0x6500.0 GeV.
> Does this mean the code is running properly. I am still getting the
> previously noted "errors messages" but they may just be warnings.
>
> Could you be kind enough to provide an input file that I could run with
> the test output to satisfy me that the code is in fact properly
> installed. The input file would be the list of input commends to be
> input through the terminal after the ./bin mg5_aMC command.
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

 Joseph Bevelacqua (jack-224) said on 2018-08-31: #6

Olivier,

Your last response was most helpful. I spent considerable time reviewing the code output files and a number of your publications.

I ran a few additional examples that suggest the code is running properly:

p p > t t~
6500x6500 Gev 505.7+-0.79 pb
7000x7000 GeV 579.2+-0.92 pb
mu+ mu- > e+ e- 6500x6500 GeV 0.0006152+-5.4e-07 pb

Please confirm these results.

In changing the energy, I needed to use my text editor (xed) to physically edit the card. I could not do this within the terminal. Is this a consequence of not having vi installed? Should I be able to edit the accelerator energy within the terminal?

How do I change the model from the sm to another option?

I would like to install the remaining codes including pythia. What specific commands do I do to accomplish this? If a fail to do this properly will it destroy what is currently installed and apparently working.

Again, thank you for your kind assistance.

 Olivier Mattelaer (olivier-mattelaer) said on 2018-09-01: #7

Dear Joseph,

> Please confirm these results.

I'm not going to check every number that you generate with our code.
If you do not trust those numbers then please run another code (sherpa, whizard, calchep)
and compare the number. This is actually a non trivial task since you have many details who does not match between those program (the dynamical scale choice for example).

> In changing the energy, I needed to use my text editor (xed) to
> physically edit the card. I could not do this within the terminal. Is
> this a consequence of not having vi installed? Should I be able to edit
> the accelerator energy within the terminal?

You can use the
set ebeam 6500
command to edit the beam energy (in this case both of them, to change only one you can use
set ebeam1 6500 or set ebeam2 6500)
This has to be done when the code ask you to edit the cards (so AFTER the launch not before)

> How do I change the model from the sm to another option?

Please re-run the tutorial.
(short answer import model XXXX)
where you have to replace XXXX by the name of your model

> I would like to install the remaining codes including pythia. What
> specific commands do I do to accomplish this? If a fail to do this
> properly will it destroy what is currently installed and apparently
> working.

Every code is coming without any warranty. You should be aware that any action using such code can remove
all the files of your computer. This being said, in general installing pythia does not destroy anything.
But we indeed faces three cases where the above happened.

Otherwise in principle the command "install pythia8" should be enough to have pythia working.
If it fails during the installation, please contact py8 author.
Note that we have known issue with the interface with py8 (in multicore) so if it crash at run time, try to run it in single core.

Cheers,

Olivier

> On 31 Aug 2018, at 04:37, Joseph Bevelacqua <email address hidden> wrote:
>
> Question #672314 on MadGraph5_aMC@NLO changed:
>
> Status: Answered => Open
>
> Joseph Bevelacqua is still having a problem:
> Olivier,
>
> Your last response was most helpful. I spent considerable time
> reviewing the code output files and a number of your publications.
>
> I ran a few additional examples that suggest the code is running
> properly:
>
> p p > t t~
> 6500x6500 Gev 505.7+-0.79 pb
> 7000x7000 GeV 579.2+-0.92 pb
> mu+ mu- > e+ e- 6500x6500 GeV 0.0006152+-5.4e-07 pb
>
> Please confirm these results.
>
> In changing the energy, I needed to use my text editor (xed) to
> physically edit the card. I could not do this within the terminal. Is
> this a consequence of not having vi installed? Should I be able to edit
> the accelerator energy within the terminal?
>
> How do I change the model from the sm to another option?
>
> I would like to install the remaining codes including pythia. What
> specific commands do I do to accomplish this? If a fail to do this
> properly will it destroy what is currently installed and apparently
> working.
>
> Again, thank you for your kind assistance.
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.