Warning, /eic.github.io/_software/escalate.md is written in an unsupported language. File is not indexed.
0001 ---
0002 title: ESCalate
0003 name: escalate_1
0004 category: escalate
0005 layout: default
0006 toc: true
0007 ---
0008
0009 {% include layouts/title.md %}
0010
0011
0012 #### Table of contents
0013
0014 - [About]()
0015 - Fast HowTos:
0016 - [Run ESCalate]()
0017 - [Run fast simulations]()
0018 - [Run full simulations]()
0019 - Detailed instructions:
0020 - [Running in docker]()
0021 - [Spack CVMFS central installation](#spack-cvmfs-central-installation)
0022 - [eic-image at jupyterhub.jlab.org]()
0023 - [Examples, tutorials and workspace]()
0024 - [Remote work suggestions]()
0025
0026
0027 # ESCalate framework
0028
0029
0030 <img src="https://assets.gitlab-static.net/uploads/-/system/project/avatar/13083/logo-extra-whitespace.png" width="" style="float:left; width:20pt; padding: 3px;"/> [https://gitlab.com/eic/escalate](https://gitlab.com/eic/escalate)
0031 <div style="clear: left;"></div>
0032
0033 > **ESC** - stands for **E**IC **S**oftware and **C**omputing group.
0034 **ESC**alate combines together the software being develop by the group such as:
0035
0036 1. [Eic Smear](https://gitlab.com/eic/eic-smear.git) - fast simulation and rapid prototyping
0037 2. [G4E](https://gitlab.com/eic/escalate/g4e.git) - a lightweight pure Geant4 full simulation of EIC detectors and beamlines
0038 3. [Jana2](https://github.com/JeffersonLab/JANA2) - multi-threaded modular High Energy and Nuclear Physics event reconstruction framework
0039 4. [eJana](https://gitlab.com/eic/escalate/ejana.git) - a layer around Jana2, that provides EIC related abstractions and leverages reconstruction and analysis tools such as ACTS and Genfit for tracking, Cern ROOT, HepMC and others.
0040 6. A bunch of other tools, tutorials and examples (
0041 [delphes](),
0042 [fastjet](),
0043 [pyjano](https://gitlab.com/eic/escalate/pyjano.git), [example plugins](https://gitlab.com/eic/escalate/plugins), [workspace](https://gitlab.com/eic/escalate/workspace)), validation data, etc.
0044
0045
0046
0047 [](https://gitpod.io/#https://gitlab.com/eic/escalate/workspace)
0048
0049 <br>
0050
0051 ## About ESCalate
0052
0053 The framework provides modularity in both ways:
0054 - package modularity: each package inside the framework can be used solely and separately from the rest of the framework
0055 - subprocess modularity: jana (and ejana) modularize code in small libraries called plugins allowing to run tasks in a seamless multithreaded way.
0056
0057 The Escalate itself ensures that data between packages is consistent and output of one package can be correctly read from another. It also provide python configuration to make it easy to organize a workflows between packages. Tools to install, maintain and deploy the subpackages
0058
0059
0060 <br>
0061
0062 ## Run Escalate
0063
0064 Try tutorials without installation on [](https://mybinder.org/v2/gl/eic%2Fescalate%2Fworkspace/master)
0065
0066 1. [Run using docker on your local machine](#running-in-docker),
0067
0068 2. [Using singularity (at labs or locally)](https://gitlab.com/eic/escalate/smear/-/blob/master/simple_instruction_singularity.md)
0069
0070 3. [Run directly on Farms](https://gitlab.com/eic/escalate/smear/-/blob/master/simple_instruction_ifarm.md)
0071
0072 4. [your browser in JLab jupyterlab]() *(BNL jupyterhub is coming)*
0073
0074 ### Fast simulations with simple command line
0075
0076 <img src="https://gitlab.com/eic/escalate/smear/-/raw/master/logo.png" width="150" style="float:left; padding: 10px 20px 10px 20px;"/>
0077
0078 **Fast simulations made simple**. It is easy to smear any EIC MCEG supported file with a single console command:
0079
0080 ```bash
0081 smear my_mc_file.txt
0082 ```
0083 See the [documentation](https://gitlab.com/eic/escalate/smear/) for how to easily select a detector, its versions, and various other options
0084
0085 <div style="clear: left;"></div>
0086
0087 <br>
0088
0089 ## Running in docker
0090 *Instructions of how to install docker on Linux, Mac or Windonws and much more documentation on running ESCalate on docker [can be found on this page](https://gitlab.com/eic/containers/-/blob/master/README.rst)*
0091
0092 Running docker (JupyterLab):
0093
0094 ```bash
0095 docker run -it --rm -p8888:8888 electronioncollider/escalate:v1.1.0
0096 ```
0097
0098 After the docker runs, you can open JupyterLab environment in native web browser.
0099 ```sh
0100 http://127.0.0.1:8888/
0101 ```
0102
0103 You can bind any directory on your system to docker image by using **-v** flag:
0104
0105 ```
0106 -v <your/directory>:<docker/directory>
0107 ```
0108
0109 Convenient place inside docker image is
0110
0111 ```
0112 /home/eicuser/workspace/share
0113 ```
0114
0115
0116 **(!) Important to know (!)** Each time `docker run` command is called, it spawns a new "container". A writeable layer where all modifications are saved is created for the
0117 image, and then docker starts the container using the specified command.
0118 **A stopped container can be restarted** with all its previous changes intact using `docker start`
0119
0120 Please, read extended docker instructions on [docker.com](https://docs.docker.com/engine/reference/commandline/start/)
0121
0122
0123 Troubleshooting and advanced used of docker [can be found on this page](https://gitlab.com/eic/containers/-/blob/master/README.rst)
0124
0125
0126
0127 <br>
0128
0129 ## Spack CVMFS central installation
0130
0131 ESCalate framework is installed on CVMFS and can be used directly on farms with spack
0132
0133
0134 **1. Source spack environemnt**
0135
0136 Tcsh/csh users (default for ifarm)
0137
0138 ```
0139 source /cvmfs/eic.opensciencegrid.org/packages/setup-env.csh
0140 ```
0141
0142 bash/zsh
0143
0144 ```
0145 source /cvmfs/eic.opensciencegrid.org/packages/setup-env.sh
0146 ```
0147
0148
0149 **2. Load escalate module**
0150
0151 ```
0152 spack load escalate@1.1.0
0153 ```
0154
0155 It should be ready to work
0156
0157 **3. Test run**
0158
0159 ```
0160 which g4e
0161 ejana
0162 ```
0163
0164
0165
0166 <br>
0167
0168
0169
0170 ## eic-image at jupyterhub.jlab.org
0171
0172 Escalate framework image added to Jefferson Lab Jupyter Hub! It is still
0173 in beta stage, several features are not yet working (and we are working on them). Someting works differently compared to when you run the image in docker. This page describe this.
0174
0175
0176 Go to {% include navigation/findlink.md name='jupyterhub.jlab.org' %} (follow authentication instructions if you are using it for the first time).
0177
0178
0179 In the **Spawner options** -> **Select a notebook image**,
0180 set **eic-notebook (dev)** there
0181
0182 <img src="https://gitlab.com/eic/escalate/workspace/-/raw/master/img/jlab_jupyterhub_spawner.jpg" style="width:400pt">
0183
0184
0185 You should end up in your jefferson lab home directory.
0186
0187
0188 <br>
0189
0190 ### Differences with running in docker
0191
0192 When you run in docker you start as *eicuser* with user-ID=1000. On JupyterHUB you run in your JLab home directory with your CUE user (and your CUE user-ID). This implies that:
0193
0194 1. Your JLab home dir .bashrc is being called instead of one in docker. If you set custom python version or compiler in your .bashrc it will interfere with what is used in docker (will not work most of the time).
0195
0196 2. Since you start in your CUE home dir, you don't have the examples and tutorials. Just clone them to your JLab home dir:
0197 ```bash
0198 git lfs clone https://gitlab.com/eic/escalate/workspace.git # 'lfs' is to pull data files!
0199 ```
0200
0201 3. All docker contents are readonly. One can't run ```sudo``` to elevate privilegies and change something in the container. Which means that you can't change eJana or G4E inside the docker, but you can install them in your home directory and [setup ejpm to use them](https://gitlab.com/eic/escalate/ejpm).
0202
0203
0204 ### What features are not available
0205
0206 1. Inspecting root files by ckicking on them. Solution - use uproot to explore the files.
0207
0208 Please, share on slack if you have any further problems
0209
0210
0211 <br>
0212
0213 ## Examples, tutorials and workspace
0214
0215 When you run Docker on your machine or in cloud (such as Binder) the image is started with examples directory usually located at
0216
0217 ```
0218 /home/eicuser/workspace
0219 ```
0220
0221 **Workspace** - is [a git repository](https://gitlab.com/eic/escalate/workspace) with collaborative workspace for EIC. It contains simulations including documentation, examples, and tutorials on how to get started with ESCalate framework.
0222
0223 When you start on farms, Singularity or Jupyterhub, it starts inside
0224 your home directory and you may download (git clone) examples:
0225
0226 ```
0227 git clone https://gitlab.com/eic/escalate/workspace
0228 ```
0229
0230
0231 <br>
0232
0233 ### Test run
0234
0235 Here are simple snippets with which you can test escalate working
0236
0237 Simpe API to smear a file
0238
0239 ```
0240 smear /path/to/file.txt
0241
0242 ```
0243
0244 Here are 2 more advanced examples files for fast and full simulation. Please run them in your work directory.
0245
0246 Fast simulation (eic-smear):
0247
0248 ```python
0249 from pyjano.jana import Jana
0250
0251 Jana().plugin('beagle_reader')\
0252 .plugin('open_charm')\
0253 .plugin('eic_smear', detector='jleic')\
0254 .plugin('jana', nevents=20000, output='hepmc_sm.root')\
0255 .source('/group/eic/mc/BEAGLE/eD_5x50_Q2_1_10_y_0.01_0.95_tau_7_noquench_kt=ptfrag=0.32_Shd1_ShdFac=1.32_Jpsidifflept_test40k_fixpf_crang.txt')\
0256 .run()
0257 ```
0258
0259 Full simulation:
0260
0261 ```python
0262 from g4epy import Geant4Eic
0263 g4e = Geant4Eic()\
0264 .source('/group/eic/mc/BEAGLE/eD_5x50_Q2_1_10_y_0.01_0.95_tau_7_noquench_kt=ptfrag=0.32_Shd1_ShdFac=1.32_Jpsidifflept_test40k_fixpf_crang.txt')\
0265 .output('hello')\
0266 .beam_on(200)\
0267 .run()
0268 ```
0269
0270 Look at the docker or [tutorials repo](https://gitlab.com/eic/escalate/workspace) for more examples
0271
0272
0273
0274
0275