problem installing lhapdf6

Asked by Marzieh Bahmani

I tried to install lhapdf6 via MG5_aMC> install lhapdf6 -> I have errors and it doesn’t create bin and share directory
it creates /HEPTools/lhapdf6_py3/ in wich I have include lib and NNPDF23_lo_as_0130_qed
in the logfile

checking for python... /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/python/3.7.4-x86_64-centos7/bin/python3
checking for python version... 3.7

so I am sure it is not python version .

checking for Cython >= 0.19... no
checking if the g++ compiler accepts the -Qunused-arguments flag... no

from lhapdf.cpp:633:
/tmp/mbahmani/tmp7omj49x2/LHAPDF-6.3.0/include/LHAPDF/Info.h: In member function ‘T LHAPDF::Info::get_entry_as(const string&) const [with T = std::vector<int>; std::string = std::basic_string<$
/tmp/mbahmani/tmp7omj49x2/LHAPDF-6.3.0/include/LHAPDF/Info.h:189:28: error: range-based ‘for’ loops are not allowed in C++98 mode
     for (const string& s : strs) rtn.push_back( lexical_cast<int>(s) );

/tmp/mbahmani/tmp7omj49x2/LHAPDF-6.3.0/include/LHAPDF/KnotArray.h:175:25: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 [enabled by default]
     size_t _xgridhash = 0;
                         ^
In file included from lhapdf.cpp:633:0:
../../include/LHAPDF/PDF.h:30:13: error: ‘unique_ptr’ does not name a type
     typedef unique_ptr<AlphaS> AlphaSPtr;

error: command 'g++' failed with exit status 1
make[2]: *** [all-local] Error 1
make[2]: Leaving directory `/tmp/mbahmani/tmp7omj49x2/LHAPDF-6.3.0/wrappers/python'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/mbahmani/tmp7omj49x2/LHAPDF-6.3.0/wrappers'
make: *** [all-recursive] Error 1

can you help me with this. many thanks

Question information

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

I'm not lhapdf expert (and not part of their support team)
But I would say that you c++ compiler is too old to compile that code.
Please check the requirement on the lhapdf website.

Cheers,

Olivier

> On 17 Aug 2021, at 12:30, Marzieh Bahmani <email address hidden> wrote:
>
> New question #698401 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/698401
>
> I tried to install lhapdf6 via MG5_aMC> install lhapdf6 -> I have errors and it doesn’t create bin and share directory
> it creates /HEPTools/lhapdf6_py3/ in wich I have include lib and NNPDF23_lo_as_0130_qed
> in the logfile
>
> checking for python... /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/python/3.7.4-x86_64-centos7/bin/python3
> checking for python version... 3.7
>
> so I am sure it is not python version .
>
> checking for Cython >= 0.19... no
> checking if the g++ compiler accepts the -Qunused-arguments flag... no
>
> from lhapdf.cpp:633:
> /tmp/mbahmani/tmp7omj49x2/LHAPDF-6.3.0/include/LHAPDF/Info.h: In member function ‘T LHAPDF::Info::get_entry_as(const string&) const [with T = std::vector<int>; std::string = std::basic_string<$
> /tmp/mbahmani/tmp7omj49x2/LHAPDF-6.3.0/include/LHAPDF/Info.h:189:28: error: range-based ‘for’ loops are not allowed in C++98 mode
> for (const string& s : strs) rtn.push_back( lexical_cast<int>(s) );
>
> /tmp/mbahmani/tmp7omj49x2/LHAPDF-6.3.0/include/LHAPDF/KnotArray.h:175:25: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 [enabled by default]
> size_t _xgridhash = 0;
> ^
> In file included from lhapdf.cpp:633:0:
> ../../include/LHAPDF/PDF.h:30:13: error: ‘unique_ptr’ does not name a type
> typedef unique_ptr<AlphaS> AlphaSPtr;
>
> error: command 'g++' failed with exit status 1
> make[2]: *** [all-local] Error 1
> make[2]: Leaving directory `/tmp/mbahmani/tmp7omj49x2/LHAPDF-6.3.0/wrappers/python'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/tmp/mbahmani/tmp7omj49x2/LHAPDF-6.3.0/wrappers'
> make: *** [all-recursive] Error 1
>
> can you help me with this. many thanks
>
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Marzieh Bahmani (marziehbahmani) said :
#2

ok thanks , i used this version on lxplus7 : source /cvmfs/sft.cern.ch/lcg/releases/LCG_87/gcc/6.2.0/x86_64-centos7/setup.sh
and it works now.

cheers