Other sourcecode/main

Table Of Contents

Previous topic

Offline Infrastructure

Next topic

Offline Framework

This Page

Daya Bay Links

Content Skeleton

Installation and Working with the Source Code

Using pre-installed release

All major clusters should have existing releases installed and ready to use. Specific information on different clusters is available in the wiki topic “Cluster Account Setup” [1]. The key piece of information to know is where the release is installed.

Configuring your environment to use an installed release progresses through several steps.

Basic setup

Move to the top level release directory and source the main setup script.

shell> cd /path/to/NuWa-RELEASE
bash> source setup.sh
tcsh> source setup.csh

Replace “RELEASE” with “trunk” or the release label of a frozen release.

Setup the dybgaudi project

Projects are described more below. To set up your environment to use our software project, “dybgaudi” and the other projects on which it depends to must enter a, so called, “release package” and source its setup script.

shell> cd /path/to/NuWa-RELEASE
bash> source setup.sh
tcsh> source setup.csh

You are now ready to run some software. Try:

shell> cd $HOME
shell> nuwa.py --help

Instalation of a Release

If you work on a cluster, it is best to use a previously existing release. If you do want to install your own copy it is time and disk consuming but relatively easy. A script called “dybinst” takes care of everything.

First, you must download the script. It is best to get a fresh copy whenever you start an installation. The following examples show how to install the “trunk” branch which holds the most recent development.

shell> svn export http://dayabay.ihep.ac.cn/svn/dybsvn/installation/trunk/dybinst/dybinst

Now, let it do its work:

shell> ./dybinst trunk all

Expect it to take about 3-4 hours depending on your computer’s disk, CPU and network speed. It will also use several GBs of storage, some of which can be reclaimed when the install is over.

Anatomy of a Release

external/
holds 3^{rd} party binary libraries and header files under PACKAGE/VERSION/ sub directories.
NuWa-RELEASE/

holds the projects and their packages that make up a release.

lcgcmt
build information for using 3^{rd} party external packages
gaudi
the Gaudi framework
lhcb
packages adopted from the LHCb experiment
dybgaudi
packages specific to Daya Bay offline software
relax
packages providing dictionaries for CLHEP and other HEP libraries.

Personal Projects

  • Using a personal project with projects from a NuWa release.
  • CMTPROJECTPATH

For now see https://wiki.bnl.gov/dayabay/index.php?title=CMT_Projects.

Version Control Your Code

Using SVN to Contribute to a Release

Using GIT with SVN

Advanced developers may consider using git [2] to interface with the SVN repository. Reasons to do this include being able to queue commits, advanced branching and merging, sharing code with other git users or with yourself on other computers with the need to commit to SVN. In particular, git is used to track the projects (gaudi, etc) while retaining the changes Daya Bay makes. For more information see https://wiki.bnl.gov/dayabay/index.php?title=Synchronizing_Repositories.

Technical Details of the Installation

LCGCMT

The LCGCMT package is for defining platform tags, basic CMT macros, building external packages and “glueing” them into CMT.

Builders

The builders are CMT packages that handle downloading, configuring, compiling and installing external packages in a consistent manner. They are used by dybinst or can be run directly. For details see the README.org file under lcgcmt/LCG_builders/ directory.

Some details are given for specific builders:

data:
A select sampling of data files are installed under the “data” external package. These are intended for input to unit tests or for files that are needed as input but are too large to be conveniently placed in SVN. For the conventions that must be followed to add new files see the comments in the data/cmt/requirements/ file under the builder area.

Footnotes

[1]https://wiki.bnl.gov/dayabay/index.php?title=Cluster_Account_Setup
[2]http://git.or.cz/