error when setting pdlabel as lhapdf in run card

Asked by Hesham El Faham

Hi,
I am trying to run a simple process using a non-default pdf in MGv2_7_2, i.e.
import model ./models/SM_Zprime_UFO
generate p p > l+ l- ZPRIME=0
output PbPb_scan_no_ZPRIME
launch PbPb_scan_no_ZPRIME
shower = PY8
detector = delphes
madspin = none
./Delphes/cards/delphes_card_CMS.tcl
set pdlabel lhapdf
set lhaid 901300

I had installed pythia8, lhapdf6, and mg5_pythia interface within Madgraph before I ran the above process.
I consistently recieve the following error (I am attaching the full debug log):
-->
Traceback (most recent call last):
  File "/home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/madgraph/interface/extended_cmd.py", line 1515, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/madgraph/interface/extended_cmd.py", line 1464, in onecmd_orig
    return func(arg, **opt)
  File "/home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/madgraph/interface/madevent_interface.py", line 2469, in do_generate_events
    self.run_generate_events(switch_mode, args)
  File "/home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/madgraph/interface/common_run_interface.py", line 6963, in new_fct
    original_fct(obj, *args, **opts)
  File "/home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/madgraph/interface/madevent_interface.py", line 2508, in run_generate_events
    postcmd=False)
  File "/home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/madgraph/interface/extended_cmd.py", line 1544, in exec_cmd
    stop = Cmd.onecmd_orig(current_interface, line, **opt)
  File "/home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/madgraph/interface/extended_cmd.py", line 1464, in onecmd_orig
    return func(arg, **opt)
  File "/home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/madgraph/interface/madevent_interface.py", line 3324, in do_survey
    self.configure_directory()
  File "/home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/madgraph/interface/madevent_interface.py", line 5668, in configure_directory
    self.compile(arg=[name], cwd=os.path.join(self.me_dir, 'Source'))
  File "/home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/madgraph/interface/extended_cmd.py", line 1608, in compile
    return misc.compile(nb_core=self.options['nb_core'], *args, **opts)
  File "/home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/madgraph/various/misc.py", line 532, in compile
    raise MadGraph5Error, error_text
MadGraph5Error: A compilation Error occurs when trying to compile /home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/PbPb_scan_no_ZPRIME/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
    cd PDF; make
    make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
    make[1]: Entering directory '/home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/PbPb_scan_no_ZPRIME/Source/DHELAS'
    make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
    make[1]: Entering directory '/home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/PbPb_scan_no_ZPRIME/Source/PDF'
    gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o aloha_functions.o aloha_functions.f
    gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o pdfwrap_lhapdf.o pdfwrap_lhapdf.f
    cd MODEL; make
    make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
    make[1]: Entering directory '/home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/PbPb_scan_no_ZPRIME/Source/MODEL'
    gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o couplings.o couplings.f
    cd CERNLIB; make
    make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
    make[1]: Entering directory '/home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/PbPb_scan_no_ZPRIME/Source/CERNLIB'
    gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o abend.o abend.f
    cd BIAS/dummy; make
    make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
    make[1]: Entering directory '/home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/PbPb_scan_no_ZPRIME/Source/BIAS/dummy'
    g++ -O -static-libstdc++ -I/home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/HEPTools/lhapdf6/include -c -o pdf_lhapdf6.o pdf_lhapdf6.cc
    gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o dummy.o dummy.f
    gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o DiscreteSampler.o DiscreteSampler.f
    gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o dlsqp2.o dlsqp2.f
    ar cru ../lib/libgeneric.a alfas_functions_lhapdf.o transpole.o invarients.o hfill.o pawgraphs.o ran1.o rw_events.o rw_routines.o kin_functions.o open_file.o basecode.o setrun.o run_printout.o dgauss.o readgrid.o getissud.o
    ar cru ../../../lib/libbias.a dummy.o
    ar: `u' modifier ignored since `D' is the default (see `U')
    ar: `u' modifier ignored since `D' is the default (see `U')
    ranlib ../../../lib/libbias.a
    ranlib ../lib/libgeneric.a
    make[1]: Leaving directory '/home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/PbPb_scan_no_ZPRIME/Source/BIAS/dummy'
g++ -O -static-libstdc++ -I/home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/HEPTools/lhapdf6/include -c -o pdf_lhapdf6.o pdf_lhapdf6.cc
    gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o dummy.o dummy.f
    gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o DiscreteSampler.o DiscreteSampler.f
    gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o dlsqp2.o dlsqp2.f
    ar cru ../lib/libgeneric.a alfas_functions_lhapdf.o transpole.o invarients.o hfill.o pawgraphs.o ran1.o rw_events.o rw_routines.o kin_functions.o open_file.o basecode.o setrun.o run_printout.o dgauss.o readgrid.o getissud.o
    ar cru ../../../lib/libbias.a dummy.o
    ar: `u' modifier ignored since `D' is the default (see `U')
    ar: `u' modifier ignored since `D' is the default (see `U')
    ranlib ../../../lib/libbias.a
    ranlib ../lib/libgeneric.a
    make[1]: Leaving directory '/home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/PbPb_scan_no_ZPRIME/Source/BIAS/dummy'
    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
    pdf_lhapdf6.cc:14:10: fatal error: boost/shared_ptr.hpp: No such file or directory
     #include <boost/shared_ptr.hpp>
              ^~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o mtlprt.o mtlprt.f
    <builtin>: recipe for target 'pdf_lhapdf6.o' failed
    make[1]: *** [pdf_lhapdf6.o] Error 1
    make[1]: Leaving directory '/home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/PbPb_scan_no_ZPRIME/Source/PDF'
    makefile:45: recipe for target '../lib/libpdf.a' failed
    make: *** [../lib/libpdf.a] Error 2
    make: *** Waiting for unfinished jobs....
    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 printout.o printout.f
    gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o radmul.o radmul.f
    ar cru ../../lib/libcernlib.a abend.o dlsqp2.o lenocc.o mtlprt.o mtlset.o radmul.o
    ar: `u' modifier ignored since `D' is the default (see `U')
    ranlib ../../lib/libcernlib.a
    make[1]: Leaving directory '/home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/PbPb_scan_no_ZPRIME/Source/CERNLIB'
    gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o rw_para.o rw_para.f
    gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o model_functions.o model_functions.f
    gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o FFV3_3.o FFV3_3.f
    gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o couplings1.o couplings1.f
    gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o FFS1_3.o FFS1_3.f
    gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o couplings2.o couplings2.f
    ar cru ../../lib/libmodel.a couplings.o lha_read.o printout.o rw_para.o model_functions.o couplings1.o couplings2.o
    gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o FFV3_0.o FFV3_0.f
    ar: `u' modifier ignored since `D' is the default (see `U')
    ranlib ../../lib/libmodel.a
    make[1]: Leaving directory '/home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/PbPb_scan_no_ZPRIME/Source/MODEL'
gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o FFS1_0.o FFS1_0.f
    gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o FFV1_0.o FFV1_0.f
    gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o FFV2_3.o FFV2_3.f
    gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o FFV2_0.o FFV2_0.f
    gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o FFV1P0_3.o FFV1P0_3.f
    ar cru ../../lib/libdhelas.a aloha_functions.o FFV3_3.o FFS1_3.o FFV3_0.o FFS1_0.o FFV1_0.o FFV2_3.o FFV2_0.o FFV1P0_3.o
    ar: `u' modifier ignored since `D' is the default (see `U')
    ranlib ../../lib/libdhelas.a
    make[1]: Leaving directory '/home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/PbPb_scan_no_ZPRIME/Source/DHELAS'
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
                              Run Options
                              -----------
               stdout_level : 20 (user set)

                         MadEvent Options
                         ----------------
     automatic_html_opening : False (user set)
        notification_center : True
          cluster_temp_path : None
             cluster_memory : None (user set)
               cluster_size : 100
              cluster_queue : None (user set)
                    nb_core : 8 (user set)
               cluster_time : 8 (user set)
                   run_mode : 2

                      Configuration Options
                      ---------------------
                text_editor : None
         cluster_local_path : None
      cluster_status_update : (600, 30)
               pythia8_path : /home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/HEPTools/pythia8 (user set)
                  hwpp_path : None (user set)
            pythia-pgs_path : None (user set)
                    td_path : None (user set)
               delphes_path : /home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/Delphes (user set)
                thepeg_path : None (user set)
               cluster_type : condor
          madanalysis5_path : None (user set)
           cluster_nb_retry : 1
                 eps_viewer : None
                web_browser : None
               syscalc_path : None (user set)
           madanalysis_path : None (user set)
                     lhapdf : /home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/HEPTools/lhapdf6/bin/lhapdf-config (user set)
              f2py_compiler : None
                 hepmc_path : None (user set)
         cluster_retry_wait : 300
           fortran_compiler : None
                auto_update : 7 (user set)
        exrootanalysis_path : None (user set)
                    timeout : 60
               cpp_compiler : None
<--
I tried reinstalling madgraph and lhapdf6 several times with no success. Note also the lhapdf is user set. The problem disappears when I comment out the two lines in the run card in which I set the pdf to a non-default one, i.e. everything works fine when the pdf is set to the default choice in madgraph.
Thanks!

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,

It seems that they are some confusion between lhapdf 6.1 and lhapdf 6.2.
It seems that we compile the code for lhapdf6.1
But the boost library (required to run lhapdf6.1) is not found.

In principle, starting with 2.7.2, the installer code should install lhapdf6.2 and not lhapdf6.1.
So the first thing to check is
1) which version of lhapdf is installed.
For that you can run:
 /home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/HEPTools/lhapdf6/bin/lhapdf-config --version

2) which version of lhapdf, MG5aMC detects:
cat /home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/PbPb_scan_no_ZPRIME/Source/make_opts | grep lhapdfsubversion

One hacky way to solve this conflict (if I'm correct) would be to overwrite that variable by setting
lhapdfsubversion=2
BELOW the line
#end_of_make_opts_variables
in the file /home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/PbPb_scan_no_ZPRIME/Source/make_opts
and in the file
/home/elfaham/Downloads/tools/MG5_aMC_v2_7_2/PbPb_scan_no_ZPRIME/Source/.make_opts

Cheers,

Olivier

Revision history for this message
Hesham El Faham (helfaham) said :
#2

Hi Olivier,

Thanks for your reply.

I checked, I am running lhapdf 6.2.3 while mg5 detects the same version, i.e. check number 2) gives lhapdfsubversion=2.

It therefore seems that this is not the problem.

Best,
Hesham

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

Thanks,

Indeed LO miss one of the switch (and one file) in order to support 6.2 without the boost library.
You will find the patch at this link:
https://bazaar.launchpad.net/~mg5core1/mg5amcnlo/2.7.3/revision/294

You will also be able to directly downloaded that version at the same page (click on download tarball)

Thanks for noticing and reporting this,

Olivier

> On 8 Apr 2020, at 21:02, Hesham El Faham <email address hidden> wrote:
>
> lhapdfsubversion

Revision history for this message
Hesham El Faham (helfaham) said :
#4

Thanks! It worked.

Revision history for this message
Hesham El Faham (helfaham) said :
#5

Thanks Olivier Mattelaer, that solved my question.