The information on this page is valid for Mu2e Offline v5_7_7 and later.
This page discusses a system called satellite builds or satellite releases that is used to support the following two use cases:
This page will discuss some new features of Mu2e Offline that are designed to support these use cases. When we are emphasizing the build system aspects we will refer to satellite builds; when we are emphasiszing the release management aspects we will refer to satellite releases.
While we have a prototype for the build system we do not yet have good support for release management. See the section on missing features.
This section gives an cookbook example of creating, building and running a satellite release that will work on any of the mu2egpvm* machines. These instructions work only for version of Mu2e Offline v5_7_7 and higher.
The example below:
mkdir ~/satellite-test cd ~/satellite-testThis example shows how to work in your home directory. If you wish to submit grid jobs from this directory, you should put this directory in your space on /mu2e/app/users/<username>.
git clone http://cdcvs.fnal.gov/projects/mu2eofflinesoftwaremu2eoffline-satellite satellite cd satelliteThis created four files:
.gitignore Example/fcl/printGens.fcl Example/src/PrintGens_module.cc Example/src/SConscriptThis code+fcl will print the content of a GenParticleCollection data product with the input tag "generate".
setup mu2eCreate the satellite release management files. This example shows how to use Offline version v5_7_7 as base release. If you wish to use a different base release, run the bin/createSatelliteRelease script from that base release:
/cvmfs/mu2e.opensciencegrid.org/Offline/v5_7_7/SLF6/prof/Offline/bin/createSatelliteReleaseIf you get a message asking you if you want to continue or abort, see the full description below.
ls -la ( files you have seen before removed ) lrwxrwxrwx 1 kutschke 3000 75 Jul 11 16:01 SConstruct -> /cvmfs/mu2e.opensciencegrid.org/Offline/v5_7_7/SLF6/prof/Offline/SConstruct lrwxrwxrwx 1 kutschke 3000 54 Jul 11 16:01 out -> /mu2e/data/users/kutschke/satellite-test/satellite/out -rw-rw-r-- 1 kutschke 3000 446 Jul 11 16:01 setup.shIf the base release contains a .buildopts file, this step will also create a symlink in the current to directory to that .buildopts file.
git checkout -b work v5_7_7In this step you are checking out a version of the example code that is matched to these releases of Mu2e Offline.
scons -j 4 mu2e -c Example/fcl/printGens.fcl -n 10 -s /pnfs/mu2e/tape/phy-sim/sim/mu2e/cd3-beam-g4s4-detconversion/v566/1d/ab/sim.mu2e.cd3-beam-g4s4-detconversion.v566.004001_00006825.art
The first step is to choose a base release against which you will build your satellite release; a base release is any complete build of Mu2e Offline. If you are running on a machine that sees the mu2e cvmfs file system, you will normally choose the most recent release of Mu2e Offline on cvmfs. You also need to learn the operating system on which you are running and you need to decide if you want to use a prof or debug build. At this writing (July 2016) all of the mu2egpvm* machines run SLF6 and detsim runs SLF5. If you are on another machine you can learn which SLF version you are using by:
cat /etc/redhat-releaseAt this writing (July 2016) the most recent SLF6 base release with a prof build is:
/cvmfs/mu2e.opensciencegrid.org/Offline/v5_7_7/SLF6/prof/OfflineEverything on this page uses the above base release as an example.
You may use any complete build of Mu2e Offline as a base release. For example, if you cloned Mu2e Offline into:
/mu2e/app/users/<username>/Offlineand built it, then you can use it as a base release.
On any of the mu2egpvm machines, you create a satellite release as follows:
setup mu2e /cvmfs/mu2e.opensciencegrid.org/Offline/v5_7_7/SLF6/prof/Offline/bin/createSatelliteReleaseNote that the location of the script is in "bin/createSatelliteRelease" relative to the base release chosen in the previous section. This script will create the following files:
lrwxrwxrwx 1 kutschke mu2e 75 Jul 10 17:03 SConstruct -> /cvmfs/mu2e.opensciencegrid.org/Offline/v5_7_7/SLF6/prof/Offline/SConstruct lrwxrwxrwx 1 kutschke mu2e 54 Jul 10 17:03 out -> /mu2e/data/users/kutschke/Development/Tutorial/t01/out -rw-rw-r-- 1 kutschke mu2e 446 Jul 10 17:03 setup.shIf the base release contains a .buildopts file, the satellite release directory will also contain a symbolic link to that .buildopts file. A discussion of these files follows shortly.
To use the satellite release there is one more step:
Look at the setup.sh file. You will see that it sources the setup script from the base release and then adds the local bin and lib directories to the relevant path variables (it's OK that these directories do not yet exist). SConstruct and, if present, .buildopts, are the rules to build your code; this configuration says to use the same rules as those found in the base release.
You should put all output files, such as event-data files, root files and log files in the out subdirectory. One of the rules for using Mu2e disks is that code disks, such as /mu2e/app, should contain only source code and binaries built from that source code. You may not put output files such as event-data files, root files, log files on code disks; it's also not a good idea to put them on your home disk. They belong on a data disk such as /mu2e/data/users /pnfs/mu2e/scratch/users.
To facilitate this, the createSatelliteRelease script creates an output directory in your disk space on /mu2e/data/users and makes a symbolic link from the current working directory to that output directory. The algorithm for choosing the name of the working directory tries to be smart enough so that that you can have many satellite releases on /mu2e/app and each will have a uniquely named output directory.
If that directory already exists, you will see this message:
The output directory already exists: /mu2e/data/users/kutschke/satellite-test/satellite/out You have two choices: 1) Continue: be aware that new output files may overwrite old files 2) Abort this script: you can mv or rm that directory and rerun this script Enter c to continue anything else to abort:If you are comfortable reusing this directory, then type c and return; createSatelliteRelease will complete its work and will make a symlink named "out" that points to this directory. If you are not comfortable reusing this directory, then type any character except c, and return. This check is made before createSatelliteRelease creates any files. At this time you can take whatever action is necessary to resolve the situation, perhaps renaming the output directory. Then rerun createSatelliteRelease.
If you wish to put output files on a disk other than /mu2e/data, you can specify a new disk with the environment variable MU2E_DATA_USERS. If the createSatelliteRelease script cannot see the designated data disk, it will simply make a directory named out in the local working directory.
When you log out and log in again, you do not need to recreate the satellite release. You need only:
setup mu2e source setup.sh
createSatelliteRelease has the following safety features
In Offline v5_7_7 and earlier, the build system decorates module .so filenames differently depending on whether they were made as part of a base release or as part of a satellite release. In a base release, .so filenames start with "libmu2e_"; in a satellite release they start with "libmu2euser_". Starting on the evening of July 20, the scripts at the HEAD of the git master branch decorate both satellite release and base release .so files with "libmu2e_".
If you want to disassociate your satellite release from its base release, use the command:
cleanSatelliteReleaseThis command will be in your path once you have:
setup mu2e source setup.shWhen you run cleanSatelliteRelease it will do the following, prompting you before each step:
You can then connect it to a new base release by:
Log out Log in again cd to the working directory setup mu2e /path/to/a/new/base/release/bin/createSatelliteRelease
The following files are present in Mu2e Offline as of version v5_7_7 but are obsolete and will be removed.
The following script was intended to do a cleanSatelliteRelease and createSatelliteRelease (pointing at a new base release) in a single step. It does not work, indeed cannot work: it is necessary to log out between the steps or to do the second step in a new terminal window.
The following three files are left over from a previous attempt at a satallite releease system and are now obsolete:
bin/cleanTestRelease bin/createTestRelease bin/rebindTestRelease
|Security, Privacy, Legal|