Installing LHAPDF and linking with MadGraph

Asked by Tanvi Wamorkar

Dear MadGraph Experts,

I'm trying to use the "MSTWnlo2008" LHAPDF with MadGraph v3.4.2 but am facing issues with setting the lhapdf parameter in the MG input configuration file (MG5_aMC_v3_4_2/input/mg5_configuration.txt).

Here are the steps I followed to install LHAPDF:

1. Follow the instructions here (https://lhapdf.hepforge.org/install.html) and install LHAPDF-6.5.3 :
     wget https://lhapdf.hepforge.org/downloads/?f=LHAPDF-6.5.3.tar.gz -O LHAPDF-6.5.3.tar.gz
     tar xf LHAPDF-6.5.3.tar.gz
     cd LHAPDF-6.5.3
    ./configure --prefix=/installation_path/
    make
    make install

This step finishes successfully

2. Download PDF set "MSTWnlo2008" (https://lhapdf.hepforge.org/pdfsets.html) and place it in the LHAPDF-6.5.3 base directory.

3. In the MG configuration file (MG5_aMC_v3_4_2/input/mg5_configuration.txt), I add:
    lhapdf = /LHAPDF installation path/LHAPDF-6.5.3/bin/lhapdf-config

4. In my .bashrc file I add the lines:
    export PATH= /LHAPDF installation path/LHAPDF-6.5.3/bin:$PATH
    export LD_LIBRARY_PATH=/LHAPDF installation path/LHAPDF-6.5.3/lib:$LD_LIBRARY_PATH
    export LHAPDF_DATA_PATH=/LHAPDF installation path/LHAPDF-6.5.3/MSTW2008nlo68cl:$LHAPDF_DATA_PATH

Then, when I run MadGraph with the command ./bin/mg5_aMC I run into the error ""/LHAPDF installation path/LHAPDF-6.5.3/bin/lhapdf-config does not seem to correspond to a valid lhapdf-config executable.""

Could you please point out if I am making a mistake in the installation procedure?

Thank you,
Tanvi

Question information

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

Hi,

I do not spot anything deeply wrong here.

So I have quite low level comment to offer:
1) Is:
> /LHAPDF installation path/LHAPDF-6.5.3/bin/lhapdf-config
exists/

2) is that file executable
3) what is happening when running that file.
(it should print a couple of informtion normally)

Cheers,

Olivier

> On 8 Mar 2023, at 21:45, Tanvi Wamorkar <email address hidden> wrote:
>
> New question #705765 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/705765
>
> Dear MadGraph Experts,
>
> I'm trying to use the "MSTWnlo2008" LHAPDF with MadGraph v3.4.2 but am facing issues with setting the lhapdf parameter in the MG input configuration file (MG5_aMC_v3_4_2/input/mg5_configuration.txt).
>
> Here are the steps I followed to install LHAPDF:
>
> 1. Follow the instructions here (https://lhapdf.hepforge.org/install.html) and install LHAPDF-6.5.3 :
> wget https://lhapdf.hepforge.org/downloads/?f=LHAPDF-6.5.3.tar.gz -O LHAPDF-6.5.3.tar.gz
> tar xf LHAPDF-6.5.3.tar.gz
> cd LHAPDF-6.5.3
> ./configure --prefix=/installation_path/
> make
> make install
>
> This step finishes successfully
>
> 2. Download PDF set "MSTWnlo2008" (https://lhapdf.hepforge.org/pdfsets.html) and place it in the LHAPDF-6.5.3 base directory.
>
> 3. In the MG configuration file (MG5_aMC_v3_4_2/input/mg5_configuration.txt), I add:
> lhapdf = /LHAPDF installation path/LHAPDF-6.5.3/bin/lhapdf-config
>
> 4. In my .bashrc file I add the lines:
> export PATH= /LHAPDF installation path/LHAPDF-6.5.3/bin:$PATH
> export LD_LIBRARY_PATH=/LHAPDF installation path/LHAPDF-6.5.3/lib:$LD_LIBRARY_PATH
> export LHAPDF_DATA_PATH=/LHAPDF installation path/LHAPDF-6.5.3/MSTW2008nlo68cl:$LHAPDF_DATA_PATH
>
> Then, when I run MadGraph with the command ./bin/mg5_aMC I run into the error ""/LHAPDF installation path/LHAPDF-6.5.3/bin/lhapdf-config does not seem to correspond to a valid lhapdf-config executable.""
>
> Could you please point out if I am making a mistake in the installation procedure?
>
> Thank you,
> Tanvi
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Tanvi Wamorkar (tanviw) said :
#2

Hi Olivier,

Thank you for your reply.

1. Yes, the lhapdf-config file exists.

2. It is an executable.

3. On running it, the following message is printed:

lhapdf-config: configuration tool for the LHAPDF
               parton density function evolution library
               http://projects.hepforge.org/lhapdf/

Usage: lhapdf-config [options]
Options:
  --help | -h : show this help message
  --prefix : show the installation prefix (cf. autoconf)
  --incdir : show the path to the LHAPDF C++ header directory
  --libdir : show the path to the LHAPDF library directory
  --datadir : show the path to the LHAPDF data directory

  --cxx : get compiler (including -std=c++11 flag or equiv)
  --cflags : get compiler flags (aka --cppflags|--cxxflags)
  --libs : get linker flags (aka --ldflags)

  --version : return LHAPDF release version number

I realised that the datadir was not set to the correct path, and on fixing that I am able to get past the previous error.

But now, I run into the following:
"Command "launch auto " interrupted with error:
FileNotFoundError : [Errno 2] No such file or directory: '/lcrc/group/ATLAS/users/twamorkar/MG5_aMC_v3_4_2/PROCNLO_loop_sm_1/SubProcesses/P0_uux_wpzwm/test_ME.log'"

The entire message dump is here:

launch PROCNLO_loop_sm_1
INFO: ************************************************************
* *
* 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 3.4.2 2023-01-20 *
* *
* The MadGraph5_aMC@NLO Development Team - Find us at *
* http://amcatnlo.cern.ch *
* *
* Type 'help' for in-line help. *
* *
************************************************************
INFO: load configuration from /lcrc/group/ATLAS/users/twamorkar/MG5_aMC_v3_4_2/PROCNLO_loop_sm_1/Cards/amcatnlo_configuration.txt
INFO: load configuration from /lcrc/group/ATLAS/users/twamorkar/MG5_aMC_v3_4_2/input/mg5_configuration.txt
INFO: load configuration from /lcrc/group/ATLAS/users/twamorkar/MG5_aMC_v3_4_2/PROCNLO_loop_sm_1/Cards/amcatnlo_configuration.txt
Using default text editor "vi". Set another one in ./input/mg5_configuration.txt
No valid web browser found. Please set in ./input/mg5_configuration.txt
launch auto
run_card missed argument time_of_flight. Takes default: -1.0
run_card missed argument pt_min_pdg. Takes default: {}
run_card missed argument pt_max_pdg. Takes default: {}
run_card missed argument mxx_min_pdg. Takes default: {}
The following switches determine which programs are run:
/================== Description ===================|================= values =================|========== other options ===========\
| 1. Type of perturbative computation | order = NLO | LO |
| 2. No MC@[N]LO matching / event generation | fixed_order = OFF | ON |
| 3. Shower the generated events | shower = OFF | PYTHIA6Q|PYTHIA6PT|HERWIG6 |
| 4. Decay onshell particles | madspin = OFF | ON|onshell |
| 5. Add weights to events for new hypp. | reweight = OFF | ON|NLO|NLO_TREE|LO |
| 6. Run MadAnalysis5 on the events generated | madanalysis = Not Avail | Please install module |
\==================================================================================================================================/
Either type the switch number (1 to 6) to change its setting,
Set any switch explicitly (e.g. type 'order=LO' at the prompt)
Type 'help' for the list of all valid option
Type '0', 'auto', 'done' or just press enter when you are done.[60s to answer]
>order=LO
The following switches determine which programs are run:
/================== Description ===================|================= values =================|========== other options ===========\
| 1. Type of perturbative computation | order = LO | NLO |
| 2. No MC@[N]LO matching / event generation | fixed_order = OFF | ON |
| 3. Shower the generated events | shower = OFF | PYTHIA6Q|PYTHIA6PT|HERWIG6 |
| 4. Decay onshell particles | madspin = OFF | ON|onshell |
| 5. Add weights to events for new hypp. | reweight = OFF | ON|NLO|NLO_TREE|LO |
| 6. Run MadAnalysis5 on the events generated | madanalysis = Not Avail | Please install module |
\==================================================================================================================================/
Either type the switch number (1 to 6) to change its setting,
Set any switch explicitly (e.g. type 'order=NLO' at the prompt)
Type 'help' for the list of all valid option
Type '0', 'auto', 'done' or just press enter when you are done.
>0
INFO: will run in mode: noshowerLO
run_card missed argument time_of_flight. Takes default: -1.0
run_card missed argument pt_min_pdg. Takes default: {}
run_card missed argument pt_max_pdg. Takes default: {}
run_card missed argument mxx_min_pdg. Takes default: {}
Do you want to edit a card (press enter to bypass editing)?
/------------------------------------------------------------\
| 1. param : param_card.dat |
| 2. run : run_card.dat |
\------------------------------------------------------------/
 you can also
   - enter the path to a valid card or banner.
   - use the 'set' command to modify a parameter directly.
     The set option works only for param_card and run_card.
     Type 'help set' for more information on this command.
   - call an external program (ASperGE/MadWidth/...).
     Type 'help' for the list of available command
 [0, done, 1, param, 2, run, enter path][90s to answer]
>0
INFO: Update the dependent parameter of the param_card.dat
WARNING: update the strong coupling value (alpha_s) to the value from the pdf selected: 0.1201789
run_card missed argument time_of_flight. Takes default: -1.0
run_card missed argument pt_min_pdg. Takes default: {}
run_card missed argument pt_max_pdg. Takes default: {}
run_card missed argument mxx_min_pdg. Takes default: {}
INFO: Starting run
Not able to open file /lcrc/group/ATLAS/users/twamorkar/MG5_aMC_v3_4_2/PROCNLO_loop_sm_1/crossx.html since no program configured.Please set one in ./input/mg5_configuration.txt
INFO: Compiling the code
run_card missed argument time_of_flight. Takes default: -1.0
run_card missed argument pt_min_pdg. Takes default: {}
run_card missed argument pt_max_pdg. Takes default: {}
run_card missed argument mxx_min_pdg. Takes default: {}
run_card missed argument shower_scale_factor. Takes default: 1.0
run_card missed argument muf_ref_fixed. Takes default: 91.188
run_card missed argument dynamical_scale_choice. Takes default: [-1]
run_card missed argument muf_over_ref. Takes default: 1.0
run_card missed argument rw_rscale. Takes default: [1.0, 2.0, 0.5]
run_card missed argument rw_fscale. Takes default: [1.0, 2.0, 0.5]
run_card missed argument store_rwgt_info. Takes default: False
run_card missed argument gamma_is_j. Takes default: True
run_card missed argument rphreco. Takes default: 0.1
run_card missed argument etaphreco. Takes default: -1.0
run_card missed argument lepphreco. Takes default: True
run_card missed argument quarkphreco. Takes default: True
run_card missed argument pineappl. Takes default: False
INFO: Using LHAPDF v6.5.3 interface for PDFs
INFO: Compiling source...
INFO: ...done, continuing with P* directories
INFO: Compiling directories...
INFO: Compiling on 36 cores
INFO: Compiling P0_uux_wpzwm...
INFO: Compiling P0_ddx_wpzwm...
INFO: Compiling P0_uxu_wpzwm...
INFO: Compiling P0_dxd_wpzwm...
WARNING: fct <function compile_dir at 0x2b9afb1245e0> does not return 0. Stopping the code in a clean way. The error was:
A compilation Error occurs when trying to compile /lcrc/group/ATLAS/users/twamorkar/MG5_aMC_v3_4_2/PROCNLO_loop_sm_1/SubProcesses/P0_ddx_wpzwm.
The compilation fails with the following output message:
    gfortran -O -fno-automatic -ffixed-line-length-132 -c -I. -I../../lib/ parton_lum_1.f
    parton_lum_1.f:55: Error: Can't open included file 'eepdf.inc'
    make: *** [parton_lum_1.o] Error 1

Please try to fix this compilations issue and retry.
Help might be found at https://answers.launchpad.net/mg5amcnlo.
If you think that this is a bug, you can report this at https://bugs.launchpad.net/mg5amcnlo
WARNING: fct <function compile_dir at 0x2b9afb1245e0> does not return 0. Stopping the code in a clean way. The error was:
A compilation Error occurs when trying to compile /lcrc/group/ATLAS/users/twamorkar/MG5_aMC_v3_4_2/PROCNLO_loop_sm_1/SubProcesses/P0_dxd_wpzwm.
The compilation fails with the following output message:
    gfortran -O -fno-automatic -ffixed-line-length-132 -c -I. -I../../lib/ parton_lum_1.f
    parton_lum_1.f:55: Error: Can't open included file 'eepdf.inc'
    make: *** [parton_lum_1.o] Error 1

Please try to fix this compilations issue and retry.
Help might be found at https://answers.launchpad.net/mg5amcnlo.
If you think that this is a bug, you can report this at https://bugs.launchpad.net/mg5amcnlo
WARNING: fct <function compile_dir at 0x2b9afb1245e0> does not return 0. Stopping the code in a clean way. The error was:
A compilation Error occurs when trying to compile /lcrc/group/ATLAS/users/twamorkar/MG5_aMC_v3_4_2/PROCNLO_loop_sm_1/SubProcesses/P0_uux_wpzwm.
The compilation fails with the following output message:
    gfortran -O -fno-automatic -ffixed-line-length-132 -c -I. -I../../lib/ parton_lum_1.f
    parton_lum_1.f:55: Error: Can't open included file 'eepdf.inc'
    make: *** [parton_lum_1.o] Error 1

Please try to fix this compilations issue and retry.
Help might be found at https://answers.launchpad.net/mg5amcnlo.
If you think that this is a bug, you can report this at https://bugs.launchpad.net/mg5amcnlo
WARNING: fct <function compile_dir at 0x2b9afb1245e0> does not return 0. Stopping the code in a clean way. The error was:
A compilation Error occurs when trying to compile /lcrc/group/ATLAS/users/twamorkar/MG5_aMC_v3_4_2/PROCNLO_loop_sm_1/SubProcesses/P0_uxu_wpzwm.
The compilation fails with the following output message:
    gfortran -O -fno-automatic -ffixed-line-length-132 -c -I. -I../../lib/ parton_lum_1.f
    parton_lum_1.f:55: Error: Can't open included file 'eepdf.inc'
    make: *** [parton_lum_1.o] Error 1

Please try to fix this compilations issue and retry.
Help might be found at https://answers.launchpad.net/mg5amcnlo.
If you think that this is a bug, you can report this at https://bugs.launchpad.net/mg5amcnlo
WARNING: Compilation of the Subprocesses failed
INFO:
INFO: Checking test output:
INFO: P0_uux_wpzwm
INFO: Result for test_ME:
Command "launch auto " interrupted with error:
FileNotFoundError : [Errno 2] No such file or directory: '/lcrc/group/ATLAS/users/twamorkar/MG5_aMC_v3_4_2/PROCNLO_loop_sm_1/SubProcesses/P0_uux_wpzwm/test_ME.log'

Revision history for this message
Tanvi Wamorkar (tanviw) said :
#3

Hi Olivier,

I wanted to touch base again. I actually checked and the file "eepdf.inc" does exist, so I am not sure of the cause of this error. Any hints to debug this more would be very helpful.

Thank you,
Tanvi

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

That's weird .

Is it present here:
/lcrc/group/ATLAS/users/twamorkar/MG5_aMC_v3_4_2/PROCNLO_loop_sm_1/SubProcesses/P0_uxu_wpzwm/eepdf.inc
which type of filesystem is this?

Does symlink can create issue on such system? Is it based on a local cache?
Maybe this is an filesystem issue?

Olivier

Can you help with this problem?

Provide an answer of your own, or ask Tanvi Wamorkar for more information if necessary.

To post a message you must log in.