Project

General

Profile

Building extra packages for NOvA

In addition to the art externals products, NOvA also uses the following products:

  • cry
  • g4abla
  • g4emlow
  • g4neutron
  • g4photon
  • g4radiative
  • g4surface
  • geant4
  • genie
  • heppdt
  • lhapdf
  • log4cpp
  • pdfsets
  • pythia
  • xerces_c

<product-dir> is the fully qualified path to your external packages directory.

  • The build order is very important. Several products rely on the existence of other products.
  • We start by building those products which have no depencencies except the existence of packages already in art_externals.
  • We recommend that you look at the various log files after they are created.

1. Make sure you have the art externals installed in your <product-dir>

Build a distributable ups
Building art externals

2. Setup the environment

For the purposes of this build, make sure that the PRODUCTS variable only points to <product-dir>.
This variable is used in the build scripts.

source <product-dir>/setup
bash: export PRODUCTS=<product-dir>
tcsh: setenv PRODUCTS <product-dir>

Get and unwind the nova_externals source code tarball:

cd $PRODUCTS
wget http://oink.fnal.gov/distro/art/nova_externals-<version>-source.tar.gz
tar xzf nova_externals-<version>-source.tar.gz

3. Now build packages which have no extra dependencies:

Build xerces_c

cd $PRODUCTS/xerces_c/v3_1_1
./buildXerces.sh >& log.buildXerces.sh &

Build cry

cd $PRODUCTS/cry/v1_5
./buildCry.sh >& log.buildCry.sh &

Build heppdt

cd $PRODUCTS/heppdt/v3_04_01
./buildHepPDT.sh >& log.buildHepPDT.sh &

Build lhapdf

cd $PRODUCTS/lhapdf/v5_8_4
./buildLhaPDF.sh >& log.buildLhaPDF.sh &

Get pdfsets

pdfsets contains the LHAPDF data sets.

cd $PRODUCTS/pdfsets/v5_8_4a
./getPdfSets.sh

Build pythia

cd $PRODUCTS/pythia/v6_4_24
./buildPythia.sh 

Build log4cpp

cd $PRODUCTS/log4cpp/v1_0
./buildLog4cpp.sh >& log.buildLog4cpp.sh &
edit bin/log4cpp-config by hand to replace the hard coded path with ${LOG4CPP_FQ_DIR}

4. Next, Build Geant4

Geant4 requires CLHEP (see art_externals) and xerces_c

cd $PRODUCTS/geant4/v4_9_4
./buildGeant4.sh >& log.buildGeant4.sh &

The Geant4 optional data files are installed as separate products which may be used when needed.
The simplest way to install these packages is via upd, using getG4DataSets.sh:

cd $PRODUCTS/geant4/v4_9_4
./getG4DataSets.sh

5. Building root

The NOvA build of root uses pythia, geant4, clhep, fftw, libxml2, and python.

cd $PRODUCTS/root/v5_28_00a
./buildRootNova.sh >& log.buildRootNova.sh &

6. Build GENIE

GENIE depends on root, pythia, lhapdf, libxml2, and log4cpp.

cd $PRODUCTS/genie/v3189
./buildGenie.sh >& log.buildGenie.sh &

7. Distributing nova_extras

Verify that ups recognizes all the products

  • List all the products in <product-dir>
ups list -aK+

Build the distributable ups tar file.

  • Some definitions used to name the tarball:
  • version: usually written as, for instance, 0.5.0 instead of v0_5_0
  • os: sl4, sl5, etc.
  • architecture: noarch, i686, or x86_64
  • compiler: gcc34, gcc41, gcc45, etc.
  • For general distribution, we allow people to define their own <product-dir>, so we build the tarball from inside <product-dir>
  • We tar the noarch and architecture specific packages separately.
  • Note that <product-dir> will also contain other products. These instructions are just for the extra NOvA packages.
cd $PRODUCTS/art_externals/v0_2_0/scripts
./tarNovaExtras.sh $PRODUCTS
  • This will create $PRODUCTS/nova_extras-<version>-noarc.tar.gz and $PRODUCTS/nova_extras-<version>-<os>-<architecture>-<compiler>.tar.gz

8. Getting a prebuilt tarball

  • You can copy and unwind your own tarball wherever you need it.
  • Tarballs for supported distributions of nova_extras are at http://oink.fnal.gov/distro/art/
  • To conserve disk space, we strongly recommend deleting your local copy of the tarball after you unwind it.