Problem interfacing LHAPDF-6.1.5 with MG5_aMC_v2_4_2

Asked by Bajarang

Hello Experts,

I am using Ubuntu 12.04.5 LTS, MG5_aMC_v2_4_2 and LHAPDF-6.1.5.

$ lhapdf-config --prefix
/home/bajarang

I have set the LHAPDFSYS in my ~/.bashrc
export LHAPDFSYS=$HOME
export PATH=${LHAPDFSYS}/bin:${PATH}
export LD_LIBRARY_PATH=${LHAPDFSYS}/lib:${LD_LIBRARY_PATH}

All the pdfs are in :
/home/bajarang/share/LHAPDF/CT10

Also boost version is BOOST_VERSION 104700

I am generating events for p p > W+ process.
with following changes in the run_card.dat
     lhapdf = pdlabel ! PDF set
     10800 = lhaid ! if pdlabel=lhapdf, this is the lhapdf number

I changed the input/mg5_configuration.txt as :
lhapdf = /home/bajarang/bin/lhapdf-config

I get a huge error, some of the last few lines I am pasting below :

/home/bajarang/packages/LHAPDF/LHAPDF-6.1.5/src/yamlcpp/conversion.cpp:57: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
            /home/bajarang/packages/LHAPDF/LHAPDF-6.1.5/src/yamlcpp/conversion.cpp:57: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
            /home/bajarang/packages/LHAPDF/LHAPDF-6.1.5/src/yamlcpp/conversion.cpp:64: undefined reference to `__cxa_guard_abort'
            ../lib//libLHAPDF.a(liblhapdf_yaml_cpp_la-conversion.o): In function `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_M_dispose(std::allocator<char> const&)':
            /usr/include/c++/4.6/bits/basic_string.h:244: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_M_destroy(std::allocator<char> const&)'
            ../lib//libLHAPDF.a(liblhapdf_yaml_cpp_la-conversion.o): In function `operator==<char, std::char_traits<char>, std::allocator<char> >':
            /usr/include/c++/4.6/bits/basic_string.h:2462: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(char const*) const'
            /usr/include/c++/4.6/bits/basic_string.h:2462: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(char const*) const'
            /usr/include/c++/4.6/bits/basic_string.h:2462: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(char const*) const'
            /usr/include/c++/4.6/bits/basic_string.h:2462: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(char const*) const'
            collect2: ld returned 1 exit status
            make: *** [../bin/internal/combine_events] Error 1

What am I doing wrong here? Please help. Thanks in advance.

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,

My guess is that you have compile lhapdf with a different compiler as the one used for MG5.
Can you ensure that both are using the same compiler?
(You can specify your compiler in the configuration file

Cheers,

Olivier

On 19 Jun 2017, at 11:43, Bajarang <<email address hidden><mailto:<email address hidden>>> wrote:

 undefined reference to `std::basic_string<char, std::char_traits<char>

Revision history for this message
Bajarang (bajjubaba) said :
#2

Hello Olivier,

Thanks for your quick reply.

I checked in the config.log of lhapdf. The compiler used was :
g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
That was long time back, maybe an year or something.

The current version is
g++ (Ubuntu 4.8.1-2ubuntu1~12.04) 4.8.1

I am not quite sure how to check the compiler used for MG5. (Maybe its the current version only)

What would you suggest for this version mismatch?

Regards,
Bajarang

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

MG5aMC is going to use your current version of the code.
So I would suggest to either
1) recompile lhapdf
2) change your current version of the code
3) force mg5 to use the same compiler as lhapdf (by forcing both gfortran a c++ compiler in input/mg5_configuration.txt)

Cheers,

Olivier

> On 19 Jun 2017, at 12:18, Bajarang <email address hidden> wrote:
>
> Question #644200 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/644200
>
> Status: Answered => Open
>
> Bajarang is still having a problem:
> Hello Olivier,
>
> Thanks for your quick reply.
>
> I checked in the config.log of lhapdf. The compiler used was :
> g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
> That was long time back, maybe an year or something.
>
> The current version is
> g++ (Ubuntu 4.8.1-2ubuntu1~12.04) 4.8.1
>
> I am not quite sure how to check the compiler used for MG5. (Maybe its
> the current version only)
>
> What would you suggest for this version mismatch?
>
> Regards,
> Bajarang
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Can you help with this problem?

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

To post a message you must log in.