LHAPDF not working

Asked by Diego Baron

Dear experts,

I have installed LHAPDF following the following instructions: https://lhapdf.hepforge.org/install.html
The compilation is ok and I can load successfully the LHAPDF library in python by doing

python3
import lhapdf

I also set
lhapdf = /my_home_dir/MCGeneration/MG_Private_Install/LHAPDF_Install/bin/lhapdf-config

However, if I try using LHAPDF with the following options in my run card
lhapdf = pdflabel
303000 = lhaid

I get the following error

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.11800230471993879
Generating 10 events with run name run_01
survey run_01
INFO: compile directory
Not able to open file /home/dbaronmo/MCGeneration/MG_Private_Install/PROC_sm_3/crossx.html since no program configured.Please set one in ./input/mg5_configuration.txt
INFO: Using LHAPDF v6.5.4 interface for PDFs
compile Source Directory
Using random number seed offset = 21
INFO: Running Survey
Creating Jobs
Working on SubProcesses
INFO: Compiling for process 1/1.
INFO: P1_qq_llqq
Error detected in "generate_events run_01"
write debug file /home/dbaronmo/MCGeneration/MG_Private_Install/PROC_sm_3/run_01_tag_1_debug.log
If you need help with this issue please contact us on https://answers.launchpad.net/mg5amcnlo
str : A compilation Error occurs when trying to compile /home/dbaronmo/MCGeneration/MG_Private_Install/PROC_sm_3/SubProcesses/P1_qq_llqq.
 The compilation fails with the following output message:
     /home/dbaronmo/miniforge3/envs/MCGen/bin/x86_64-conda-linux-gnu-gfortran -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/dbaronmo/miniforge3/envs/MCGen/include -I/home/dbaronmo/miniforge3/envs/MCGen/include -O -ffixed-line-length-132 -w -c symmetry.f -I../../Source/ -I../../Source/PDF/gammaUPC
     /home/dbaronmo/miniforge3/envs/MCGen/bin/x86_64-conda-linux-gnu-gfortran -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/dbaronmo/miniforge3/envs/MCGen/include -I/home/dbaronmo/miniforge3/envs/MCGen/include -O -ffixed-line-length-132 -w -c idenparts.f -I../../Source/ -I../../Source/PDF/gammaUPC
     /home/dbaronmo/miniforge3/envs/MCGen/bin/x86_64-conda-linux-gnu-gfortran -o gensym symmetry.o idenparts.o -L../../lib/ -L../../lib/ -ldhelas -ldsample -lmodel -lgeneric -lpdf -lgammaUPC -lcernlib -O3 -I/home/dbaronmo/MCGeneration/MG_Private_Install/LHAPDF_Install/include -L/home/dbaronmo/MCGeneration/MG_Private_Install/LHAPDF_Install/lib -lLHAPDF -lLHAPDF -lbias -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/home/dbaronmo/miniforge3/envs/MCGen/lib -Wl,-rpath-link,/home/dbaronmo/miniforge3/envs/MCGen/lib -L/home/dbaronmo/miniforge3/envs/MCGen/lib
     /home/dbaronmo/miniforge3/envs/MCGen/bin/../lib/gcc/x86_64-conda-linux-gnu/13.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: ../../lib//libpdf.a(pdf_lhapdf62.o): relocation R_X86_64_32 against `.bss' can not be used when making a PIE object; recompile with -fPIE
     /home/dbaronmo/miniforge3/envs/MCGen/bin/../lib/gcc/x86_64-conda-linux-gnu/13.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: failed to set dynamic section sizes: bad value
     collect2: error: ld returned 1 exit status
     make: *** [makefile:62: gensym] 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

I don't know what could be happening or how to pass the suggested compiler flag to try again.

Thanks in advance for your help.

Best regards, Diego.

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,

The use of conda (or equivalent) environment are known to create issue with MG5aMC.
For years, our assumption was that if a user was playing with a compilation flag, we should notoverwrite those, since the user likely wants to have full control.
Recently, conda environment is setting such flag quite extensively, and therefore it leads to many crashes.
Some of them quite complicated to track/understand.

Now so far most of the complains was about NLO and not that much about LO.
In any case, you can update all the flags that you want via environment variable and just update those provided by conda.
Not sure which environment is responsible here... The likely three sensitive one are FFLAGS, CFLAGS and CXXFLAGS

If you have FFLAGS set then we will not set it to
-w -fPIC

So maybe the solution is to update your FFLAGS to add those two flags.
(or just to do
unset FFLAGS CFLAGS CXXFLAGS
to give us control on those variables)

Cheers,

Olivier

Can you help with this problem?

Provide an answer of your own, or ask Diego Baron for more information if necessary.

To post a message you must log in.