This wiki is now closed and kept for historical purposes. Please visit the new wiki at https://lbne.bnl.gov/wiki/

Garpi Based WCSim

From DUSEL
Jump to navigationJump to search

Notice:

Garpi development has ceased in favor of Worch

http://github.com/brettviren/worch

Also, see WCSim at its GitHub home:

http://github.com/wcsim



WCSim and its dependencies can be installed in an automated manger using GARPI project. This topic shows how to start from an empty environment and end up with a working codebase with WCSim, Geant4, ROOT and other required packages. (see also Beam Software)

One time priming

WCSim code is actually held in another SVN repository served from Duke. It is "glued" into the LBNE/WCD repository through SVN "magic". If you have never accessed the Duke repository you will need to "prime" your authentication cache by doing a one-time direct access. For example, you can do:

svn export http://svn.phy.duke.edu/repos/neutrino/dusel/WCSim/trunk/README /tmp/README

The user name to use is "guest" as is the password.

Installation

Pick a location:

mkdir -p /path/to/install/area
cd /path/to/install/area

Note: the remainder of these instructions assume you continue to work in this directory.

Get the autoinstall script and make it executable.

wget -O autoinstall http://www.phy.bnl.gov/trac/garpi/browser/scripts/autoinstall?format=txt
chmod +x autoinstall

Get the WCSim configuration file

 svn export https://lbne.bnl.gov/svn/interim/trunk/garpi/project.cfg

Kick off the installation:

./autoinstall -c project.cfg everything

Environment

GARPI had an environment manager called "garpi-setenv" which leverages the underlying environment services provided by CMT. Details are are this page. After installing "everything" you can produce the configuration file example following this:

source garpi-setup.sh
source cmtconfig-setup.sh
garpi emit_setenv_config

It will print something like:

[defaults]
base_release = /path/to/install/area/projects
release_package = interim/InterimRelease

This is minimal and assumes this is the only release around. The configuration mechanism is very flexible and can handle describing and setting up multiple base releases and also personal projects. But, for now, copy this into the file:

.garpi-setenv.cfg

Next, create the scripts to source:

./garpi-RELEASE/scripts/garpi-setenv -S setup-interim -N setup-interim

This will print something like:

Generating shell function/alias setup-interim
Generating setup-interim.sh
Generating setup-interim.csh

Note, you can pick another name for both the setup script (-S) and the shell function/alias (-N).

For then after, every shell can do:

source /path/to/install/area/setup-interim.sh

This is fast and only adds a single shell function/alias to your environment so is "safe" to do in every shell. To finally set up the environment one runs

setup-interim

Which prints:

source setup.sh in /path/to/install/area/projects
source setup.sh in /path/to/install/area/projects/interim/InterimRelease/cmt

And gives something like:

$ which WCSim
/path/to/install/area/projects/interim/InstallArea/x86_64-slc5-gcc43-dbg/bin/WCSim

Using libWCSimRoot.so

The Garpi-based build uses Reflex dictionaries, not rootcint ones. ROOT has not yet transitioned to Reflex fully so you will need to do the following to load the dictionaries:

gSystem->Load("libCintex");
Cintex::Enable();
gSystem->Load("libWCSimRootDict");
gSystem->Load("libWCSimRoot");

Some site-specific issues

OS packages

Some packages are assumed to be provide by the OS. These include:

  • subversion, g++, gcc, gfortran, make, wget/curl
  • X11 devel packages (ubu/deb names: libxpm-dev libx11-dev, libxft-dev, libxext-dev)

Deal with HTTP proxy

If behind a firewall with an HTTP proxy (such as at BNL) you must tell various network clients about it.

Many will check this environment variable:

export http_proxy=http://192.168.1.130:3128/

SVN needs special configuration. See this topic for what to do.

Authentication

BNL SVN

See the topic on SVN Repository.

WCSim SVN

WCSim SVN is added to the BNL SVN as an external. You must still provide the correct authentication. The read only account is guest/guest. If the install halts early on, check the log files to see if it is requesting a user name and password. You can provide this by typing into the terminal running "autoinstall".

LCGCMT or GARPI commit access

The GARPI and GARPI's version of LCGCMT are managed in central git repositories and accessed via gitosis. Releases of the code are made as tar files and require no authentication.


If you want to contribute to these projects you can configure the installation (see below) to pull the lcgcmt project from the gitosis service of BNL Physics Department. For this you will need to first gain access. To access this, send your public (one ending in .pub) SSH2 key to bv@bnl.gov. You will need your private key available (directly or via ssh-agent) when running the install. Additional help with SSH keys is available. If you elect to use a release tarball, this is not needed.

Python

This Garpi-based install needs a fairly modern version of Python 2 (>= 2.4).

What could go wrong?

Since nothing is perfect, here is some troubleshooting info.

Logs

The autoinstall script produces a logfile

autoinstall-YYMMDD-hhmmss.log

The most recent log file can be accessed by the symlink

autoinstall-latest.log

The underlying garpi script produces its own log file with lower-level info

garpi.log

Tested on

The list of platforms that this has been tested on are:

  • Ubuntu 10.4 and 10.10, 32 bits
  • Scientific Linux 5.3, 64 bits
  • Scientific Linux (Fermi) 5.x (check what fnal node is)