how to indicate the path to the lhapdf-config executable input/mg5_configuration.txt

Asked by Steven Jeremies

Hello,

trying to change the pdf set used my madgraph I got the following error:

Command "generate_events run_01" interrupted with error:
Exception : lhapdf executable (lhapdf-config) is not found on your system. Please install it and/or indicate the path to the correct executable in input/mg5_configuration.txt

I looked into this text file and for many other packages there is already a line with a path but for the lhapdf section there is none. I naively tried to add a similar path line but I got the same error. So my question is where in this file can I put the path of the lhapdf-config executable.

Thanks in advance!

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Steven Jeremies
Solved:
Last query:
Last reply:
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#1

This depend if you run with python2 or python3
but those are the associated lines that you can edit to specify the path to lhapdf-config file.

#! lhapdf-config --can be specify differently depending of your python version
#! If None: try to find one available on the system
# lhapdf_py2 = lhapdf-config
# lhapdf_py3 = lhapdf-config

Cheers,

Olivier

> On 11 Aug 2021, at 23:01, Steven Jeremies <email address hidden> wrote:
>
> New question #698333 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/698333
>
> Hello,
>
> trying to change the pdf set used my madgraph I got the following error:
>
> Command "generate_events run_01" interrupted with error:
> Exception : lhapdf executable (lhapdf-config) is not found on your system. Please install it and/or indicate the path to the correct executable in input/mg5_configuration.txt
>
> I looked into this text file and for many other packages there is already a line with a path but for the lhapdf section there is none. I naively tried to add a similar path line but I got the same error. So my question is where in this file can I put the path of the lhapdf-config executable.
>
> Thanks in advance!
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Steven Jeremies (minits) said :
#2

I am sorry, I still dont get it.

In my case the path is /home/user/local/bin. Could you please make an example of where to put the path?
My tries failed.

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

You need first to check if this was compiled for python2 or for python3
and then set it as
lhapdf_py2 = /home/user/local/bin/lhapdf-config
or as
lhapdf_py3 = /home/user/local/bin/lhapdf-config

Cheers,

Olivier
> On 11 Aug 2021, at 23:35, Steven Jeremies <email address hidden> wrote:
>
> Question #698333 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/698333
>
> Status: Answered => Open
>
> Steven Jeremies is still having a problem:
> I am sorry, I still dont get it.
>
> In my case the path is /home/user/local/bin. Could you please make an example of where to put the path?
> My tries failed.
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Steven Jeremies (minits) said :
#4

I still get the same error. Do you have any idea why this could be? I use the 6.3.0 version of lhapdf. Could this be a problem?

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

What is printed if you do the following

./bin/mg5_aMC
display options lhapdf

Cheers,

Olivier

> On 12 Aug 2021, at 09:35, Steven Jeremies <email address hidden> wrote:
>
> Question #698333 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/698333
>
> Status: Answered => Open
>
> Steven Jeremies is still having a problem:
> I still get the same error. Do you have any idea why this could be? I
> use the 6.3.0 version of lhapdf. Could this be a problem?
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Steven Jeremies (minits) said :
#6

                         MadGraph5_aMC@NLO Options
                          ----------------

                         MadEvent Options
                          ----------------

                      Configuration Options
                      ---------------------
                     lhapdf : lhapdf-config
                 lhapdf_py2 : None
                 lhapdf_py3 : None

this is the output

Revision history for this message
Steven Jeremies (minits) said :
#7

I would highly appreciate any new suggestions on my problem.

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

Did you forget to remove the "#" in the file?
Otherwise you can also set the parameter via the command line interface
set lhapdf_py3 /home/user/local/bin/lhapdf-config

The other possibility is that you edit the wrong file. If you look at the log you will see the set of configuration file (and their order) that are used. if you do not edit the latest one of the list, then check that further configuration do not edit that value too.

Cheers,

Olivier

Revision history for this message
Steven Jeremies (minits) said :
#9

Hello Olivier,

embarrassingly yes, I missed to cancel the '#'. However, now I get the error:

Command "generate_events run_01" interrupted with error:
PermissionError : [Errno 13] Permission denied: '/home/user/local/bin/lhapdf-config'

Do you know what the reason for this could be?

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

Looks like a unix permission error.
if you do ls -l /home/user/local/bin/lhapdf-config
you should be able to see who has the permission to run such executable.
and then the owner of the file (or a sudoers) can update the permission to give you access.

Cheers,

Olivier

> On 15 Aug 2021, at 22:30, Steven Jeremies <email address hidden> wrote:
>
> Question #698333 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/698333
>
> Status: Answered => Open
>
> Steven Jeremies is still having a problem:
> Hello Olivier,
>
> embarrassingly yes, I missed to cancel the '#'. However, now I get the
> error:
>
> Command "generate_events run_01" interrupted with error:
> PermissionError : [Errno 13] Permission denied: '/home/user/local/bin/lhapdf-config'
>
> Do you know what the reason for this could be?
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Steven Jeremies (minits) said :
#11

Thanks a lot!