Newer
Older
---
title: "Quick-start Guide"
---
## Prerequisites
The programmer is assumed to be familiar with
- working in the terminal over ssh
- `git` and gitlab (https://eicweb.phy.anl.gov)
- using `cmake`
- C++, python, and shell scripting
This tutorial requires that [singularity](singularity) is installed
Marshall Scott
committed
Singularity can be downloaded by going to
https://sylabs.io/guides/3.7/user-guide/quick_start.html , with 3.7 being the
most recent version as of January 2021.
### Create a local directory that you want to work in, e.g., `~/eic`
```bash
mkdir ~/eic
cd ~/eic
```
### Step 2: Deploy the containerized environment and launc a shell
Execute the following line in your tgerminal to setup your environment in your sandbox
directory. This will install the latest stable container and place a script called
`eic-shell` in the top-level directory. This script will load the environment for you.
```bash
curl https://eicweb.phy.anl.gov/containers/eic_container/-/raw/master/install.sh | bash
```
Marshall Scott
committed
To properly emulate the EIC enviornmant a container containing necessary
software is needed.
Installing the [eic_container](quickstart/eic_container) is done with the
following:
```shell
git clone https://eicweb.phy.anl.gov/containers/eic_container.git
```
Marshall Scott
committed
From here follow the instructions in the README file. Those will faithfully
install the container, and then follow the instructions below.
Inspect the list of files installed, noting the locations of modulefiles and
wrapper scripts.
## Using the container
```bash
module use $HOME/etc/modulefiles
[See modulefiles](modulefiles) for more info.
[Also see environment](environment) for more info.
## Development within singularity container
[See here](singularity) for more info on singularity.
The following helper runs bash inside `eic_container`
```bash
module load eic_container
container_dev
```
For projects that you want to build but which are also inside of the container,
you must make sure to set `$PATH` and `$LD_LIBRARY_PATH` to point to the
development build's installation prefix first. Here we assume your development
builds are being installed into `$HOME/stow/development`
A simple setup script will make sure things are in order
```shell title=setup.sh
module use $HOME/etc/modulefiles
export PATH=$HOME/stow/development/bin:$PATH
export LD_LIBRARY_PATH=$HOME/stow/development/lib:$HOME/stow/development/lib64:$LD_LIBRARY_PATH
export ROOT_INCLUDE_PATH=$HOME/stow/development/include:$ROOT_INCLUDE_PATH
## Detector Library
The
```bash
source setup.sh
module load eic_container
git clone https://eicweb.phy.anl.gov/EIC/NPDet.git
cd NPDet/examples
print_materials gem_tracker_disc.xml 0 0 0 100 0 100
```
The last line dumps the materials encounter along a line defined by two points.
```bash
mkdir NPDet/build && cd NPDet/build
cmake ../. -DCMAKE_INSTALL_PREFIX=$HOME/stow/development
make -j4 install
cd ../examples
print_materials gem_tracker_disc.xml 0 0 0 100 0 100
```