CERNLIB installation
Get CERNLIB from
http://cernlib.web.cern.ch/cernlib/
There exist binary tarballs and primitve RPMS (not based on SRPMs that compile, they just pack the compiled binaries).
In order to install in non standard locations, it is easiest to get tarballs of the binary distribution and directly untar them in the target locations.
At the PSI Tier-3 the CERNLIB installations can be found in the
/swshare/CERNLIB
directory.
EvtGen installation
Download from
http://www.lepp.cornell.edu/~ryd/EvtGen.tar
Documentation: EvtGen EvtGen V00-11-07
Setting up the necessary i386 compatibility structure on our sl4_x86 architecture
Install the following packages using yum
i386 compatibility libraries:
glibc-devel.i386
zlib-devel.i386 zlib.i386
pcre.i386
freetype.i386
libgfortran.i386
# there is no devel package for libfortran, so we need to provide this link ourselves
ln -s libgfortran.so.1 /usr/lib/libgfortran.so
Compile and runtime environment
In the unpacked
EvtGen tarball, set up a compile environment in
psit3_env.sh
# 32-bit gcc
GCC_BASE=/swshare/cms/slc4_ia32_gcc345/external/gcc/3.4.5-cms
export CERN_ROOT=/swshare/CERNLIB/2006/slc4_ia32_gcc4
export CLHEP_BASE_DIR=/swshare/cms/slc4_ia32_gcc345/external/clhep/1.9.2.3-CMS3
export ROOTSYS=/swshare/cms/slc4_ia32_gcc345/lcg/root/5.18.00a-cms17
# dummy library for libpdf functions inherited from CERNLIB
export LIBPDFDUMMY_PATH=/swshare/cms/slc4_ia32_gcc345/lcg/genser/GENSER_1_4_1-CMS3q/slc4_ia32_gcc345/lib
export LIBPDFDUMMY=pdfdummy_pythia6_227
export PATH=$GCC_BASE/bin:$PATH
export LD_LIBRARY_PATH=$GCC_BASE/lib:$LD_LIBRARY_PATH:$ROOTSYS/lib:$CLHEP_BASE_DIR/lib:$LIBPDFDUMMY_PATH
Configuration
Run the configuration script
./configure --pythiaLib $CERN_ROOT/lib/libpythia6205.a --photosLib $CERN_ROOT/lib/libphotos202.a
Manual Makefile and configure modifications
manually delete the
-ffriend-injection
directives from the created
config.mk
(in the
EVTCXXFLAGS
and
EVTDEPINC
variables). This option may be needed for gcc4 compilations, but in gcc3 the standard behavior still fits the code.
sed -ie 's/-ffriend-injection//' config.mk
The
Makefile
for some reason misses the linking against the gfortran and the pdfdummy libraries (the latter library just seems to provide empty definitions for some PDF related functions from the CERN library?)
sed -ie 's/\(-o testEvtGen testEvtGen\.o.*\)/\1 -lgfortran -L$(LIBPDFDUMMY_PATH) -l$(LIBPDFDUMMY)/' Makefile
Compilation
Compile the library and the
testEvtGen
binary
make
make bin
Testing
Test the installation using the
testEvtGen
binary
cd test
../testEvtGen test1 1000
Using the library
Source the environment file in your shell:
source /swshare/EvtGen/psit3_env.sh
The libraries are located at in
/swshare/EvtGen/
:
libEvtGen.a libEvtGenBase.a libEvtGenModels.a
--
DerekFeichtinger - 20 Mar 2009