Skip to content

Installing GENIE using cvmfs

gabriele-sirri edited this page Jun 13, 2024 · 16 revisions

Installing GENIE on a machine with cvmfs

Dependencies

If you are on a machine that has cvmfs, like the CERN or Fermilab clusters, installing the GENIE dependencies is very easy. Please note that this setup requires a CENTOS7 machine (it will not work on ALMA9). If you are a lxplus user, for instance, just connect with

ssh -XY username@lxplus7.cern.ch

Once you are in your working area, simply execute the following

source /cvmfs/dune.opensciencegrid.org/products/dune/setup_dune.sh
setup dune_oslibs v1_0_0  ## not always necessary, it depends on the rest of the system but it does not hurt.
setup root   v6_28_12 -q e26:p3915:prof
setup lhapdf v6_5_4   -q e26:p3915:prof
setup log4cpp v1_1_3e -q e26:prof

And that's it.

Configuring and building GENIE

Once you have the dependencies, the instructions are the same as per the GENIE installation instruction from the genie website at the section Configuring and building GENIE. You can get GENIE directly from GitHub

git clone https://github.com/GENIE-MC/Generator.git
cd Generator
git checkout R-3_04_02 

If you setup up LHAPDF as per these instructions (i.e. using v6), make sure that you add --disable-lhapdf5 and --enable-lhapdf6 in your configure command, as done below.
Replace /home/user/GENIE with your Generator directory and check where you libraries are located.
All the paths will be automatically discovered.

export GENIE=/home/user/GENIE/Generator  # replace with the correct path

cd $GENIE
./configure \
  --prefix=$GENIE/installation/ \
  --disable-lhapdf5 \
  --enable-lhapdf6 \
  --enable-test \
  --enable-t2k \
  --enable-fnal \
  --enable-atmo \
  --enable-nucleon-decay \

gmake # for lxplus7 you can add the option -j

gmake install

You can test the installation with (it will take hours to complete, just check that it is launched correctly):

export GENIE_INSTALL_DIR=/home/user/GENIE/Generator/installation/
export LD_LIBRARY_PATH=$GENIE_INSTALL_DIR/lib:$LD_LIBRARY_PATH
cd Generator/installation/bin
./gmkspl -p 14,-14 -t 1000260560 -n 1 -e 20