Installing mg5amc_py8_interface fails

Bug #1644877 reported by BJ
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MadGraph5_aMC@NLO
Fix Released
Undecided
Unassigned

Bug Description

Hi,

I use an environment where libHepMC.a is contained in the LD_LIBRARY_PATH (concretely I source /cvmfs/sft.cern.ch/lcg/views/LCG_85swan3/x86_64-slc6-gcc49-opt/setup.sh ).

When installing Pythia8 from within MadGraph, MadGraph recognizes this HepMC version and prints a warning concerning the use of named weights and encourages the user to use the HepMC version which can be installed by MadGraph.

Hence I start again and install first hepmc from within MadGraph and only after that I install Pythia8. Indeed, this time the warning concerning named weights is no longer present. However unfortunately this time I get an error during the compilation of MG5aMC_PY8_interface:

MG5aMC_PY8_interface.cc:(.text+0x85e8): undefined reference to `HepMC::WeightContainer::push_back(double const&, std::string)'

My guess is that at this point the wrong libHepMC.a is used. I think it could be fixed by either using another order for the library directories during linking or by explicitly linking with

-l$(CUSTOM_STATIC_HEPMC2_LIB)/libHepMC.a

In order to confirm that idea I tried to change that in HEPTools/MG5aMC_PY8_interface/Makefile_mg5amc_py8_interface_static
and to install Pythia8 again but unfortunately the makefile is overwrittenso I couldn't test it.

Cheers,
BJ

Revision history for this message
Valentin Hirschi (valentin-hirschi) wrote :

I see two solutions:

a) (This should be what is happening already) When you are about to shower using PY8 and MG5aMC you see that in the script 'run_shower.sh' in <PROC_OUTPUT>/Event/run_<xx> we temporarily change LD_LIBRARY_PATH so as to place 'PROC_OUTPUT>/HEPTools/libs' first. This should make sure that your locally installed version of hepmc is used (and not the environment-wide one).
This should already work automatically when MG5aMC steers the PY8 showering for you at LO. So I'm puzzled as to why it doesn't do the trick for you here.

b) Instead of re-installing 'MG5aMC_PY8_interface', you can recompile the existing one 'PROC_OUTPUT>/HEPTools/MG5aMC_PY8_interface' by going to this directory and typing:

./compile.py <PATH_TO_PYTHIA8>

Where <PATH_TO_PYTHIA8> is likely to simply be '../pythia8' if you installed Pythia8 with MG5aMC as well.
You can then easily modify the part of the script 'compile.py' which gets the makefile from Pythia8 so as to use your own makefile.

Revision history for this message
BJ (bjbj) wrote :

Thanks for the prompt reply! I'm not sure about Solution a) because my problem is already at compile time. Solution b) works fine in the following way:

In HEPTools/MG5aMC_PY8_interface/Makefile_mg5amc_py8_interface_static I replace

-L$(CUSTOM_STATIC_HEPMC2_LIB) -lHepMC

with

$(CUSTOM_STATIC_HEPMC2_LIB)/libHepMC.a,

i.e. I specify explicitly which libHepMC.a to use, which is probably the safest thing to do. Alternatively I've tested that it is also enough to change the order of

-L$(CUSTOM_STATIC_HEPMC2_LIB)

and

-L$(CXX_COMMON) in this Makefile.

If the custom location is given first the library is taken from there.

Revision history for this message
Valentin Hirschi (valentin-hirschi) wrote :

I agree that it is safer and I have modified the installer as you suggested.
Thanks for the suggestion and feedback.

Changed in mg5amcnlo:
status: New → Fix Committed
Changed in mg5amcnlo:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.