Welcome! This repository will help to install ROOT and neutrino Monte Carlo simulation (GENIE) software inside an independent Apptainer:
- Installed Apptainer in your system
- Approx 10 GB free space
- I would highly recommend to follow official apptainer installtion instructions at Installing Apptainer. However some basic commands are given below. If you already have apptainer installed, skip this section.
- In Ubuntu
sudo apt update sudo apt install -y software-properties-common
sudo add-apt-repository -y ppa:apptainer/ppa sudo apt update sudo apt install -y apptainer
- In Fedora
sudo dnf install -y apptainer
- In AlmaLinux/CentOS
sudo dnf install -y epel-release sudo dnf install -y apptainer
- In Mac/Windows, install apptainer via virtual machine (VM) or WSL2 (for Windows). For Mac follow: Installation in Mac, for Windows follow: Installtion in Windows
- To check installtion, run
It should show your apptainer version. For me it wasapptainer --version
apptainer version 1.4.2
Apptainer sandbox can be built in two different ways: Option A and Option B. Option A is more simpler and easier way.
Create a directory IIFC_GENIE and download genie.sif from Google Drive and put it inside IIFC_GENIE directory
apptainer build --sandbox genie_sandbox/ genie.sifapptainer shell --writable genie_sandbox/cd /opt/mywork/
source do_end_genie.shgenieYou should see Version 3.04.00 on your screen
git clone https://github.com/amitpal96/MC_tutorial.git
cd MC_tutorialEnter the apptainer shell with
apptainer shell --writable genie_sandbox/Click here to view Option B steps
This is more complicated and time taking process. I would recommend to go with Option A
Download tarballs of all required package from:
Google Drive and place all of them inside **MC_tutorial** directory
Use the provided setup_container1.def file to build a sandbox environment called sandbox_container1:
apptainer build --sandbox sandbox_container1/ setup_container1.defapptainer build --sandbox sandbox_container2/ setup_container2.defThis step will take ~2 hours as it builds ROOT from source file.
apptainer shell --writable sandbox_container2rootThis should show Welcome to ROOT 6.30/02
cd /opt/GENIE
chmod +x do_end_genie.sh
./do_end_genie.shThis will setup environment for GENIE.
./configure --prefix=/opt/GENIE_build --enable-atmo --enable-lhapdf6 --with-lhapdf6-lib=/opt/lhapdf_install/lib --with-lhapdf6-inc=/opt/lhapdf_install/include --with-log4cpp-inc=/opt/log4cpp_install/include --with-log4cpp-lib=/opt/log4cpp_install/lib --with-pythia6-lib=/opt/pythia/v6_428/lib --with-pythia6-inc=/opt/pythia/v6_428/inc --with-libxml2-lib=/opt/libxml2_install/lib with-libxml2-inc=/opt/libxml2_install/include/libxml2make -j4Congratulations! You have finally installed GENIE. If you encounter any error, do once
make clean
make -j4If it does not resolve, contact amit.pal@niser.ac.in.
Once GENIE is installed properly, you just need to do,
apptainer shell --writable sandbox_container2cd /opt/GENIE
./do_end_genie.shThis should set up your GENIE. You are good to go.
cd /opt/mywork/
gevgen -r 3 -n 100 -p 14 -t 1000010020 -e 1.0 --cross-sections gxspl-NUsmall.xmlThis will create 100 neutrino events. If you do ls, you can see two new files have been created: genie-mcjob-3.status and gntp.3.ghep.root.