Genie is hosted by Hepforge, IPPP Durham
GENIE Installation Instructions

This section contains all the information you need in order to configure, build & test GENIE.

Last update: April 22, 2015
The following instructions are exact for the latest SVN trunk version of GENIE - Some modifications may be required for frozen releases.
Use $./configure --help to get information on the configuration options for your version of GENIE.


Before going any further, please take a moment to check: Do you have all the necessary 3rd party softare installed?
See the 3rd party software installation instructions.


Building GENIE
If all external dependencies are installed, then in order to build GENIE you just need to:
shell% configure [options]
shell% gmake
shell% gmake install (*optional*, see below)

FLAG DESCRIPTION DEFAULT
--prefix installation location (for 'gmake install') /usr/local

enable/disable options with either --enable- or --disable- (eg --enable-lhapdf --disable-flux-drivers)

profiler GENIE code profiling using Google perftools default: disabled
doxygen-doc Generate doxygen documentation at build time default: disabled
dylibversion Adds version number in dynamic lib names default: enabled (recommended)
lowlevel-mesg Disable (rather than filter out at run time) some prolific debug/info level messages known to slow GENIE down default: disabled
debug Adds -g in the compiler options to request debug info default: disabled
lhapdf Use the LHAPDF parton density function library, requires libLHAPDF default: enabled
cernlib Use the PDFLIB parton density function library, requires CERNLIB default: disabled (LHAPDF is preferred)
flux-drivers Built-in flux drivers default: enabled
geom-drivers Built-in detector geometry drivers default: enabled
mueloss Muon energy loss modeling (for atm. upgoing muon sim.) default: enabled
vle-extension GENIE very low energy (1 MeV - 100 MeV) extension default: disabled (experimental)
validation-tools GENIE physics model validation tools default: disabled
test Test programs default: disabled
t2k Enables T2K-specific generation app default: disabled
fnal Enables FNAL experiment-specific event generation app default: disabled
atmo Atmospheric neutrino event generation app default: disabled
nucleon-decay Nucleon decay event generation app default: disabled
rwght Event reweighting tools default: disabled
masterclass GENIE neutrino masterclass app default: disabled (in devel)

with options for 3rd party software, prefix with --with- (eg --with-lhapdf-lib=/some/path/)
optimiz-level Compiler optimization level (O,O2,O3,OO,Os) default: O2
profiler-lib Path to profiler library needed if you --enable-profiler
doxygen-path Doxygen binary path needed if you --enable-doxygen
pythia6-lib PYTHIA6 library path always needed / auto-detected afterchecking for $PYTHIA6 env.var.
cern-lib CERN libraries path needed if you --enable-cern / auto-detected after checking for $CERNLIB env.var.
lhapdf-inc Path to LHAPDF includes needed if you --enable-lhapdf / auto-detected after checking for $LHAPDF_INC env.var.
lhapdf-lib Path to LHAPDF libraries needed if you --enable-lhapdf / auto-detected after checking for $LHAPDF_LIB env.var.
libxml2-inc Path to libxml2 includes always needed / auto-detected
libxml2-lib Path to libxml2 library always needed / auto-detected
log4cpp-inc Path to log4cpp includes always needed / auto-detected
log4cpp-lib Path to log4cpp library always needed / auto-detected


Below, is an example of how I typically build GENIE:
shell% cd $GENIE
shell% ./configure
             --prefix=/some/installation/path
             --disable-profiler
             --disable-validation-tools
             --disable-cernlib
             --enable-lhapdf
             --enable-flux-drivers
             --enable-geom-drivers
             --disable-doxygen
             --enable-test
             --enable-mueloss
             --enable-dylibversion
             --enable-t2k
             --enable-fnal
             --enable-atmo
             --enable-nucleon-decay
             --enable-rwght
             --disable-masterclass
             --disable-debug
             --with-optimiz-level=O2
             --with-pythia6-lib=/full/path/to/my/libPythia6/
             --with-lhapdf-inc=/full/path/to/my/lhapdf/includes/
             --with-lhapdf-lib=/full/path/to/my/lhapdf/library/
             --with-libxml2-inc=/full/path/to/my/libml2/includes/
             --with-libxml2-lib=/full/path/to/my/libxml2/library/
             --with-log4cpp-inc=/full/path/to/my/log4cpp/includes/
             --with-log4cpp-lib=/full/path/to/my/log4cpp/library/
shell% gmake


Further notes:
  • The configure script has defaults for all the enable/disable options and auto-detection capabilities for figuring out the paths. It is likely that a simple './configure' (no arguments) would work in your system. However, we recommend you staying in control of the build configuration and supply all the required inputs.
  • You can run 'gmake install' to to copy binaries, libraries and headers under $DIR/bin, $DIR/lib and $DIR/include respectivelly, where $DIR is the installation location specified with --prefix at the GENIE configuration step. I usually skip that and just pick the GENIE binaries, libraries and headers from $GENIE/bin, $GENIE/lib and $GENIE/src respectivelly.
  • Before following the installation instructions given above and and/or before running GENIE, make sure that:
    • You have defined $GENIE to point at your top level GENIE directory
    • You have defined $ROOTSYS to point at your ROOT installation
    • All your library paths ($ROOTSYS/lib, $GENIE/lib, /path/to/pyhia6, /path/to/libxml2/lib, /path/to/log4cpp/lib, ...) are listed in $LD_LIBRARY_PATH (of $DYLD_LIBRARY_PATH on Mac OS X)
    • All your binary paths ($ROOTSYS/bin, $GENIE/bin) are listed in $PATH
  • When using old versions of gcc (< 4) don't use optimizations above the O2 level as it generates a seekoff overload problem. See this email at the gnu-gcc mailing list.

What to do next / Testing your installation

       
If the installation was successfull you should find a bunch of libraries in $GENIE/lib and some applications in $GENIE/bin. Here is a set of instructions, for running a few simple apps, and making sure there is no major issue with your GENIE installation.

First, download pre-computed cross-sections, from nu_mu+O^16 interactions, from here . Download datafiles corresponding to the version of GENIE you are using. If you want to generate these cross-sections by yourself, see the GENIE User and Physic manual.

Generate a 100k event sample of nu_mu+O^16 interactions between 0 and 10 GeV using a simple analytical (x*exp(-x)) numu flux description (Note: pdg_code(nu_mu)=14, pdg_code(O^16)=1000080160):

shell& gevgen -n 100000 -p 14 -t 1000080160 -e 0,10 -f 'x*exp(-x)' --run 1000 --seed 1721827 --cross-sections /path/to/downladed/cross_sections.xml



Print-out the first 50 events from the GHEP (GENIE's native event format) event file generated during the previous step (there should be a file named `gntp.1000.ghep.root'):

shell& gevdump -n 50 -f gntp.1000.ghep.root



Generate a 10k event sample of pi^{+}+16O interactions for pi^{+}'s of 200 MeV kinetic energy:

shell& gevgen_hadron -n 10000 -p 211 -t 1000080160 -k 0.2 --seed 65431


If everything seems to work then the GENIE is really out of the bottle. Read the Physics and User manual for further instructions and information on GENIE tools. Have fun...

Note: If you had problems following these instructions please send me your comments Also, please let me know whether you have installed GENIE at a new platform.