Problem installing mg5amc_py8_interface

Asked by Jake

Hi,

I'm trying to install mg5amc_py8_interface and I keep encountering the following error:

Installing tool 'mg5amc_py8_interface'...
    > Follow the installation progress by running the command below in a separate terminal)
    > tail -f /sb/home/kayskh/MG5_aMC_v2_5_1/HEPTools/MG5aMC_PY8_interface/mg5amc_py8_interface_install.log
A problem occured during the installation of 'mg5amc_py8_interface'.
Content of the installation log file '/sb/home/kayskh/MG5_aMC_v2_5_1/HEPTools/MG5aMC_PY8_interface/mg5amc_py8_interface_install.log':

Error, could not retrieve Pythia8 version using script 'get_pythia8_version.py'. Check it.

Command "install mg5amc_py8_interface " interrupted in sub-command:
"install mg5amc_py8_interface" with error:
InvalidCmd : Installation of mg5amc_py8_interface failed.

Running get_pythia8_version.py outside of madgraph works as expected:

$ ./get_pythia8_version.py ../pythia8
8.223

I tried following the steps performed in question 389255 in comments 12 and onward, namely changing installPYTHIA8.sh and running the install with the "--local" flag but it still returns the same error. I've also tried to put in some "print" statements in get_pythia8_version.py but the code is rewritten every time I try to install the MG-Py8 interface so I haven't been able to see what's going wrong.

Perhaps worth noting is that I installed Pythia8 manually since when I try to install it through MG I perpetually get the message

--2017-01-05 16:41:35-- (try: 3) http://home.thep.lu.se/~torbjorn/pythia8/pythia82.tgz
Connecting to home.thep.lu.se|130.235.189.138|:80... failed: Connection timed out.
Retrying.

Any help in fixing this problem would be much appreciated!

Thanks,
Jake

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Jake
Solved:
Last query:
Last reply:
Revision history for this message
Valentin Hirschi (valentin-hirschi) said :
#1

You can try to download the pythia82.tgz tarball by hand and then install
pythia8 with MG5aMC using the command:

./bin/mg5 --pythia8_tarball=<path_to_your_locally_downloaded_tarball>

It would be nice to understand why the script './get_pythia8_version.py
../pythia8' fails. So before trying the above, I suggest you go to the
directory:

/sb/home/kayskh/MG5_aMC_v2_5_1/HEPTools/MG5aMC_PY8_interface

and try to compile by hand the interface with

./compile.py <path_to_pythia8_installation_prefix>

This should reproduce the same error you faced when installing the
interface directly with MG5aMC but this time you can add debug statement in
compile.py and get_pythia8_version.py.

Let me know,

On Thu, Jan 5, 2017 at 2:07 PM, Jake <email address hidden>
wrote:

> New question #431073 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/431073
>
> Hi,
>
> I'm trying to install mg5amc_py8_interface and I keep encountering the
> following error:
>
> Installing tool 'mg5amc_py8_interface'...
> > Follow the installation progress by running the command below in a
> separate terminal)
> > tail -f /sb/home/kayskh/MG5_aMC_v2_5_1/HEPTools/MG5aMC_PY8_
> interface/mg5amc_py8_interface_install.log
> A problem occured during the installation of 'mg5amc_py8_interface'.
> Content of the installation log file '/sb/home/kayskh/MG5_aMC_v2_5_
> 1/HEPTools/MG5aMC_PY8_interface/mg5amc_py8_interface_install.log':
>
> Error, could not retrieve Pythia8 version using script
> 'get_pythia8_version.py'. Check it.
>
> Command "install mg5amc_py8_interface " interrupted in sub-command:
> "install mg5amc_py8_interface" with error:
> InvalidCmd : Installation of mg5amc_py8_interface failed.
>
> Running get_pythia8_version.py outside of madgraph works as expected:
>
> $ ./get_pythia8_version.py ../pythia8
> 8.223
>
> I tried following the steps performed in question 389255 in comments 12
> and onward, namely changing installPYTHIA8.sh and running the install with
> the "--local" flag but it still returns the same error. I've also tried to
> put in some "print" statements in get_pythia8_version.py but the code is
> rewritten every time I try to install the MG-Py8 interface so I haven't
> been able to see what's going wrong.
>
> Perhaps worth noting is that I installed Pythia8 manually since when I try
> to install it through MG I perpetually get the message
>
> --2017-01-05 16:41:35-- (try: 3) http://home.thep.lu.se/~
> torbjorn/pythia8/pythia82.tgz
> Connecting to home.thep.lu.se|130.235.189.138|:80... failed: Connection
> timed out.
> Retrying.
>
> Any help in fixing this problem would be much appreciated!
>
> Thanks,
> Jake
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.
>

--
Valentin

Revision history for this message
Jake (hasek05-06) said :
#2

Hi Valentin,

Thanks for your answer.

Trying to compile by MG5aMC_PY8_interface hand, I obtain now a different error:

Error in MG5aMC_PY8_interface installer. Could not find file:
   /sb/home/kayskh/MG5_aMC_v2_5_1/HEPTools/pythia8/share/Pythia8/examples/Makefile.inc

In fact the directory /sb/home/kayskh/MG5_aMC_v2_5_1/HEPTools/pythia8/share/Pythia8/examples itself doesn't exist.

Installing pythia8 with the command you suggested, I get the error message "mg5_aMC: error: no such option: --pythia8_tarball".

Jake

Revision history for this message
Jake (hasek05-06) said :
#3

Hi Valentin,

I created the directory /sb/home/kayskh/MG5_aMC_v2_5_1/HEPTools/pythia8/share/Pythia8/examples by hand and copied into it Makefile and Makefile.inc from /sb/home/kayskh/MG5_aMC_v2_5_1/HEPTools/pythia8/ . Trying to install the interface again, I now obtain the error

A problem occured during the installation of 'mg5amc_py8_interface'.
Content of the installation log file '/sb/home/kayskh/MG5_aMC_v2_5_1/HEPTools/MG5aMC_PY8_interface/mg5amc_py8_interface_install.log':

The version of HEPMC2 linked to Pythia8 seems not to include a static library.
This is necessary for the default compilation of MG5aMC_PY8_interface.
You can try again with the option --pythia8_makefile but HEPMC2 will need to be available at runtime.

Command "install mg5amc_py8_interface " interrupted in sub-command:
"install mg5amc_py8_interface" with error:
InvalidCmd : Installation of mg5amc_py8_interface failed.

I tried implementing the modification of <MG5_install_path>/madgraph/interface/madgraph_interface.py in comment 3 of https://bugs.launchpad.net/mg5amcnlo/+bug/1650664 but the problem persists.

Jake

Revision history for this message
Valentin Hirschi (valentin-hirschi) said :
#4

Hi Jake,

Could you try with the latest version 2.5.2; there you should be able to
use the option
'--pythia8_tarball=<path_to_your_locally_downloaded_PY8_tarball>'.
Also this might resolve the HEPMC problem, since I now force the local
installation of hepmc with MG5aMC, which guarantees to have a static
library.

On Wed, Jan 11, 2017 at 4:03 AM, Jake <email address hidden>
wrote:

> Question #431073 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/431073
>
> Jake gave more information on the question:
> Hi Valentin,
>
> I created the directory
> /sb/home/kayskh/MG5_aMC_v2_5_1/HEPTools/pythia8/share/Pythia8/examples
> by hand and copied into it Makefile and Makefile.inc from
> /sb/home/kayskh/MG5_aMC_v2_5_1/HEPTools/pythia8/ . Trying to install the
> interface again, I now obtain the error
>
> A problem occured during the installation of 'mg5amc_py8_interface'.
> Content of the installation log file '/sb/home/kayskh/MG5_aMC_v2_5_
> 1/HEPTools/MG5aMC_PY8_interface/mg5amc_py8_interface_install.log':
>
> The version of HEPMC2 linked to Pythia8 seems not to include a static
> library.
> This is necessary for the default compilation of MG5aMC_PY8_interface.
> You can try again with the option --pythia8_makefile but HEPMC2 will need
> to be available at runtime.
>
> Command "install mg5amc_py8_interface " interrupted in sub-command:
> "install mg5amc_py8_interface" with error:
> InvalidCmd : Installation of mg5amc_py8_interface failed.
>
> I tried implementing the modification of
> <MG5_install_path>/madgraph/interface/madgraph_interface.py in comment 3
> of https://bugs.launchpad.net/mg5amcnlo/+bug/1650664 but the problem
> persists.
>
> Jake
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.
>

--
Valentin

Revision history for this message
Jake (hasek05-06) said :
#5

Hi Valentin,

Both problems persist when I try with 2.5.2.

Jake

Revision history for this message
Valentin Hirschi (valentin-hirschi) said :
#6

So in v2.5.2 when you do:

./bin/mg5
MG5_aMC>install hepmc

it goes through but you are saying that you don't have any static library
in:

<MG5_install_path>/HEPTools/hepmc/lib/libHepMC.a

correct?

And for pythia8, you are saying that you cannot manage to download the
pythia8 tarball automatically with 'install pythia8' and specifying it's
local path with somehting like

./bin/mg5
MG5_aMC>install pythia8
--pythia8_tarball=/Users/valentin/Downloads/pythia82.tgz

fails because the option '--pythia8_tarball' is not recognized?

This is very weird since I cannot reproduce any of the above two problems
(especially not the second one which should not be environment dependent).

Could you please let me know the details of your system then?

> OS and its version
> Python interpreter version
> GCC ompiler suite

Sorry that these installations seem to cause so much problems.

On Thu, Jan 12, 2017 at 2:37 AM, Jake <email address hidden>
wrote:

> Question #431073 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/431073
>
> Status: Answered => Open
>
> Jake is still having a problem:
> Hi Valentin,
>
> Both problems persist when I try with 2.5.2.
>
> Jake
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.
>

--
Valentin

Revision history for this message
Jake (hasek05-06) said :
#7

The pythia8_tarball option worked. The problem was simply that I was using it as an option at MadGraph startup instead of as an option when running install within MadGraph (it worked even in 2.5.1). Once Pythia8 was automatically installed mg5_py8_interface installed with no further problems.

Thanks a lot for your assistance and patience.

Jake

Revision history for this message
A.Hayreter (alperhayreter) said :
#8

Dear Valentin,

I encountered a very similar problem as Jake had sometime ago. Here it is;

I am on OpenSuse Leap15, I've got MG5_2_6_3_2 and Root_v6_14_02 installed.

I am trying to install pythia with the command; install pythia,

it successfully installs LHAPDF6, HEPMC but when it comes to pythia it throws following warnings and errors;

|| /!\/!\/!\
|| Note that he following version of HEPMC
|| /home/alper/softwares/MG5_aMC_v2_6_3_2/HEPTools/hepmc
|| was detected as *not* supporting named weights. The MG5aMC-PY8 interface will have to write a separate hepmc file
|| for each extra weight potentially specified for studying systematic uncertainties (PDF, scale, merging, etc...)
We recommend that you change to the version of hepmc to the one that can be installed with this tool
|| /!\/!\/!\

installs pythia and in installing the interface it says;

A problem occured during the installation of 'mg5amc_py8_interface'.
Content of the installation log file '/home/alper/softwares/MG5_aMC_v2_6_3_2/HEPTools/MG5aMC_PY8_interface/mg5amc_py8_interface_install.log':

The version of HEPMC2 linked to Pythia8 seems not to include a static library.
This is necessary for the default compilation of MG5aMC_PY8_interface.
You can try again with the option --pythia8_makefile but HEPMC2 will need to be available at runtime.

and terminates the installation.

Looking forward for your response,

Thanks.

Revision history for this message
A.Hayreter (alperhayreter) said :
#9

And when I typed this;

MG5_aMC_v2_6_3_2/HEPTools/MG5aMC_PY8_interface >./compile.py ../pythia8 --pythia8_makefile

I got following error;

------------------------------------------------
MG5aMC_PY8_interface compilation output log:
Error: main89 requires HEPMC2

------------------------------------------------
Error during the compilation of MG5aMC_PY8_interface:
Error: main89 requires HEPMC2

Revision history for this message
A.Hayreter (alperhayreter) said :
#10

Dear Valentin,

I am still having the problem I mentioned in previous thread. MG5aMC_PY8_interface can not be installed with install command.

Looking forward for your answer.

Thanks.

Revision history for this message
Achim Mildenberger (achimm) said :
#11

Dear A. Hayreter,

I had exactly the same problem on openSuSE (15.1).

The compilation of hepmc puts the generated libraries in the path
HEPTools/hepmc/lib64/ .
But the compilation of pythia8 searches them in the path HEPTools/hepmc/lib/ (not lib64).

My workaround is:
(1) in bin/MG5_aMC "install hepmc"
(2) create a softlink from lib to lib64 in HEPTools/hepmc/
(3) in bin/MG5_aMC "install pythia8"

If there is a better way to insert changes into the higlhly automated installation", I'd be interested.
I've not figured out, what causes "libdir" of "hepmc" to be set to "lib64" in openSuSE.

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

Hi,

I have try to implement the fix. Could you try?
Should be working at 10h45 (in 30 min)

Cheers,

Olivier

Revision history for this message
Achim Mildenberger (achimm) said :
#13

This works. Many thanks for the fix, Olivier!

Sidenote: On this openSuSE release, the environment-variable $CONFIG_SITE is set by default for all login-shells. This variable is evaluated by "configure" of hepmc2. $CONFIG_SITE points to a script that sets the value of "$libdir", in my case
    libdir='${exec_prefix}/lib64'
This determines the final location of the libraries.

Revision history for this message
Vahid Sedighzadeh (vahidszd) said :
#14

Hi,
I have installed pythia8245 via
MG5_aMC>install pithier --pythia8_tarball=/Users/vahid/Downloads/pythia8245.tar
and it is successful but when I try
MG5_aMC>install mg5amc_py8_interface
I get following error
Now installing mg5amc_py8_interface. Be patient...
Removing existing installation of tool 'mg5amc_py8_interface' in '/Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools'.
Fetching data with command:
  curl -OL http://madgraph.physics.illinois.edu/Downloads/MG5aMC_PY8_interface/MG5aMC_PY8_interface_V1.3.tar.gz
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
100 19579 100 19579 0 0 25925 0 --:--:-- --:--:-- --:--:-- 25898
Installing tool 'mg5amc_py8_interface'...
    > Follow the installation progress by running the command below in a separate terminal)
    > tail -f /Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools/MG5aMC_PY8_interface/mg5amc_py8_interface_install.log
A problem occured during the installation of 'mg5amc_py8_interface'.
Content of the installation log file '/Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools/MG5aMC_PY8_interface/mg5amc_py8_interface_install.log':

------------------------------------------------
MG5aMC_PY8_interface compilation output log:
b'g++ MG5aMC_PY8_interface.cc -o MG5aMC_PY8_interface /Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools/hepmc/include -I/Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools/pythia8//include -ldl -fPIC -lc++ -std=c++11 -DHEPMC2HACK -L/Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools/pythia8//lib -Wl,-rpath,/Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools/pythia8//lib -lpythia8 -ldl /Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools/hepmc/lib\nIn file included from MG5aMC_PY8_interface.cc:11:\n/Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools/pythia8//include/Pythia8Plugins/HepMC2.h:17:10: fatal error: \'HepMC/IO_BaseClass.h\' file not found\n#include "HepMC/IO_BaseClass.h"\n ^~~~~~~~~~~~~~~~~~~~~~\n1 error generated.\nmake: *** [MG5aMC_PY8_interface] Error 1\n'
------------------------------------------------
Error during the compilation of MG5aMC_PY8_interface:
b'g++ MG5aMC_PY8_interface.cc -o MG5aMC_PY8_interface /Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools/hepmc/include -I/Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools/pythia8//include -ldl -fPIC -lc++ -std=c++11 -DHEPMC2HACK -L/Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools/pythia8//lib -Wl,-rpath,/Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools/pythia8//lib -lpythia8 -ldl /Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools/hepmc/lib\nIn file included from MG5aMC_PY8_interface.cc:11:\n/Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools/pythia8//include/Pythia8Plugins/HepMC2.h:17:10: fatal error: \'HepMC/IO_BaseClass.h\' file not found\n#include "HepMC/IO_BaseClass.h"\n ^~~~~~~~~~~~~~~~~~~~~~\n1 error generated.\nmake: *** [MG5aMC_PY8_interface] Error 1\n'

Looking forward for your answer.

thanks

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

The plugin indeed requires to have pythia83.
The reason is that pythia83 and pythia82 does not support the same API for the userhook.
And therefore we have switch everything to be working with pythia83.

Now if you use bazaar (or breezy) you can create an older version of the plugin which is pythia82 compatible.
But I'm not sure that even with that you will have full compatibility with pythia82.

Cheers,

Olivier

> On 15 Jan 2022, at 11:10, Vahid Sedighzadeh <email address hidden> wrote:
>
> Question #431073 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/431073
>
> Vahid Sedighzadeh posted a new comment:
> Hi,
> I have installed pythia8245 via
> MG5_aMC>install pithier --pythia8_tarball=/Users/vahid/Downloads/pythia8245.tar
> and it is successful but when I try
> MG5_aMC>install mg5amc_py8_interface
> I get following error
> Now installing mg5amc_py8_interface. Be patient...
> Removing existing installation of tool 'mg5amc_py8_interface' in '/Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools'.
> Fetching data with command:
> curl -OL http://madgraph.physics.illinois.edu/Downloads/MG5aMC_PY8_interface/MG5aMC_PY8_interface_V1.3.tar.gz
> % Total % Received % Xferd Average Speed Time Time Time Current
> Dload Upload Total Spent Left Speed
> 100 19579 100 19579 0 0 25925 0 --:--:-- --:--:-- --:--:-- 25898
> Installing tool 'mg5amc_py8_interface'...
>> Follow the installation progress by running the command below in a separate terminal)
>> tail -f /Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools/MG5aMC_PY8_interface/mg5amc_py8_interface_install.log
> A problem occured during the installation of 'mg5amc_py8_interface'.
> Content of the installation log file '/Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools/MG5aMC_PY8_interface/mg5amc_py8_interface_install.log':
>
> ------------------------------------------------
> MG5aMC_PY8_interface compilation output log:
> b'g++ MG5aMC_PY8_interface.cc -o MG5aMC_PY8_interface /Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools/hepmc/include -I/Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools/pythia8//include -ldl -fPIC -lc++ -std=c++11 -DHEPMC2HACK -L/Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools/pythia8//lib -Wl,-rpath,/Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools/pythia8//lib -lpythia8 -ldl /Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools/hepmc/lib\nIn file included from MG5aMC_PY8_interface.cc:11:\n/Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools/pythia8//include/Pythia8Plugins/HepMC2.h:17:10: fatal error: \'HepMC/IO_BaseClass.h\' file not found\n#include "HepMC/IO_BaseClass.h"\n ^~~~~~~~~~~~~~~~~~~~~~\n1 error generated.\nmake: *** [MG5aMC_PY8_interface] Error 1\n'
> ------------------------------------------------
> Error during the compilation of MG5aMC_PY8_interface:
> b'g++ MG5aMC_PY8_interface.cc -o MG5aMC_PY8_interface /Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools/hepmc/include -I/Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools/pythia8//include -ldl -fPIC -lc++ -std=c++11 -DHEPMC2HACK -L/Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools/pythia8//lib -Wl,-rpath,/Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools/pythia8//lib -lpythia8 -ldl /Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools/hepmc/lib\nIn file included from MG5aMC_PY8_interface.cc:11:\n/Users/vahid/Documents/nmg/MG5_aMC_v2_9_7/HEPTools/pythia8//include/Pythia8Plugins/HepMC2.h:17:10: fatal error: \'HepMC/IO_BaseClass.h\' file not found\n#include "HepMC/IO_BaseClass.h"\n ^~~~~~~~~~~~~~~~~~~~~~\n1 error generated.\nmake: *** [MG5aMC_PY8_interface] Error 1\n'
>
>
> Looking forward for your answer.
>
> thanks
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Vahid Sedighzadeh (vahidszd) said :
#16

Hi Olivier,
Many thanks to the response
I have installed pythia8306 and the problem solved.