install madgraph

Asked by Halley Xiong on 2020-09-21

Hi , experts
  My linux version is ubuntu20.04, only python 3 support in this version. I am wondering which version of madgraph is suitable in my computer. I used to install madgraph 2.8, but when I install pythia , I met some problems. On the other hand , I see that you suggest that do not install madgraph as root , but I always meet permission denied when I install it, so I had to use 'sudo' to install it . How can I install madgraph for all users? I remove madgraph from my computer and decide to install again, I sincerely hope you can give me some advice, so I can use madgraph successfully and install all the packages.
 Best wishes!

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Olivier Mattelaer
Solved:
2020-09-21
Last query:
2020-09-21
Last reply:
2020-09-21

Hi,

They are no reason to use sudo/root for any installation of MG5aMC or of his dependencies.
We will never try to install anything outside of your main directory (where you have untar the MG5aMC directory). So as long as that directory is writable for you with a normal account you are good to go.

> On the other hand , I see that you suggest that do not install madgraph as root ,

My second job consist to install scientific software on a cluster. The first rule in that context is to NEVER perform any installation of scientific software with root privilege (I can confirm that scientist can not code safe code, I just have to look at the history of serious bug in MG5aMC which contain: reboot of machine and wiping full disk) .

 The correct method is to use a "normal" account (usually named "soft" or "install" or the non sudo account of your sysadmin --which allows tracking of who install it where) and give to that account (or group if you use the last method)
write access to places where you can do the installlation globally (in cluster environment you willl not install in /local/bin anyway)

So in this case, the correct method is
1) create a user soft
2) create a directory /madgraph (or where you want)
3) give user soft write/read access to that directory
4) untar MG5aMC in that directory
5) run ./bin/compile.py
6) launch mg5_aMC
6.1) generate a LO and NLO process to be sure that all initialization are correctly done
6.2 perform the installation that you need
7) add /madgraph/bin to the PATH of all your users via /etc/profile.d as usual (or better via a module)

Now with a non writable access for users, you will face two issues:
1) the users will not be able to automatically download lhapdf sets.
2) the users will face issues with UFO model (no auto-download, not possible for them to add them in
/madgraph/models

Both can be fixed via environment variable but this is not very user friendly.
I personally do not install MG5aMC system wide on the cluster that I manage and let the user install it themself. However I configure an environment variable
MADGRAPH_BASE=/nfs/soft/madgraph/
that directory only contains one file:
mg5_configuration.txt
where I configure the options of MG5aMC for the cluster:
> nb_core=5
> run_mode=1
> automatic_html_opening=False
> cluster_size = 150
> cluster_local_path = /cvmfs/cp3.uclouvain.be/madgraph/
> cluster_status_update = 900 60
> cluster_type = slurm
> cluster_retry_wait = 300
> lhapdf=/cvmfs/cp3.uclouvain.be/lhapdf/lhapdf-6.1.5_amd64_gcc44/bin/lhapdf-config

You can see here that I have link lhapdf to a pre-install version of lhapdf (and to a cvmfs server which has already all the pdf sets) which allows my user to not have to install that dependency. (I could have done the same for the other dependencies)
I have also changed the default run_mode to pass in cluster mode (with slurm) and other changes to the default as well.

Cheers,

Olivier

> On 21 Sep 2020, at 09:35, Halley Xiong <email address hidden> wrote:
>
> New question #693018 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/693018
>
> Hi , experts
> My linux version is ubuntu20.04, only python 3 support in this version. I am wondering which version of madgraph is suitable in my computer. I used to install madgraph 2.8, but when I install pythia , I met some problems. On the other hand , I see that you suggest that do not install madgraph as root , but I always meet permission denied when I install it, so I had to use 'sudo' to install it . How can I install madgraph for all users? I remove madgraph from my computer and decide to install again, I sincerely hope you can give me some advice, so I can use madgraph successfully and install all the packages.
> Best wishes!
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Halley Xiong (neuromance) said : #2

Thank you Olivier, I realize last time I put MG5 directory in /usr/local as usual , so now I try to install it in main directory. But I don't understand how to install it on the cluster. Also, I'm still confused about my first question :My linux version is ubuntu20.04, only python 3 support in this version. I am wondering which version of madgraph is suitable in my computer. Is madgraph 2.8 or madgraph 2.7?

You can use 2.7.3.py3 or you can use 2.8.0.
Both use by default python3 executables (note that we do not use the python executables)
and are compatible with python3.7 and python3.8.

They are also python2.7 compatible (but you need to specify the executable path)

Cheers,

Olivier

> On 21 Sep 2020, at 10:55, Halley Xiong <email address hidden> wrote:
>
> Question #693018 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/693018
>
> Halley Xiong posted a new comment:
> Thank you Olivier, I realize last time I put MG5 directory in /usr/local
> as usual , so now I try to install it in main directory. But I don't
> understand how to install it on the cluster. Also, I'm still confused
> about my first question :My linux version is ubuntu20.04, only python 3
> support in this version. I am wondering which version of madgraph is
> suitable in my computer. Is madgraph 2.8 or madgraph 2.7?
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Halley Xiong (neuromance) said : #4

Thanks Olivier Mattelaer, that solved my question.