Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 231484 - [science overlay] sci-physics/pythia-{6,8}: new ebuilds
Summary: [science overlay] sci-physics/pythia-{6,8}: new ebuilds
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Science Physics related packages
URL:
Whiteboard:
Keywords: KEYWORDREQ
Depends on: 236718
Blocks: 236073
  Show dependency tree
 
Reported: 2008-07-11 06:55 UTC by Benjamin Bannier
Modified: 2008-09-23 11:38 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Don't worry, we use f90 (pythia-6.4.18.ebuild,954 bytes, text/plain)
2008-07-11 06:56 UTC, Benjamin Bannier
Details
The latest (pythia-8.1.08.ebuild,1.20 KB, text/plain)
2008-07-11 06:57 UTC, Benjamin Bannier
Details
Install remaining data files and add an env var (install_xmldoc.patch,514 bytes, patch)
2008-08-24 17:54 UTC, Benjamin Bannier
Details | Diff
Add some pythia6 interface for sci-physics/root (Add_root_interfaces.patch,1.10 KB, patch)
2008-08-29 19:34 UTC, Benjamin Bannier
Details | Diff
Add support for HepMC to pythia-8 (Add-support-for-HepMC.patch,1.02 KB, patch)
2008-09-04 16:33 UTC, Benjamin Bannier
Details | Diff
lhapdf-5.4.1.ebuild (lhapdf-5.4.1.ebuild,764 bytes, text/plain)
2008-09-08 14:31 UTC, Stefano Takekawa
Details
lhapdf-5.5.0.ebuild (lhapdf-5.5.0.ebuild,762 bytes, text/plain)
2008-09-08 14:32 UTC, Stefano Takekawa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Bannier 2008-07-11 06:55:06 UTC
Hi,

the pythia libraries are widely used in high-energy physics for event and phase space generation.

Like with many HEP libraries, there exist an older version in fortran and a more recent version in c++. I am attaching two new ebuilds, for the latest fortran  (6.4.18) and c++ version (8.1.08) of the code.

The build for 6.4.18 is homebrewn. I also collected some documentation and examples from the website. The 8.1.08 build was suprisingly painless, despite Makefile:2. It even has tests.

I went a little toolchain-crazy with the ebuilds; please let me know what should be improved.

Cheers,

Benjamin

Reproducible: Always
Comment 1 Benjamin Bannier 2008-07-11 06:56:46 UTC
Created attachment 160104 [details]
Don't worry, we use f90
Comment 2 Benjamin Bannier 2008-07-11 06:57:40 UTC
Created attachment 160105 [details]
The latest
Comment 3 Sébastien Fabbro (RETIRED) gentoo-dev 2008-07-11 15:47:20 UTC
Now in science overlay.
Comment 4 Benjamin Bannier 2008-08-24 17:54:59 UTC
Created attachment 163721 [details, diff]
Install remaining data files and add an env var

Hi,

since this is still OPEN, I post here.

Pythia8 does not install all the data files needed.

Since we install all files manually and we (i.e. I) did not know that some configurations (e.g. root) need the xml data of xmldoc from the build dir, the install is broken. The attached patch installs these additional data files and adds an environment variable for the data location PYTHIA8DATA, which is checked by at least sci-physics/root.

To test this behavior I used the pythia8 example /usr/share/doc/root-5.20.00/tutorials/pythia/pythia8.C. I patched the root ebuild with 

diff --git a/root-5.20.00.ebuild b/root-5.20.00.ebuild
index 35b8a1c..f1fd736 100644
--- a/root-5.20.00.ebuild
+++ b/root-5.20.00.ebuild
@@ -18,7 +18,7 @@ LICENSE="LGPL-2.1"
 KEYWORDS="~amd64 ~hppa ~sparc ~x86"
 
 IUSE="afs cern clarens doc fftw geant4 kerberos ldap +math mysql odbc
-       oracle postgres python ruby qt4 ssl xml xrootd"
+       oracle postgres python ruby qt4 ssl xml xrootd pythia8"
 
 # libafterimage ignored, may be re-install for >=5.20
 # see https://savannah.cern.ch/bugs/?func=detailitem&item_id=30944
@@ -53,7 +53,8 @@ RDEPEND="sys-apps/shadow
        geant4? ( sci-physics/geant:4 )
        odbc? ( || ( dev-db/unixODBC dev-db/libiodbc ) )
        oracle? ( dev-db/oracle-instantclient-basic )
-       clarens? ( dev-libs/xmlrpc-c )"
+       clarens? ( dev-libs/xmlrpc-c )
+       pythia8? ( sci-physics/pythia:8 )"
 
 DEPEND="${RDEPEND}
        cern? ( dev-lang/cfortran )
@@ -121,6 +122,10 @@ src_compile() {
        use odbc && [[ -z $(type -P odbc-config) ]] && \
                myconf="${myconf} --with-odbc-incdir=/usr/include/iodbc"
 
+       use pythia8 && \
+               myconf="${myconf} --enable-pythia8" && \
+               myconf="${myconf} --with-pythia8-incdir=/usr/include/pythia"
+
        # the configure script is not the standard autotools
        ./configure \
                ${target} \

(btw: this patch enables pythia8 for root) and replace $PYTHIA8 with /usr in the  root tutorial file.

I could file this elsewhere as a root bug if this is a desired feature.

I will check if there is something broken with pythia:6 when I find time to look into pythia-6 support in root.

Cheers,

b.
Comment 5 Benjamin Bannier 2008-08-29 19:34:42 UTC
Created attachment 164087 [details, diff]
Add some pythia6 interface for sci-physics/root

Hi,

so I looked into pythia6 support for sci-physics/root.

Root needs some additional declarations and functions for interfacing with pythia (see http://root.cern.ch/root/Install.html under "Pythia Event Generators"). They distribute on older pythia6 version, which seems to be just a plain pythia6 release and some interface files.

Since the pythia6 in science is newer, I suggest just adding the interface stuff from root to the libpythia6 archive. This seems to work (have a look at /usr/share/doc/root-5.20.00/tutorials/pythia/pythiaExample.C) and should probably not interfere with other uses.

Maybe some pythia6 users might want to have a look if this works.


Cheers,

Benjamin
Comment 6 Sébastien Fabbro (RETIRED) gentoo-dev 2008-08-30 12:35:57 UTC
sparc and hppa, could you test these 2 packages (in science overlay). I'm planning to add them in the main tree and add the interface too sci-physics/root-5.20.00-r1, also in the science overlay for testing.

Thanks.
Comment 7 Friedrich Oslage (RETIRED) gentoo-dev 2008-08-31 00:29:13 UTC
I tested =sci-physics/pythia-6.4.18-r1 and =sci-physics/pythia-8.1.08-r1 with =sci-physics/root-5.20.00-r1. Looks good, feel free to add them with ~sparc :)
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2008-09-02 06:19:16 UTC
(In reply to comment #6)
> sparc and hppa, could you test these 2 packages (in science overlay). I'm
> planning to add them in the main tree and add the interface too
> sci-physics/root-5.20.00-r1, also in the science overlay for testing.

I'm not going to add any overlays to my stabilisation system. But do feel free to add the ebuild and make a note of it on this bug, and then I'll test it for hppa keywording.
Comment 9 Sébastien Fabbro (RETIRED) gentoo-dev 2008-09-02 09:12:25 UTC
> to add the ebuild and make a note of it on this bug, and then I'll test it for
> hppa keywording.

Now in CVS. Thanks for testing.
 

Comment 10 Stefano Takekawa 2008-09-03 08:20:58 UTC
Hi,
     as a user, I'd like to add some comments. First of all, I'm happy that someone is trying to include Pythia and other stuff which is commonly used by physics people.
I'm not aware if the following things are known.
Well, g77 is still used and ebuilds should not rely only on gfortran.
Pythia6 shouldn't be considered just an old version and Pythia8 the new one, since Pythia8 doesn't do all the stuff Pythia6 can do.
It should be possible to link Pythia6/8 to lhapdf ( http://projects.hepforge.org/lhapdf/ ). There must be the choise to link Pythia6 agaist lhapdf or pdflib804 (in cernlib-montecarlo). Moreover Pythia8 can be linked to Pythia6 itself and to HepMC ( https://savannah.cern.ch/projects/hepmc/ ).
If you need help I can give you some, but I don't now how much because I've limited time.

Thanks!

Regards
Comment 11 Sébastien Fabbro (RETIRED) gentoo-dev 2008-09-03 09:46:50 UTC
Hi Stephano,

Thanks for your interest in pythia.

> Well, g77 is still used and ebuilds should not relyn only on gfortran.

It does not rely on gfortran. You can install pythia6 with 
F77=<myfortran> FFLAGS=<my fortran flags> emerge =pythia-6*
where <myfortran> is either g77, gfortran or ifort.

> Pythia6 shouldn't be considered just an old version and Pythia8 the new one,
> since Pythia8 doesn't do all the stuff Pythia6 can do.

It's not considered just an old version. They are slotted (i.e.: you can install both concurrently and they will update independently).

> It should be possible to link Pythia6/8 to lhapdf (
> http://projects.hepforge.org/lhapdf/ ). There must be the choise to link
> Pythia6 agaist lhapdf or pdflib804 (in cernlib-montecarlo). Moreover Pythia8
> can be linked to Pythia6 itself and to HepMC (
> https://savannah.cern.ch/projects/hepmc/ ).
> If you need help I can give you some, but I don't now how much because I've
> limited time.

Help would be great. I don't use these packages. Could you explain in more details how pythia8 could be linked to pythia6? I only see this in the examples. And cernlib-montecarlo to pythia6? 

About HepMC and lhapdf, it might be a while before I find time to test these packages and produce ebuilds. Any ebuild draft would be also appreciated. I took a brief look at the home pages and it looks like they both use autotools so they should be fairly straight forward.

Thanks.



Comment 12 Benjamin Bannier 2008-09-04 16:33:21 UTC
Created attachment 164578 [details, diff]
Add support for HepMC to pythia-8

Hi Stefano,

great to have some feedback.

(In reply to comment #10)
> It should be possible to link Pythia6/8 to lhapdf (
> http://projects.hepforge.org/lhapdf/ ). There must be the choise to link
> Pythia6 agaist lhapdf or pdflib804 (in cernlib-montecarlo). Moreover Pythia8
> can be linked to Pythia6 itself and to HepMC (
> https://savannah.cern.ch/projects/hepmc/ ).

I am not sure I fully understand what you have in mind: these ebuilds only
install libraries; you are free to link your projects against whatever libraries
you want. Is there any special magic involved in linking pythia-6 projects
against PDF libraries (like overwriting functions in pythia)?

However, I filed new ebuild suggestions for sci-physics/hepmc in bug #236718 and
for sci-physics/lhapdf in bug #236719 , and I am also attaching a patch to add an
useflag for hepmc to pythia-8 (this builds a small interface library).

> If you need help I can give you some, but I don't now how much because I've
> limited time.

It would be great if you could test these additions out (there are some examples
if you emerge pythia-8 with USE=doc). For e.g. linking a pythia-8 project
against pythia-6 with Les Houches PDF's
	# g++ main52.cc -o main52 -I/usr/include/pythia -lpythia6 -lpythia8
or for linking pythia-8 against HepMC and LHAPDF
	# g++ main32.cc -o main32 -I/usr/include/pythia  -lpythia8 -lhepmcinterface -lHepMC -lLHAPDF
(all from /usr/share/doc/pythia-8.1.08/examples/).

An please, could you comment on how you link pythia-6 against Les Houches or
PDFlib?

(In reply to comment #11)
Sebastién, is adding HepMC and/or Les Houches PDF's an option?


Enjoy,

Benjamin
Comment 13 Stefano Takekawa 2008-09-08 14:31:03 UTC
Created attachment 164916 [details]
lhapdf-5.4.1.ebuild
Comment 14 Stefano Takekawa 2008-09-08 14:32:47 UTC
Created attachment 164917 [details]
lhapdf-5.5.0.ebuild
Comment 15 Stefano Takekawa 2008-09-08 14:39:45 UTC
Hi,
    well. Pythia6 needs cernlib-montecarlo if you write a program which uses pdflib804, then it means not during compile. But if you want to link to lhapdf you need to link to this library at compile time and you also need to make very very little modification to pythia6 code, but in this case you can't use pdflib anymore. Whereas Pythia8 doesn't need the stuff I mentioned but for examples and for final user code.

In Pythia8 ebuild the configure option should be "--with-hepmcversion=2.04.00".

I added two lhapdf ebuilds, since version 5.4.1 compiles with g77 and 5.5.0 with gfortran.
Comment 16 Benjamin Bannier 2008-09-11 03:42:01 UTC
Hi Sebastién,

did you dump the extra pythia-6 examples on a gentoo site? Some time after the update, I can still not find a mirror that has them. Or is this some infrastructure bug?

b.
Comment 17 Jeroen Roovers (RETIRED) gentoo-dev 2008-09-16 21:44:14 UTC
Marked ~hppa.
Comment 18 Sébastien Fabbro (RETIRED) gentoo-dev 2008-09-23 11:38:27 UTC
Hi all,

I'm closing this bug, all original issues are fixed. I did put the pythia examples on a mirror.
Stefano, please see the lhapdf-5.5.0 ebuild in the tree to base an eventual 5.4.1 ebuild if really needed. For all issues, let's open new bugs.

Thanks all for your work.