Skip navigation.
Home

CLHEP (Class Library for High Energy Physics) v2.1.3.1 Linux cluster installation

From their website: "The CLHEP (Class Library for High Energy Physics) project was proposed by Leif Lönnblad at CHEP 92. It is intended to be a set of HEP-specific foundation and utility classes such as random generators, physics vectors, geometry and linear algebra. CLHEP is structured in a set of packages independent of any external package (interdependencies within CLHEP are allowed under certain conditions)."

Installation is quite easy, assuming the presence of environment modules.The choice followed here used autoconf rather than cmake, hence the boostrap.


mkdir -p /usr/local/src/CLHEP
wget http://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/tarFiles/clhep-2.1...
tar xvf clhep-2.1.3.1.tgz
cd 2.1.3.1/CLHEP
module load gcc
cd CLHEP
./bootstrap
./configure --prefix=/usr/local/clhep/2.1.3.1
make
make check
make install
cd /usr/local/Modules/modulefiles/clhep
ln -s .base 2.1.3.1

Create .desc and .version module files in the above directory as usual.

The .base module file has the following form:


#%Module1.0#####################################################################
##
## $name modulefile
##
set ver [lrange [split [ module-info name ] / ] 1 1 ]
set name [lrange [split [ module-info name ] / ] 0 0 ]
set loading [module-info mode load]
set desc [join [read [ open "/usr/local/Modules/modulefiles/$name/.desc" ] ] ]
proc ModulesHelp { } {
puts stderr "\tThis module sets the envinronment for $name v$ver"
}
module-whatis "$desc (v$ver)"
prepend-path --delim " " CPPFLAGS -I/usr/local/$name/$ver/include
prepend-path --delim " " LDFLAGS -L/usr/local/$name/$ver/lib
prepend-path LD_LIBRARY_PATH /usr/local/$name/$ver/lib
prepend-path PATH /usr/local/$name/$ver/bin
setenv CLHEP_BASE_DIR /usr/local/$name/$ver/