lhapdf with undeclared identifier 'boost'

Asked by Ruibo Li

Hi Madgraph team
There is a problem about my MG5v2.4.2. I'm trying to run a process by linking lhapdf-6.2.1 correctly installed in my Mac, there is always error about "use of undeclared identifier 'boost' ". But indeed I have installed boost1.65.1 through Homebrew.
Here is my part debug log:
Error detected in "generate_events run_01 --nb_core=4"
write debug file /Users/Bob/Desktop/MG5/MG5_aMC_v2_4_2/bin/PROC_sm_10/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 /Users/Bob/Desktop/MG5/MG5_aMC_v2_4_2/bin/PROC_sm_10/Source.
 The compilation fails with the following output message:
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o StringCast.o StringCast.f
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o ranmar.o ranmar.f
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o alfas_functions_lhapdf.o alfas_functions_lhapdf.f
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o transpole.o transpole.f
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o invarients.o invarients.f
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o hfill.o hfill.f
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o pawgraphs.o pawgraphs.f
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o ran1.o ran1.f
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o rw_events.o rw_events.f
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o rw_routines.o rw_routines.f
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o kin_functions.o kin_functions.f
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o open_file.o open_file.f
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o basecode.o basecode.f
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o setrun.o setrun.f
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o run_printout.o run_printout.f
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o dgauss.o dgauss.f
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o readgrid.o readgrid.f
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o getissud.o getissud.f
     cd DHELAS; make
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o aloha_functions.o aloha_functions.f
     cd PDF; make
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o pdfwrap_lhapdf.o pdfwrap_lhapdf.f
     c++ -O -stdlib=libc++ -mmacosx-version-min=10.7 -O3 -I/usr/local/Cellar/lhapdf/6.2.1/include -c -o pdf_lhapdf6.o pdf_lhapdf6.cc
     cd MODEL; make
     cd CERNLIB; make
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o couplings.o couplings.f
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o abend.o abend.f
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o dlsqp2.o dlsqp2.f
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o lha_read.o lha_read.f
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o lenocc.o lenocc.f
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o mtlprt.o mtlprt.f
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o mtlset.o mtlset.f
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o radmul.o radmul.f
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o printout.o printout.f
     ar cru ../../lib/libcernlib.a abend.o dlsqp2.o lenocc.o mtlprt.o mtlset.o radmul.o
     ranlib ../../lib/libcernlib.a
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o FFV1_1.o FFV1_1.f
     pdf_lhapdf6.cc:44:11: error: use of undeclared identifier 'boost'
       typedef boost::shared_ptr<LHAPDF::PDF> PDFPtr;
Maybe I should link my boost file to lhapdf? How can i repair this problem?
By the way, I have install lhapdf6.2.1 by Homebrew as well.
Thank you in advance.

Best regards,
Ruibo Li

Question information

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

Hi,

lhapdf6.2 is not yet supported in MG5aMC, It is planned for the next version of the code (2.6.1).

Cheers,

Olivier

> On Nov 6, 2017, at 10:57, liruibo <email address hidden> wrote:
>
> New question #660392 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/660392
>
> Hi Madgraph team
> There is a problem about my MG5v2.4.2. I'm trying to run a process by linking lhapdf-6.2.1 correctly installed in my Mac, there is always error about "use of undeclared identifier 'boost' ". But indeed I have installed boost1.65.1 through Homebrew.
> Here is my part debug log:
> Error detected in "generate_events run_01 --nb_core=4"
> write debug file /Users/Bob/Desktop/MG5/MG5_aMC_v2_4_2/bin/PROC_sm_10/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 /Users/Bob/Desktop/MG5/MG5_aMC_v2_4_2/bin/PROC_sm_10/Source.
> The compilation fails with the following output message:
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o StringCast.o StringCast.f
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o ranmar.o ranmar.f
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o alfas_functions_lhapdf.o alfas_functions_lhapdf.f
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o transpole.o transpole.f
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o invarients.o invarients.f
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o hfill.o hfill.f
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o pawgraphs.o pawgraphs.f
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o ran1.o ran1.f
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o rw_events.o rw_events.f
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o rw_routines.o rw_routines.f
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o kin_functions.o kin_functions.f
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o open_file.o open_file.f
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o basecode.o basecode.f
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o setrun.o setrun.f
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o run_printout.o run_printout.f
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o dgauss.o dgauss.f
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o readgrid.o readgrid.f
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o getissud.o getissud.f
> cd DHELAS; make
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o aloha_functions.o aloha_functions.f
> cd PDF; make
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o pdfwrap_lhapdf.o pdfwrap_lhapdf.f
> c++ -O -stdlib=libc++ -mmacosx-version-min=10.7 -O3 -I/usr/local/Cellar/lhapdf/6.2.1/include -c -o pdf_lhapdf6.o pdf_lhapdf6.cc
> cd MODEL; make
> cd CERNLIB; make
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o couplings.o couplings.f
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o abend.o abend.f
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o dlsqp2.o dlsqp2.f
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o lha_read.o lha_read.f
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o lenocc.o lenocc.f
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o mtlprt.o mtlprt.f
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o mtlset.o mtlset.f
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o radmul.o radmul.f
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o printout.o printout.f
> ar cru ../../lib/libcernlib.a abend.o dlsqp2.o lenocc.o mtlprt.o mtlset.o radmul.o
> ranlib ../../lib/libcernlib.a
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o FFV1_1.o FFV1_1.f
> pdf_lhapdf6.cc:44:11: error: use of undeclared identifier 'boost'
> typedef boost::shared_ptr<LHAPDF::PDF> PDFPtr;
> Maybe I should link my boost file to lhapdf? How can i repair this problem?
> By the way, I have install lhapdf6.2.1 by Homebrew as well.
> Thank you in advance.
>
> Best regards,
> Ruibo Li
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Ruibo Li (kakaxi6363) said :
#2

Dear Olivier,
Thanks for your answer.
So, I want to know how can I install lower version lhapdf, such as lhapdf6.1.x on my Mac through Homebrew? I don't want to install lhapdf6 by the syntax" MG5>install lhapdf6". Because there is something wrong about its interface on my Mac.
Thanks for helping!

Best Regards,
Ruibo Li

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

Hi Ruibo,

I’m not a homebrew developper (neither a lhapdf one), so I can not help you with such installation if you insist to have it install via homebrew.

Indeed I would have advise you to install it either via the mg5 installer or via the direct compilation of the source.

Cheers,

Olivier

> On Nov 6, 2017, at 14:27, liruibo <email address hidden> wrote:
>
> Question #660392 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/660392
>
> Status: Answered => Open
>
> liruibo is still having a problem:
> Dear Olivier,
> Thanks for your answer.
> So, I want to know how can I install lower version lhapdf, such as lhapdf6.1.x on my Mac through Homebrew? I don't want to install lhapdf6 by the syntax" MG5>install lhapdf6". Because there is something wrong about its interface on my Mac.
> Thanks for helping!
>
> Best Regards,
> Ruibo Li
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Ruibo Li (kakaxi6363) said :
#4

Thanks Olivier Mattelaer, that solved my question.

Revision history for this message
Ruibo Li (kakaxi6363) said :
#5

Dear Olibier,
Ok, thanks for your suggestions!
 I will try to install lhapdf6 via the direct compilation of the source again.

Best Regards,
Ruibo Li