Using LArSoft on a local machine

This is a collection of hints and tips to allow you to develop and run with sbndcode (and LArSoft) on a local machine, be it a server in your institution or your own laptop.

Getting the software

The "software stack" sbndcode relies upon is big, and it includes among others LArSoft, art, nutools, Geant4, GENIE, ROOT... even GCC.
There are three main ways to have it available on your computer:

  1. read it from the network via CVMFS (with a few hops...); the main disadvantage is that the network may be slow (use a large cache! e.g. CVMFS_QUOTA_LIMIT=20000, that is 20 GB1), and it does not work on the airplane, which surely disrupts your first choice of entertainment on flight;
  2. download it all in binary form from SciSoft;
  3. download it all in source form and compile it; nobody alive I know ever did that, which somehow supports the natural selection model. You don't want this, and if you are forced to, because your platform is not supported, you are still better served by using a container (e.g. docker) or virtual machine hosting a supported platform (e.g. the sorry SLF6) and go the pullProducts way. Did I mention that if ROOT version changes you have to do the whole thing again?

Supported platforms

SBND user poll on used platform

Binary distributions are provided for the supported platforms. A platform can be supported at two levels:

If your platform is supported by LArSoft but not by SBND, do not despair: follow the instructions to get the LArSoft version you want (e.g. from SciSoft), set up a MRB working area and check out sbndcode repository... if you can compile it in the usual way, you are set already.
The sbnd_data and sbndutil packages are platform-independent (they do not contain compiled code), so you can get them from SciSoft as well, and unpacking the tarball in the products area may be already enough.

List of platforms

This platform was updated on October 13, 2017 (which is not the best time to do so, since OSX 10.10 is going to fall off the table no later than November). LArSoft support is documented on LArSoft official support page.

Platform name Magic keyword Type of LArSoft support Type of SBND support
Linux Scientific Linux Fermi 6 slf6 supported supported
Scientific Linux Fermi 7 slf7 supported supported from v06_55_01
Ubuntu Linux 16.04 (LTS) u16 best effort not supported
OSX 10.10 ("Yosemite") d14 support ended November 10, 2017 (last version: v06_55_00)
10.11 ("El Capitan") d15 best effort supported from v06_55_01
10.12 ("Sierra") d16 best effort supported from v06_55_01
10.13 ("High Sierra") d17 in progress not supported

OSX 10.10 ("Yosemite") support has ended on November 10, 2017!

Downloading a binary distribution with pullProducts

The general instructions from LArSoft on how to get a software distribution are basically all you need to know.
We are reproducing them here with some SBND twist, but the ones on LArSoft are likely to stay more up to date.

  1. the first time only:
    1. create and enter your new product area:
      mkdir -p "${HOME}/SBND/products" 
      cd "${HOME}/SBND/products"
    2. then you need to download the pullProduct script:
      curl -O ''
      chmod a+x pullProducts
  2. set up this and all the UPS areas you regularly use (by sourcing their setup script) so that pullProducts will skip UPS products that are already available somewhere
  3. decide which release version you want; if you don't know your options, you can also find the ones currently available at SBND SciSoft page (this is the LArSoft equivalent, for your convenience); you need to know:
    • the version of sbndcode, e.g. v06_52_00
    • the type of build you want: profiling (prof) or debugging (debug)
    • the qualifier of the currently supported compiler (e.g. e14): there is usually only one
    • which platform you have (see the supported platform table), e.g. d14
  4. run the pullProduct script; if you are in your product area:
    pullProducts "$(pwd)" d14 sbndcode-v06_53_00 e14 prof
  5. be patient...

Updating the local product repository

To update a version, you can follows the instructions above and run the same pullProducts (that script rarely changes) on the same directory.
Set up the product area(s) you have locally! If a product is already available, it will not be downloaded again, which makes updates way faster.
There are no tools I am aware of to clean up packages that are not useful any more.

1 The binary distribution of sbndcode v06_52_00 including profiling and debugging versions together is a bit short of 10 GB, which grow to about 15 GB when adding all supported experiments (DUNE, MicroBooNE, etc.).