Adding dl library to EXTRALIBS in scripted run

Asked by Robin

Dear authors,

I am using MG5_aMC with Pythia8.209 to do the showering. I am scripting my run. To work with Pythia8.2, I need to add "dl" to the EXTRALIBS variable in shower_card, so I include a line in my script:

set shower_card EXTRALIBS stdhep Fmcfio dl

However running this gives me the error (note that my job directory is named pp_bbx):

INFO: Events generated
decay_events -from_cards
INFO: Preparing MCatNLO run
INFO: Compiling MCatNLO for PYTHIA8...
/cvmfs/cms.cern.ch/slc6_amd64_gcc491/external/gcc/4.9.1-cms/bin/../lib/gcc/x86_64-redhat-linux-gnu/4.9.1/../../../../x86_64-redhat-linux-gnu/bin/ld: cannot find -lfmcfio
collect2: error: ld returned 1 exit status
make: *** [Pythia82] Error 1
-I/users/ra12451/MG5_aMC/MG5_aMC_v2_3_0/pp_bbx/MCatNLO/include \
   -L../lib -lfmcfio -ldl Pythia82.cc -o Pythia8.exe \
   -L/users/ra12451/pythia8209/lib -lpythia8
Pythia8 compilation did not succeed, exiting

So it seems it cannot find the Fmcfio library. If I do

find . -name "*Fmcfio*"

though, I see that it does exist in my job directory:

./pp_bbx/MCatNLO/lib/libFmcfio.a
./vendor/StdHEP/lib/libFmcfio.so
./vendor/StdHEP/lib/libFmcfio.a

Did I set EXTRALIBS incorrectly? Or some other mistake?

Many thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
Paolo Torrielli Edit question
Solved by:
Paolo Torrielli
Solved:
Last query:
Last reply:
Revision history for this message
Robin (robinagg) said :
#1

Note that if I run MG5_aMC interactively, and change EXTRALIBS in shower_card to:

EXTRALIBS = stdhep Fmcfio dl

Then it compiles and runs the showering part successfully.

Looking at pp_bbx/mcatnlo.log:

 USING PYTHIA 8, version >= 8.200
g++ -I/users/ra12451/pythia8209/include \
   -I/cvmfs/sft.cern.ch/lcg/external/HepMC/2.06.08/x86_64-slc6-gcc48-opt//include -L/cvmfs/sft.cern.ch/lcg/external/HepMC/2.06.08/x86_64-slc6-gcc48-opt//lib -lHepMC -I/users/ra12451/MG5_aMC/MG5_aMC_v2_3_0/pp_bbx/MCatNLO/include \
   -L../lib -ldl Pythia82.cc -o Pythia8.exe \
   -L/users/ra12451/pythia8209/lib -lpythia8

***** Now ready for showering 10 events with PYTHIA8

Oddly it doesn't seem to be linking against Fmcfio?

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

Hi,

This is a question for Paolo which is currently in holliday for still a couple of days. So please be patient.

Cheers,

Olivier

Revision history for this message
Best Paolo Torrielli (paolo-torrielli) said :
#3

Dear Robin,
thanks for your precious feedback.

The reason why it does not work with the set command should be linked to
case sensitivity, a problem I noticed right before leaving, and that should be
fixed soon. In your post, the compiler tries to link '-lfmcfio', not '-lFmcfio'.

If you instead set everything (case-sensitively) in the shower card, it works
correctly: indeed Pythia8 does not use stdHEP nor mcfio, so the makefile
needs not link them. For your Pythia8 runs you just need to 'set EXTRALIBS dl',
and that's it.

I'll fix the case-sensitivity issue as soon as possible, to avoid other problems
(for example when setting the name of analyses files).

Thanks again.
Cheers.
Paolo

Revision history for this message
Robin (robinagg) said :
#4

Thanks Paolo Torrielli, that solved my question.