hepsim:dev_singularity
Differences
This shows you the differences between two versions of the page.
— | hepsim:dev_singularity [2024/07/01 21:25] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== HepSim Docker image ====== | ||
+ | {{indexmenu_n> | ||
+ | [[: | ||
+ | |||
+ | HepSim software is deployed using a [[http:// | ||
+ | The container runs using the Singularity program (version 2.3.1 and above) and Docker. | ||
+ | |||
+ | Download the singularity image file from here: | ||
+ | [[http:// | ||
+ | HepSim software environment can be setup from this image as: | ||
+ | |||
+ | <code bash> | ||
+ | wget http:// | ||
+ | singularity | ||
+ | </ | ||
+ | After the last line, the HepSim environment software should be ready. The software will be located in the directory given by the environmental variable HEPSIM (/ | ||
+ | For example, type "slic -h". It shows the available commands for Geant4 full simulations. | ||
+ | |||
+ | If you are using Docker, you can pull the docker image as | ||
+ | |||
+ | <code bash> | ||
+ | docker pull chekanov/ | ||
+ | </ | ||
+ | |||
+ | <note important> | ||
+ | |||
+ | The HepSim image is based on a minimalistic version | ||
+ | |||
+ | * basic editors, vi, vim, gvim, nano, pico | ||
+ | * X11 development libraries | ||
+ | * gcc4.92, boost, python3.5, clhep and other libraries taken from OpenScienceGrid | ||
+ | * [[hepsim: | ||
+ | * Jas4pp analysis environment and all hs-tools commands | ||
+ | * C++ ProMC package | ||
+ | * ROOT analysis environment (check ROOTSYS variable) | ||
+ | * Pythia8 with pre-built ProMC output (check PYTHIA8 and PROMC variables) | ||
+ | * Delphes 3.4 fast simulation of detector response | ||
+ | * Fastjet 3.3 package (check FASTJET variable) | ||
+ | * HEPMC package (check HEPMC variable) | ||
+ | * LHAPDF PDF library with a few PDF sets (check "ls $LHAPDF6/ | ||
+ | * promc2lcio and promc2stdhep converters | ||
+ | |||
+ | |||
+ | |||
+ | Note that we do not use the native gcc 4.85 from CentOS7 to make this | ||
+ | container compatible with OSG. Type " | ||
+ | <code bash> | ||
+ | singularity exec centos7hepsim.img ls / | ||
+ | </ | ||
+ | |||
+ | <hidden Click here to show the result of the above command> | ||
+ | < | ||
+ | delphes | ||
+ | delphes-3.4.1 | ||
+ | fastjet | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Section [[hepsim: | ||
+ | |||
+ | |||
+ | ====== Setting up Jas4pp ====== | ||
+ | |||
+ | One can setup a recent Jas4pp (with hs-tools) as | ||
+ | <code bash> | ||
+ | singularity exec centos7hepsim.img | ||
+ | source / | ||
+ | </ | ||
+ | |||
+ | and then type " | ||
+ | All other HepSim commands, such as " | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ====== HepSim tests ====== | ||
+ | |||
+ | To setup simulation and reconstruction software from HepSim, you can use this commend: | ||
+ | |||
+ | <code bash> | ||
+ | singularity exec centos7hepsim.img | ||
+ | source / | ||
+ | </ | ||
+ | |||
+ | |||
+ | The docker container has a few basic tests that checks that everything works as expected. | ||
+ | These are: | ||
+ | |||
+ | * Creating Pythia8 events with ProMC and ROOT output | ||
+ | * Creating Delphes fast simulations using external ProMC file | ||
+ | * Creating LCIO files with full simulation using FPadSim | ||
+ | |||
+ | Since many libraries are set from the container, make sure that ROOT is not installed | ||
+ | on the host computer. Type "type root" to check the installation. This command should show an empty line. | ||
+ | |||
+ | Here is the description with how to make HepSim tests. First, run these lines that setup the HepSim environment and copy the " | ||
+ | |||
+ | <code bash> | ||
+ | singularity exec centos7hepsim.img | ||
+ | cp -rf / | ||
+ | </ | ||
+ | |||
+ | Here is the example of tests: | ||
+ | |||
+ | ===== Running Pythia8 ===== | ||
+ | |||
+ | Pythia8 inside the Docker image is located in the directory / | ||
+ | Let's create ProMC files using the Pythia8 generator: | ||
+ | <code bash> | ||
+ | cd tests/ | ||
+ | ./TEST.sh | ||
+ | </ | ||
+ | This code compiles a Pythia8 program with ProMC output. | ||
+ | You will see several ProMC files inside the directory " | ||
+ | |||
+ | |||
+ | ===== Fast simulation ===== | ||
+ | |||
+ | Now let us make ROOT files with Delphes fast simulations. This example | ||
+ | downloads a ProMC file and creates ROOT file: | ||
+ | |||
+ | <code bash> | ||
+ | cd tests/ | ||
+ | ./TEST.sh | ||
+ | </ | ||
+ | |||
+ | To reproduce HepSim fast simulations, | ||
+ | Read more about this in Section [[hepsim: | ||
+ | |||
+ | ===== Full simulations ===== | ||
+ | |||
+ | Now let us make LCIO file with full (Geant4) simulation using included | ||
+ | single-particle gun and FPadSim software that includes the full chain ProMC-Slic-LCSIM-PandoraPFA" | ||
+ | |||
+ | |||
+ | <code bash> | ||
+ | cd tests/ | ||
+ | ./TEST.sh | ||
+ | </ | ||
+ | |||
+ | This example uses the input file " | ||
+ | The final file is output/ | ||
+ | |||
+ | If you make modifications inside " | ||
+ | To do this, run | ||
+ | |||
+ | <code bash> | ||
+ | cd tests/ | ||
+ | ./ | ||
+ | </ | ||
+ | |||
+ | |||
+ | More about the full simulations can be found in Sect. [[hepsim: | ||
+ | Read more about this in Section [[hepsim: | ||
+ | |||
+ | |||
+ | ====== Working with the container ====== | ||
+ | |||
+ | The singularity [[http:// | ||
+ | is created using CentOS7 using singularity version 2.3.1. | ||
+ | |||
+ | <code bash> | ||
+ | sudo singularity shell --contain --writable centos7hepsim.img | ||
+ | </ | ||
+ | |||
+ | and check the directory "/ | ||
+ | software environment. | ||
+ | |||
+ | Here are a few useful commands to work with this image: | ||
+ | |||
+ | <code bash> | ||
+ | sudo singularity shell --contain --writable centos7hepsim.img # open to make changes | ||
+ | singularity expand centos7hepsim.img | ||
+ | singularity copy | ||
+ | </ | ||
+ | |||
+ | You can make the changes in this containers to fit your needs. | ||
+ | |||
+ | |||
+ | |||
+ | ====== Docker image on OSG grid ====== | ||
+ | |||
+ | You can setup the HepSim environment on OSG-grid | ||
+ | <code bash> | ||
+ | singularity | ||
+ | </ | ||
+ | |||
+ | Here is the description how to use singularity with condor jobs on OSG | ||
+ | [[https:// | ||
+ | |||
+ | ====== Fortran generators ====== | ||
+ | The previous CentOS7 image is incompatible with older f77-based Monte Carlo generators. | ||
+ | You can run Fortran Monte Carlo programs (LEPTO, LEPTO/ | ||
+ | This image is based on Scientific-Linux 6.8 with the native gcc4.4 with f77 compatibility libraries. The image includes | ||
+ | CERNLIB, LHAPDF5.8, HEPMC, CLHEP and other older libraries. | ||
+ | All Monte Carlo models are interfaced with ProMC IO for compact output of events. | ||
+ | |||
+ | <code bash> | ||
+ | wget http:// | ||
+ | singularity exec slc6hepsim.img | ||
+ | </ | ||
+ | |||
+ | Or, if you use Docker: | ||
+ | <code bash> | ||
+ | docker pull chekanov/ | ||
+ | </ | ||
+ | |||
+ | |||
+ | Monte Carlo generators are located inside the directory / | ||
+ | The same script setups the required packaged from / | ||
+ | ====== Light version of image ====== | ||
+ | |||
+ | |||
+ | David Blyth created a lighter version of FPadSim image for EIC work described in Sec. [[fcs: | ||
+ | |||
+ | --- // |