Compilation error when setting a pdf from lhapdf

Asked by Tobias Klingl

Hi,

when running madgraph (version 2.6.1) and pythia8 with the default pdfs everything works fine. But when using a different pdf from lhapdf (6.1.6), for example:

set pdlabel lhapdf
set lhaid 21000

the code crashes producing the Terminal output below. I've installed boost, lhapdf and pythia8 before within madgraph using the following commands:
  install boost
  install lhapdf
  install pythia8

Thanks for any help,
Tobias

INFO: Update the dependent parameter of the param_card.dat
Generating 10000 events with run name run_01
survey run_01
INFO: compile directory
Not able to open file /lustre/user/tklingl/madgraph/MG5_aMC_v2_6_1/test/crossx.html since no program configured.Please set one in ./input/mg5_configuration.txt
INFO: Using LHAPDF v6.1.6 interface for PDFs
INFO: Trying to download MSTW2008lo68cl
INFO: MSTW2008lo68cl successfully downloaded and stored in /lustre/user/tklingl/madgraph/MG5_aMC_v2_6_1/HEPTools/lhapdf6//share/LHAPDF
compile Source Directory
Error detected in "generate_events "
write debug file /lustre/user/tklingl/madgraph/MG5_aMC_v2_6_1/test/run_01_tag_1_debug.log
If you need help with this issue please contact us on https://answers.launchpad.net/mg5amcnlo
MadGraph5Error : A compilation Error occurs when trying to compile /lustre/user/tklingl/madgraph/MG5_aMC_v2_6_1/test/Source.
 The compilation fails with the following output message:
     /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/Gcc/gcc620_x86_64_slc6/6.2.0/x86_64-slc6/bin/gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o combine_events.o combine_events.f
     /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/Gcc/gcc620_x86_64_slc6/6.2.0/x86_64-slc6/bin/gfortran -o ../bin/internal/combine_events combine_events.o rw_events.o ranmar.o kin_functions.o open_file.o rw_routines.o alfas_functions.o setrun.o -L../lib/ -lmodel -lpdf -I/lustre/user/tklingl/madgraph/MG5_aMC_v2_6_1/HEPTools/lhapdf6/include -I/lustre/user/tklingl/madgraph/MG5_aMC_v2_6_1/HEPTools/boost/include -L/lustre/user/tklingl/madgraph/MG5_aMC_v2_6_1/HEPTools/lhapdf6//lib -lLHAPDF -lLHAPDF -lstdc++ -lbias
     ../lib//libpdf.a(pdf_lhapdf6.o): In function `lhapdf_getpdfsetlist_':
     pdf_lhapdf6.cc:(.text+0x40): undefined reference to `_ZN6LHAPDF16availablePDFSetsB5cxx11Ev'
     ../lib//libpdf.a(pdf_lhapdf6.o): In function `getdatapath_':
     pdf_lhapdf6.cc:(.text+0x286): undefined reference to `_ZN6LHAPDF5pathsB5cxx11Ev'
     ../lib//libpdf.a(pdf_lhapdf6.o): In function `setpdfpath_':
     pdf_lhapdf6.cc:(.text+0x7d5): undefined reference to `_ZN6LHAPDF5pathsB5cxx11Ev'
     pdf_lhapdf6.cc:(.text+0x9b4): undefined reference to `LHAPDF::setPaths(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
     ../lib//libpdf.a(pdf_lhapdf6.o): In function `LHAPDF::pathsPrepend(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
     pdf_lhapdf6.cc:(.text._ZN6LHAPDF12pathsPrependERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN6LHAPDF12pathsPrependERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x17): undefined reference to `_ZN6LHAPDF5pathsB5cxx11Ev'
     pdf_lhapdf6.cc:(.text._ZN6LHAPDF12pathsPrependERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN6LHAPDF12pathsPrependERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x1a9): undefined reference to `LHAPDF::setPaths(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
     ../lib//libpdf.a(pdf_lhapdf6.o): In function `LHAPDF::PDF::set() const':
     pdf_lhapdf6.cc:(.text._ZNK6LHAPDF3PDF3setEv[_ZNK6LHAPDF3PDF3setEv]+0x207): undefined reference to `LHAPDF::getPDFSet(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
     ../lib//libpdf.a(pdf_lhapdf6.o): In function `_ZN6LHAPDF11getPDFIndexB5cxx11Ev':
     pdf_lhapdf6.cc:(.text._ZN6LHAPDF11getPDFIndexB5cxx11Ev[_ZN6LHAPDF11getPDFIndexB5cxx11Ev]+0xcb): undefined reference to `LHAPDF::findFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
     ../lib//libpdf.a(pdf_lhapdf6.o): In function `lhapdf_amc::PDFSetHandler::loadMember(int)':
     pdf_lhapdf6.cc:(.text._ZN10lhapdf_amc13PDFSetHandler10loadMemberEi[_ZN10lhapdf_amc13PDFSetHandler10loadMemberEi]+0x189): undefined reference to `LHAPDF::mkPDF(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
     collect2: error: ld returned 1 exit status
     make: *** [../bin/internal/combine_events] 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
quit
INFO:

INFO:

Question information

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

Hi,
Hi,

Did you use the same compiler
to install lhapdf than the one that you are using now?
(i.e. /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/Gcc/gcc620_x86_64_slc6/6.2.0/x86_64-slc6/bin/gfortran<http://atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/Gcc/gcc620_x86_64_slc6/6.2.0/x86_64-slc6/bin/gfortran>)

Cheers,

Olivier

On 8 Mar 2018, at 16:32, Tobias Klingl <<email address hidden><mailto:<email address hidden>>> wrote:

New question #665380 on MadGraph5_aMC@NLO:
https://answers.launchpad.net/mg5amcnlo/+question/665380

Hi,

when running madgraph (version 2.6.1) and pythia8 with the default pdfs everything works fine. But when using a different pdf from lhapdf (6.1.6), for example:

set pdlabel lhapdf
set lhaid 21000

the code crashes producing the Terminal output below. I've installed boost, lhapdf and pythia8 before within madgraph using the following commands:
 install boost
 install lhapdf
 install pythia8

Thanks for any help,
Tobias

INFO: Update the dependent parameter of the param_card.dat
Generating 10000 events with run name run_01
survey run_01
INFO: compile directory
Not able to open file /lustre/user/tklingl/madgraph/MG5_aMC_v2_6_1/test/crossx.html since no program configured.Please set one in ./input/mg5_configuration.txt
INFO: Using LHAPDF v6.1.6 interface for PDFs
INFO: Trying to download MSTW2008lo68cl
INFO: MSTW2008lo68cl successfully downloaded and stored in /lustre/user/tklingl/madgraph/MG5_aMC_v2_6_1/HEPTools/lhapdf6//share/LHAPDF
compile Source Directory
Error detected in "generate_events "
write debug file /lustre/user/tklingl/madgraph/MG5_aMC_v2_6_1/test/run_01_tag_1_debug.log
If you need help with this issue please contact us on https://answers.launchpad.net/mg5amcnlo
MadGraph5Error : A compilation Error occurs when trying to compile /lustre/user/tklingl/madgraph/MG5_aMC_v2_6_1/test/Source.
The compilation fails with the following output message:
   /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/Gcc/gcc620_x86_64_slc6/6.2.0/x86_64-slc6/bin/gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o combine_events.o combine_events.f
   /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/Gcc/gcc620_x86_64_slc6/6.2.0/x86_64-slc6/bin/gfortran -o ../bin/internal/combine_events combine_events.o rw_events.o ranmar.o kin_functions.o open_file.o rw_routines.o alfas_functions.o setrun.o -L../lib/ -lmodel -lpdf -I/lustre/user/tklingl/madgraph/MG5_aMC_v2_6_1/HEPTools/lhapdf6/include -I/lustre/user/tklingl/madgraph/MG5_aMC_v2_6_1/HEPTools/boost/include -L/lustre/user/tklingl/madgraph/MG5_aMC_v2_6_1/HEPTools/lhapdf6//lib -lLHAPDF -lLHAPDF -lstdc++ -lbias
   ../lib//libpdf.a(pdf_lhapdf6.o): In function `lhapdf_getpdfsetlist_':
   pdf_lhapdf6.cc:(.text+0x40): undefined reference to `_ZN6LHAPDF16availablePDFSetsB5cxx11Ev'
   ../lib//libpdf.a(pdf_lhapdf6.o): In function `getdatapath_':
   pdf_lhapdf6.cc:(.text+0x286): undefined reference to `_ZN6LHAPDF5pathsB5cxx11Ev'
   ../lib//libpdf.a(pdf_lhapdf6.o): In function `setpdfpath_':
   pdf_lhapdf6.cc:(.text+0x7d5): undefined reference to `_ZN6LHAPDF5pathsB5cxx11Ev'
   pdf_lhapdf6.cc:(.text+0x9b4): undefined reference to `LHAPDF::setPaths(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
   ../lib//libpdf.a(pdf_lhapdf6.o): In function `LHAPDF::pathsPrepend(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
   pdf_lhapdf6.cc:(.text._ZN6LHAPDF12pathsPrependERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN6LHAPDF12pathsPrependERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x17): undefined reference to `_ZN6LHAPDF5pathsB5cxx11Ev'
   pdf_lhapdf6.cc:(.text._ZN6LHAPDF12pathsPrependERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN6LHAPDF12pathsPrependERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x1a9): undefined reference to `LHAPDF::setPaths(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
   ../lib//libpdf.a(pdf_lhapdf6.o): In function `LHAPDF::PDF::set() const':
   pdf_lhapdf6.cc:(.text._ZNK6LHAPDF3PDF3setEv[_ZNK6LHAPDF3PDF3setEv]+0x207): undefined reference to `LHAPDF::getPDFSet(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
   ../lib//libpdf.a(pdf_lhapdf6.o): In function `_ZN6LHAPDF11getPDFIndexB5cxx11Ev':
   pdf_lhapdf6.cc:(.text._ZN6LHAPDF11getPDFIndexB5cxx11Ev[_ZN6LHAPDF11getPDFIndexB5cxx11Ev]+0xcb): undefined reference to `LHAPDF::findFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
   ../lib//libpdf.a(pdf_lhapdf6.o): In function `lhapdf_amc::PDFSetHandler::loadMember(int)':
   pdf_lhapdf6.cc:(.text._ZN10lhapdf_amc13PDFSetHandler10loadMemberEi[_ZN10lhapdf_amc13PDFSetHandler10loadMemberEi]+0x189): undefined reference to `LHAPDF::mkPDF(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
   collect2: error: ld returned 1 exit status
   make: *** [../bin/internal/combine_events] 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
quit
INFO:

INFO:

--
You received this question notification because you are an answer
contact for MadGraph5_aMC@NLO.

Revision history for this message
Tobias Klingl (tklingl) said :
#2

Thanks for this quick reply! To be honest i am not sure. I will reinstall lhapdf with the same compiler now and test it again. I can simply recompile lhdapf using

  install lhapdf

right?

Cheers,
Tobias

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

yes you can.

> On 8 Mar 2018, at 16:57, Tobias Klingl <email address hidden> wrote:
>
> Question #665380 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/665380
>
> Tobias Klingl posted a new comment:
> Thanks for this quick reply! To be honest i am not sure. I will
> reinstall lhapdf with the same compiler now and test it again. I can
> simply recompile lhdapf using
>
> install lhapdf
>
> right?
>
> Cheers,
> Tobias
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Tobias Klingl (tklingl) said :
#4

Recompling fixed the problem. Thank you very much.