Skip to content
Snippets Groups Projects
Commit 9d172dbf authored by JeremyMcCormick's avatar JeremyMcCormick
Browse files

Merge branch 'master' of github.com:slaclab/slic

parents 0181daa2 cdd26541
Branches
Tags
No related merge requests found
# SLIC # SLIC
Simulation for the Linear Collider (SLIC) Geant4 simulation application Simulation for the Linear Collider (SLIC) - Geant4 simulation application
## Installation ## Installation
For now the installation is done manually by first building SLIC's dependencies and then the main package. Step-by-step instructions are given below. SLIC is a C++ application that is built using the standard GCC compiler toolchain and the CMake build generation system.
### Tools ### Required Tools
* gcc 4.8 or greater (prob 4.9 or greater is preferable) * gcc 4.8 or greater (prob 4.9 or greater is preferable)
* You cannot use the default gcc on RHE6 or similarly old distros so you would need to install one yourself or use a dev toolset. * You cannot use the default gcc on RHE6 or similarly old distros so you would need to install one yourself or use a dev toolset.
...@@ -14,20 +14,98 @@ For now the installation is done manually by first building SLIC's dependencies ...@@ -14,20 +14,98 @@ For now the installation is done manually by first building SLIC's dependencies
### Initial Setup ### Initial Setup
There will be a `build` dir where all the packages are built and configured and an `install` dir where they are installed out of source. You will create a build directory where all the required packages are configured and compiled.
This structure can be setup as follows: Create the build directory within your slic project directory:
``` ```
cd /scratch mkdir build
mkdir slic; cd slic
mkdir install; cd install
export install_dir=$PWD
cd ..
mkdir build; cd build
``` ```
### Geant4 All build commands will be executed from within this build directory (*not* from the slic project directory).
### Basic Build Instructions
The SLIC build system is able to download and install all dependencies for the project if they are not found on your system.
Start by executing CMake from the build dir:
```
cd slic/build
cmake ..
```
If no directory arguments are provided that point to locally installed packages, you will see a message stating "Some dependencies were not found." This is not an error, but to complete the build you will need to build these dependencies and then rerun CMake so they are resolved.
To build the dependencies, execute the following:
```
make
```
Once this is done, then you need to rerun `cmake ..` from the build directory. If the dependencies all installed successfully, then the message "All dependencies were found." should print. Now you can just type `make; make install` to complete the build using these installed dependencies.
The default installation directory for SLIC and its dependencies is `~/slic` which you can change by providing an argument `-DGLOBAL_INSTALL_DIR=/my/install/dir` to the CMake command.
### Specifying Dependencies
You may also have one or more of SLIC's dependencies installed locally, which you can use in your build by providing CMake with their root directories.
For instance, to use your own Geant4 installation, the command would be something like the following:
```
cmake -DGeant4_DIR=/path/to/geant4/lib64/Geant4-10.3.1/ ..
```
This table shows the full list of dependency variables accepted by SLIC:
| Dependency | Variable |
| ---------- | ----------- |
| Geant4 | Geant4_DIR |
| Xerces C++ | XERCES_DIR |
| LCIO | LCIO_DIR |
| HepPDT | HEPPDT_DIR |
| GDML | GDML_DIR |
| LCDD | LCDD_DIR |
Instructions for manually installing these dependencies are given below.
## Running SLIC
The build system generates a shell script that will setup the necessary environment for running the application:
```
source /scratch/slic/install/slic/bin/slic-env.sh
```
Now you can run the executable from the command line:
```
slic [options]
```
Print the help menu:
```
slic --help
```
An actual command might look something like:
```
slic -g mygeom.lcdd -i events.stdhep -m commands.mac -r 10
```
Read the help to get an idea of the actual commands that are available.
## Installing Dependencies Manually
This section covers in detail the manual installation of SLIC's dependencies.
These procedures are entirely optional, as running `cmake` without providing paths to pre-installed dependencies will cause them to be installed automatically.
#### Geant4
Download the 10.3.p01 tarball from the Geant4 website and untar it or you may clone a tag from the Geant4 github. Download the 10.3.p01 tarball from the Geant4 website and untar it or you may clone a tag from the Geant4 github.
...@@ -38,7 +116,7 @@ make -j4 ...@@ -38,7 +116,7 @@ make -j4
make install make install
``` ```
### LCIO #### LCIO
``` ```
git clone https://github.com/iLCSoft/LCIO.git lcio git clone https://github.com/iLCSoft/LCIO.git lcio
...@@ -48,7 +126,7 @@ make -j4 ...@@ -48,7 +126,7 @@ make -j4
make install make install
``` ```
## HepPDT #### HepPDT
``` ```
wget http://lcgapp.cern.ch/project/simu/HepPDT/download/HepPDT-3.04.01.tar.gz wget http://lcgapp.cern.ch/project/simu/HepPDT/download/HepPDT-3.04.01.tar.gz
...@@ -58,7 +136,7 @@ cd HepPDT-3.04.01 ...@@ -58,7 +136,7 @@ cd HepPDT-3.04.01
make install make install
``` ```
## Xerces #### Xerces
``` ```
./configure --prefix=/u/ey/jeremym/hps-dev/slic/install/xerces ./configure --prefix=/u/ey/jeremym/hps-dev/slic/install/xerces
...@@ -66,7 +144,7 @@ make ...@@ -66,7 +144,7 @@ make
make install make install
``` ```
### GDML #### GDML
``` ```
git clone https://github.com/slaclab/gdml git clone https://github.com/slaclab/gdml
...@@ -89,10 +167,3 @@ make -j4 install ...@@ -89,10 +167,3 @@ make -j4 install
``` ```
cmake -DINSTALL_DOC=OFF -DCMAKE_INSTALL_PREFIX=$install_dir/slic -DXERCES_DIR=$install_dir/xerces -DLCIO_DIR=$install_dir/lcio/ -DGeant4_DIR=$install_dir/geant4/lib64/Geant4-10.3.1/ -DGDML_DIR=$install_dir/gdml/ -DHEPPDT_DIR=$install_dir/heppdt -DLCDD_DIR=$install_dir/lcdd .. cmake -DINSTALL_DOC=OFF -DCMAKE_INSTALL_PREFIX=$install_dir/slic -DXERCES_DIR=$install_dir/xerces -DLCIO_DIR=$install_dir/lcio/ -DGeant4_DIR=$install_dir/geant4/lib64/Geant4-10.3.1/ -DGDML_DIR=$install_dir/gdml/ -DHEPPDT_DIR=$install_dir/heppdt -DLCDD_DIR=$install_dir/lcdd ..
``` ```
## Running SLIC
```
source /scratch/slic/install/slic/bin/slic-env.sh
slic [options]
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment