Software/Geant4/Installation/CLHEP: Difference between revisions
SimonJolly (talk | contribs) No edit summary |
SimonJolly (talk | contribs) No edit summary |
||
Line 22: | Line 22: | ||
The [http://proj-clhep.web.cern.ch/proj-clhep/ CLHEP website] provides some documentation on building and installing standalone <code>CLHEP</code> libraries at http://proj-clhep.web.cern.ch/proj-clhep/INSTALLATION/clhep-2.0.html . | The [http://proj-clhep.web.cern.ch/proj-clhep/ CLHEP website] provides some documentation on building and installing standalone <code>CLHEP</code> libraries at http://proj-clhep.web.cern.ch/proj-clhep/INSTALLATION/clhep-2.0.html . | ||
<code>Geant4</code> | <code>Geant4.10.2.p01</code> has been tested with <code>CLHEP 2.3.1.1</code>. | ||
<code>CLHEP 2.3.2.2</code> is available but <code>Geant4.10.2.p01</code> would not compile with this version, so the previous version is installed. | |||
For installation, <code>CLHEP</code> does not support installation into a sandbox directory (i.e. there are no options <code>prefix</code> or <code>DESTDIR</code> defined for command <code>make install</code>) and must be given the installation directory with the <code>-prefix</code> option. | |||
As such, to recompile <code>CLHEP</code> for different target directories, the <code>configure</code> script must be rerun with a modified <code>-prefix /path/to/dest</code> option. This has to be managed manually as can be seen in the installation commands below. | |||
For installation, <code> | |||
== Installation == | == Installation == | ||
When downloading software, the downloaded tarball (or other <code>Zip</code> archive) should be placed in an appropriately named directory in <code>/unix/pbt/software/src</code>: the instructions below assume that the directory is <code>/unix/pbt/software/src/ | When downloading software, the downloaded tarball (or other <code>Zip</code> archive) should be placed in an appropriately named directory in <code>/unix/pbt/software/src</code>: the instructions below assume that the directory is <code>/unix/pbt/software/src/clhep</code>. | ||
The source code should then be extracted into a suitable subdirectory in <code>/unix/pbt/software/build</code>. The extracted source code directory can only be deleted once the software has been built and installed | The source code should then be extracted into a suitable subdirectory in <code>/unix/pbt/software/build</code>. The extracted source code directory can only be deleted once the software has been built and installed. | ||
=== Source Code Extraction === | === Source Code Extraction === |
Revision as of 12:02, 1 June 2016
Introduction
CLHEP
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.
Geant4
requires the CLHEP
libraries in order to compile simulations.
By default Geant4
distributes a minimal version of the CLHEP
library sources with the toolkit to help cross-platform usage.
This internal version of the CLHEP library is built and used by default, so having an external install of CLHEP is no longer a prerequisite for Geant4.
However, the BDSIM accelerator simulation toolkit, which uses Geant4 for particle-matter interactions, requires a standalone version of CLHEP
to be compiled separately from Geant4
.
As such, the instructions below relate to the standalone version of CLHEP
.
Details
- Website
- http://proj-clhep.web.cern.ch/proj-clhep/
- Source URL
- http://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/
- Installed version
- 2.3.1.1 (15 Mar 2016)
- Source code
src/geant4-prerequisites/clhep/2.3.1.1
Installation Notes
The CLHEP website provides some documentation on building and installing standalone CLHEP
libraries at http://proj-clhep.web.cern.ch/proj-clhep/INSTALLATION/clhep-2.0.html .
Geant4.10.2.p01
has been tested with CLHEP 2.3.1.1
.
CLHEP 2.3.2.2
is available but Geant4.10.2.p01
would not compile with this version, so the previous version is installed.
For installation, CLHEP
does not support installation into a sandbox directory (i.e. there are no options prefix
or DESTDIR
defined for command make install
) and must be given the installation directory with the -prefix
option.
As such, to recompile CLHEP
for different target directories, the configure
script must be rerun with a modified -prefix /path/to/dest
option. This has to be managed manually as can be seen in the installation commands below.
Installation
When downloading software, the downloaded tarball (or other Zip
archive) should be placed in an appropriately named directory in /unix/pbt/software/src
: the instructions below assume that the directory is /unix/pbt/software/src/clhep
.
The source code should then be extracted into a suitable subdirectory in /unix/pbt/software/build
. The extracted source code directory can only be deleted once the software has been built and installed.
Source Code Extraction
cd /unix/pbt/software/src/geant4-prerequisites/qt tar -xvz -f qtbase-opensource-src-5.6.0.tar.gz mv qtbase-opensource-src-5.6.0 qt-5.6.0
Build And Install
These instructions assume the code has already been built for the Development environment before building for the Production environment, so some of the commands for the Production install are omitted. Although it is highly discouraged to install straight to the Production environment without first compiling a Development version, it is possible to do so by adding in the directory creation commands at the start.
Development Environment
cd /unix/pbt/software/build mkdir -pv qt/qt-5.6.0 cd qt/qt-5.6.0 ../../../src/geant4-prerequisites/qt/qt-5.6.0/configure -prefix /unix/pbt/software/dev/qt-5.6.0 -release -opensource -confirm-licence -nomake tests -nomake examples -optimized-qmake -opengl -qt-xcb make make install
Production Environment
cd /unix/pbt/software/build/qt/qt-5.6.0 ../../../src/geant4-prerequisites/qt/qt-5.6.0/configure -prefix /unix/pbt/software/prod-sl6 -release -opensource -confirm-licence -nomake tests -nomake examples -optimized-qmake -opengl -qt-xcb make make install