Skip to content

clas12env

A modulefile environment for CLAS12 software, used primarily at JLab and on the OSG.

  • The modulefiles and software builds for GEANT4 used in this environment are documented separately and can be used independently.
  • This is not a build system! If builds for your system are not installed, these modulefiles will only print a warning.

Quick Start

Only at JLab:

module use /scigroup/cvmfs/hallb/clas12/sw/modulefiles

or, from anywhere with CVMFS:

module use /cvmfs/oasis.opensciencegrid.org/jlab/hallb/clas12/sw/modulefiles

Then, to get the latest CLAS12 environment in one shot:

module load clas12

And then you can do stuff, e.g.:

ccdb -i
hipo-utils -h
gcc -o myana.exe -L$HIPO/lib -lhipo4 myana.c ...
clas12root -b -q -l mymacro.C
gemc ...
recon-util ...

Usage

All you might need to know about the module command:

  • module avail - just prints the available envirnoment modules
  • module list - just prints the modules you have loaded
  • module show [name] - just prints what loading a module will do to your environment
  • module load [name] - loads a module (*)
  • module unload [name] - unloads a module (*)
  • module purge - unloads all loaded modules (*)

Only the (*) ones actually modify your environment!

For example,

ifarm> module avail
------------------------------------- /scigroup/cvmfs/hallb/clas12/sw/modulefiles --------------------------------------
ant                clas12root/1.9.0  coatjava/13.1.0  denoise/4.2.3  jdk/25.0.2     qadb/3.1.0    sqlite/5.10
apptainer          cmake/3.29.0      coatjava/13.2.0  doxygen        julia/1.10.2   qadb/3.2.0    sqlite/5.11
asprof             cmake/4.1.2       coatjava/13.3.0  evio/5.2       maven/3.9.9    qadb/3.3.0    sqlite/5.12
ccdb/1.99.6        coatjava/6.5.6.1  coatjava/13.4.0  gnuplot/6.0.4  maven/3.9.11   qadb/3.4.0    sqlite/dev
ccdb/1.99.7        coatjava/6.5.9    coatjava/13.4.1  groovy/4.0.3   maven/4.0.0    qadb/3.4.1    system
ced/1.7.2          coatjava/8.2.1    coatjava/13.5.0  groovy/4.0.20  mcgen/3.14     qadb/dev      timeline/dev
ced/1.9.6          coatjava/10.0.7   coatjava/13.5.1  groovy/4.0.24  mcgen/3.16     rcdb/1.99.6   timeline/prod
clas12/5.2         coatjava/10.0.9   coatjava/13.5.2  groovy/4.0.27  mcgen/3.17     rcdb/1.99.7   tmpfs/auto
clas12/5.3         coatjava/11.0.1   coatjava/13.5.3  hipo/4.2.0     mcgen/3.18     root/6.30.04  tmpfs/cue
clas12/5.4         coatjava/11.1.0   coatjava/13.6.0  hipo/4.3.0     mon12/7.10     root/6.34.06  tmpfs/farm
clas12/5.5         coatjava/11.1.1   coatjava/13.7.0  iguana/0.8.0   mon12/7.14     root/6.36.04  tmpfs/scratch
clas12/dev         coatjava/12.0.0   coatjava/dev     iguana/1.0.0   neovim/0.11.2  scicomp       util/dev
clas12root/1.8.5   coatjava/13.0.0   denoise/4.0.1    iguana/1.1.0   pymods/3.9     sim           visualvm
clas12root/1.8.6   coatjava/13.0.2   denoise/4.2.0    jdk/17.0.2     python/3.12.4  sqlite/4.4.2  workflow/dev
clas12root/1.8.6b  coatjava/13.0.3   denoise/4.2.2    jdk/21.0.2     python/3.13.7  sqlite/5.9    xrootd
ifarm> module show clas12/5.5
-------------------------------------------------------------------
/scigroup/cvmfs/hallb/clas12/sw/modulefiles/clas12/5.5:

module-whatis   full clas12 environment, https://code.jlab.org/hallb/clas12/env
prereq          system
prereq          --optional scicomp
prereq          --optional jdk/21.0.2
prereq          --optional maven/3.9.11
prereq          --optional groovy/4.0.20
prereq          --optional ced/1.9.6
prereq          --optional coatjava/13.5.2
prereq          --optional mon12/7.14
prereq          --optional rcdb/1.99.7
prereq          --optional ccdb/1.99.7
prereq          --optional util
prereq          --optional cmake/3.29.0
prereq          --optional julia/1.10.2
prereq          --optional root/6.36.04
prereq          --optional qadb/3.4.1
prereq          --optional hipo/4.3.0
prereq          --optional denoise/4.2.3
prereq          --optional iguana/1.1.0
prereq          --optional clas12root/1.9.0
prereq          --optional mcgen/3.18
prereq          --optional sim
prereq          --optional tmpfs
prereq          --optional apptainer
-------------------------------------------------------------------

Modules

Most modules here just update your environment for a single, particular software package, by adding that package's directories to some runtime search path(s) like $PATH or $LD_LIBRARY_PATH or $PYTHONPATH. The modules below are a bit different:

  • clas12
    • loads a bunch of other modules to provide a full CLAS12 environment in one shot
  • tmpfs
    • gets various software, e.g., apptainer, to use a /tmp alternative, e.g., for when it's mounted noexec
    • Note, coatjava versions prior to 10.1.0 require this on el9 at JLab for SQLite support
  • sim
  • scicomp
  • system
    • sets two convenience variables, used only by these modulefiles
      • OSRELEASE, based on the operating system and this script
      • CLAS12_HOME, the absolute path to this local repository
    • sets PATH, LD_LIBRARY_PATH, and PKG_CONFIG_PATH for some common C++ libraries, e.g.,
  • util
    • both an environment module for clas12-utilities, and a directory containing some scripts used only during environment setup:
    • osrelease.py: just prints a string for OSRELEASE, determined by the operating system and compiler
    • functions.tcl: Tcl support procedures used in many clas12 modulefiles
    • siteconfig.tcl: unused, a modulefile configuration for registering Tcl procedures
    • .generic: tcl script to set $name and $version based on a modulefile's path, and then load its .common
    • env: bash environment file to switch to this clas12 modulefiles and generate symlinks to builds

Directories

The environment modulefiles here use a particular, relative directory structure for the software builds they reference:

└── some "top" directory
    ├── modulefiles (this repository)
    ├── noarch (Java/Python/SQLite)
    ├── almalinux9-gcc11 (C++/Python/JDK)
    ├── fedora36-gcc12 (C++/Python/JDK)
    └── ...

And an example subset of the contents of an "osrelease" subdirectory:

└── almalinux9-gcc11
    ├── bin
    ├── lib
    ├── include
    └── local
        ├── ccdb
        │   └── 1.0
        ├── clas12root
        │   └── 1.8.4
        └── iguana
            ├── 0.6.0
            └── 0.7.0