Are there plans to support HepMC3?

Asked by Matthew Feickert

Hi. From the latest MG5aMC_PY8_interface (v1.2, from the version publicly browsable at http://madgraph.physics.illinois.edu/Downloads/MG5aMC_PY8_interface/) I can see that MadGraph5 requires HepMC2

```
$ curl -sLO http://madgraph.phys.ucl.ac.be/Downloads/MG5aMC_PY8_interface/MG5aMC_PY8_interface_V1.2.tar.gz
$ mkdir -p MG5aMC_PY8_interface
$ tar -xzvf MG5aMC_PY8_interface_V1.2.tar.gz --directory=MG5aMC_PY8_interface
$ grep "HEPMC" MG5aMC_PY8_interface/compile.py
# When using only original PY8 makefiles, HEPMC2 will be linked dynamically.
# By default, the interface's makefile (which include PY8's ones) will link HEPMC2 statically.
    # First obtain the location of the HEPMC libraries
        HEPMC2LibPath = Makefile_paths['HEPMC2_LIB']
        print( "The specified Pythia8 version does not seem to be installed with HEPMC2 support.")
    # Now copy the static HEPMC library locally so we are guaranteed that it will be compiled
    if not os.path.isfile(pjoin(HEPMC2LibPath,'libHepMC.a')):
        print( "The version of HEPMC2 linked to Pythia8 seems not to include a static library.")
        print( "You can try again with the option --pythia8_makefile but HEPMC2 will need"+\
    shutil.copy(pjoin(HEPMC2LibPath,'libHepMC.a'),pjoin(local_path,'static_library_dependencies'))
            'CUSTOM_STATIC_HEPMC2_LIB=%s'%pjoin(local_path,'static_library_dependencies')],
```

As HepMC2 is no longer developed and the HepMC devs actively encourage use of HepMC3 on the website (http://hepmc.web.cern.ch/hepmc/) are there plans to support HepMC3 in the future?

My guess is that there is some very good reason that at the moment MadGraph5 still requires HepMC2 that I don't understand. I couldn't find any questions on launchpad that already address this point though, so I thought I'd ask.

Question information

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

Hi,

That package is mainly supported by PY8 author and not by us. And this package is actually not yet pythia8.3 compatible (even if a version pythia8.3 compatible is ready to be released at the same time as the next release of MG5aMC).
We have not yet started to discuss with PY8 author on how to update that package to support HepMC3.
So I actually do not know which minimal version of PY8 is needed for such support (8.3 should be fine for sure but not sure for 8.2)

The support of HepMC3 (or any other format of pythia) is mainly a pythia8 decision, but indeed since the executable needs to link to the associated library we have to do a choice when installing the interface. I do not think that the majority of our Pheno user are yet ready to drop HEPMC2. (experimentalist does not count in this matter since they run Pythia8 in standalone and not via MG5aMC so they can freely choose their favorite output format).

Maybe one option would be to have a second interface that the user can install for the HepMC3 output and then depending of the output file within the pythia8_card select which interface to use, but this will likely take time before being implemented.

Cheers,

Olivier

Revision history for this message
Matthew Feickert (feickert) said :
#2

Thanks for the fast response!

> So I actually do not know which minimal version of PY8 is needed for such support (8.3 should be fine for sure but not sure for 8.2)

Yeah, I'm not sure about _minimal_ required versions, but I can get PYTHIA 8.244 to build from source against HepMC3 v3.2.4 when passing the --with-hepmc3 configure flag.

> Maybe one option would be to have a second interface that the user can install for the HepMC3 output and then depending of the output file within the pythia8_card select which interface to use

Yeah, if the pheno community has reasons to not want to update to HepMC3 I can understand that means you'll need to support it for a long time. It would be nice though to have the ability to choose to use HepMC3 instead.

> but this will likely take time before being implemented.

Sure. Totally understandable. As Launchpad doesn't seem to have any way of tracking development plans I thought I'd just ask to see if this was something on the radar at all, or if there were reasons to avoid this for the indefinite future.

Revision history for this message
elisestephens (elisestephens11) said :
#3

For the Fedora and CentOS the ROOT interface packages HepMC3-rootIO and HepMC3-rootIO-devel
can be installed in the same way, but will bring root as a dependency.
The python binding packages could have different names depending on the used system, e.g. these are
python2-HepMC3, python34-HepMC3, python36-HepMC3, python2-HepMC3-rootIO, python34-HepMC3-rootIO
and python36-HepMC3-rootIO for the CentOS7. Therefore, the simplest solution is to install bindings for all the
available python version in the system using

  sudo yum install python*-HepMC3
openSUSE/Leap
The HepMC3 package is available from the standard repositories https://build.opensuse.org/package/show/openSUSE:Leap:15.2:Update/HepMC.
To install:

sudo zypper install HepMC3

The package does not include ROOT interface.

Arch linux
The package is available from https://www.archlinux.org/packages/community/x86_64/hepmc/. To install:

sudo pacman -Syu hepmc

The dependencies can vary.

MacOSX
The HepMC3 package is available in the homebrew-hep repository https://davidchall.github.io/homebrew-hep/.
To install:

brew tap davidchall/hep
brew install hepmc3

The package does not include ROOT interface.

Windows
The precompiled HepMC3 packages are available in for Windows and other platforms also in PyPi.
Windows users can use pip to install HepMC3.
    pip install HepMC3
The packages from pip do not include the ROOT interface.

LCG platforms
The HepMC3 package is available in the LCG from multiple platforms.
The HepMC3 cmake files are located under https://www.pkliveinfo.com/
/cvmfs/sft.cern.ch/lcg/views/LCG_97/${LCG_PLATFORM}/share/HepMC3/cmake, e.g. in
/cvmfs/sft.cern.ch/lcg/views/LCG_97/x86_64-centos7-gcc8-opt/share/HepMC3/cmake for the x86_64-centos7-gcc8-opt platform.

If for any reason the instalation from the repositories is not possible or is not desired, the instructions to build
HepMC3 from the sources
The minimal requirements for the installation from sources are

C++ compiler with c++11 standard support.
CMake version 3.X.

It is strongly recommended to read this documentation completely before the installation.
However, if for some reason that is not possible, here is a set of commands for the
instalation that can be copied and pasted into a Unix terminal. In some cases this
action might result in a fully functional installation.

  wget http://hepmc.web.cern.ch/hepmc/releases/HepMC3-3.2.2.tar.gz
  tar -xzf HepMC3-3.2.2.tar.gz
  mkdir hepmc3-build
  cd hepmc3-build
  cmake -DHEPMC3_ENABLE_ROOTIO:BOOL=OFF -DHEPMC3_ENABLE_TEST:BOOL=OFF \
      -DHEPMC3_INSTALL_INTERFACES:BOOL=ON -DHEPMC3_ENABLE_PYTHON:BOOL=ON -DHEPMC3_PYTHON_VERSIONS=2.7 \
      -DHEPMC3_BUILD_STATIC_LIBS:BOOL=OFF -DHEPMC3_BUILD_DOCS:BOOL=OFF \
      -DCMAKE_INSTALL_PREFIX=../hepmc3-install \
      -DHEPMC3_Python_SITEARCH27=../hepmc3-install/lib/python2.7/site-packages \
      ../HepMC3-3.2.2
  make
  make install

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

Hi,

We do not have direct dependency of HepMC.
This is more a question on how Pythia8 supports HepMC

Cheers,

Olivier

> On 18 Apr 2022, at 06:55, elisestephens <email address hidden> wrote:
>
> Question #699057 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/699057
>
> elisestephens posted a new comment:
> For the Fedora and CentOS the ROOT interface packages HepMC3-rootIO and HepMC3-rootIO-devel
> can be installed in the same way, but will bring root as a dependency.
> The python binding packages could have different names depending on the used system, e.g. these are
> python2-HepMC3, python34-HepMC3, python36-HepMC3, python2-HepMC3-rootIO, python34-HepMC3-rootIO
> and python36-HepMC3-rootIO for the CentOS7. Therefore, the simplest solution is to install bindings for all the
> available python version in the system using
>
> sudo yum install python*-HepMC3
> openSUSE/Leap
> The HepMC3 package is available from the standard repositories https://build.opensuse.org/package/show/openSUSE:Leap:15.2:Update/HepMC.
> To install:
>
> sudo zypper install HepMC3
>
>
> The package does not include ROOT interface.
>
>
> Arch linux
> The package is available from https://www.archlinux.org/packages/community/x86_64/hepmc/. To install:
>
> sudo pacman -Syu hepmc
>
>
> The dependencies can vary.
>
>
> MacOSX
> The HepMC3 package is available in the homebrew-hep repository https://davidchall.github.io/homebrew-hep/.
> To install:
>
> brew tap davidchall/hep
> brew install hepmc3
>
>
> The package does not include ROOT interface.
>
>
> Windows
> The precompiled HepMC3 packages are available in for Windows and other platforms also in PyPi.
> Windows users can use pip to install HepMC3.
> pip install HepMC3
> The packages from pip do not include the ROOT interface.
>
>
> LCG platforms
> The HepMC3 package is available in the LCG from multiple platforms.
> The HepMC3 cmake files are located under https://www.pkliveinfo.com/
> /cvmfs/sft.cern.ch/lcg/views/LCG_97/${LCG_PLATFORM}/share/HepMC3/cmake, e.g. in
> /cvmfs/sft.cern.ch/lcg/views/LCG_97/x86_64-centos7-gcc8-opt/share/HepMC3/cmake for the x86_64-centos7-gcc8-opt platform.
>
>
> If for any reason the instalation from the repositories is not possible or is not desired, the instructions to build
> HepMC3 from the sources
> The minimal requirements for the installation from sources are
>
> C++ compiler with c++11 standard support.
> CMake version 3.X.
>
> It is strongly recommended to read this documentation completely before the installation.
> However, if for some reason that is not possible, here is a set of commands for the
> instalation that can be copied and pasted into a Unix terminal. In some cases this
> action might result in a fully functional installation.
>
> wget http://hepmc.web.cern.ch/hepmc/releases/HepMC3-3.2.2.tar.gz
> tar -xzf HepMC3-3.2.2.tar.gz
> mkdir hepmc3-build
> cd hepmc3-build
> cmake -DHEPMC3_ENABLE_ROOTIO:BOOL=OFF -DHEPMC3_ENABLE_TEST:BOOL=OFF \
> -DHEPMC3_INSTALL_INTERFACES:BOOL=ON -DHEPMC3_ENABLE_PYTHON:BOOL=ON -DHEPMC3_PYTHON_VERSIONS=2.7 \
> -DHEPMC3_BUILD_STATIC_LIBS:BOOL=OFF -DHEPMC3_BUILD_DOCS:BOOL=OFF \
> -DCMAKE_INSTALL_PREFIX=../hepmc3-install \
> -DHEPMC3_Python_SITEARCH27=../hepmc3-install/lib/python2.7/site-packages \
> ../HepMC3-3.2.2
> make
> make install
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Guglielmo Coloretti (guglielmocoloretti) said :
#5

Dear all,

I was wondering what is the current status of this discussion. I wish to run Delphes3 on the output of Pythia8 but it is failing given the HepMC2 format.

I thank you very much!

Best regards,
Guglielmo

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

Hi,

I guess that if you want to run hepmc3, you need to use pythia8 (and Delphes) outside of the MG5aMC framework.
They are no real update in that direction.
The issue is that the pythia author that wrote MG5aMC_PY8_interface left physics and that no one (either from pythia team or MG5aMC team) does not know that module so it will be kept untouch up to the point where it is not working anymore and at that stage either someone will have to fully rewrite it or anyone will need to run pythia8 outside of MG5aMC.

Cheers,

Olivier

Revision history for this message
Guglielmo Coloretti (guglielmocoloretti) said :
#7

Dear Olivier,

Thank you very much for your answer. Too bad that these people left physics. I guess I have to learn how to run Pythia8 as standalone :)

Thank you very much again!

Best regards,
Guglielmo

Revision history for this message
Jeff (jeffhardy01) said :
#8

The primary supporter of that package is PY8 creator, not us. Furthermore, even while a version of this package that is compatible with Pythia 8.3 is prepared for release concurrently with the upcoming MG5aMC release, it is not yet compatible with that version.

We have not yet begun to explore how to update that package to support HepMC3 with the PY8 creator.
As a result, I am genuinely unsure of the lowest PY8 version required for this kind of functionality (8.3 should be plenty, but I'm not sure about 8.2).

HepMC3 (or any other Pythia format) support is primarily a Pythia8 decision, however we do have to make a choice when installing the interface because the executable needs to link to the related library. The bulk of our Pheno users, in my opinion, are not yet prepared to stop using HEPMC2. Experimentalists are not taken into consideration in this case because they use Pythia8 independently rather than through MG5aMC, allowing them to select their preferred output format as you can see here https://empireonecontactcenter.com/small-business-call-center/

Can you help with this problem?

Provide an answer of your own, or ask Matthew Feickert for more information if necessary.

To post a message you must log in.