Welcome! This repository will help to install ROOT and neutrino Monte Carlo simulation 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). 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
git clone https://github.com/amitpal96/MC_tutorial.git
cd MC_tutorial
Apptainer sandbox can be built in two different ways: Option A and Option B. Option A is more simpler and easier way.
Download genie.sif
from Google Drive and place it inside **MC_tutorial**
directory
apptainer build --sandbox genie_sandbox/ genie.sif
apptainer shell --writable genie_sandbox/
cd /opt/mywork/
source do_end_genie.sh
genie
You should see Version 3.04.00
on your screen
Enter the apptainer shell with
apptainer shell --writable genie_sandbox/
Go to correct path and setup environment
cd /opt/mywork/
source do_end_genie.sh
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.def
apptainer build --sandbox sandbox_container2/ setup_container2.def
This step will take ~2 hours as it builds ROOT from source file.
apptainer shell --writable sandbox_container2
root
This should show Welcome to ROOT 6.30/02
cd /opt/GENIE
chmod +x do_end_genie.sh
./do_end_genie.sh
This 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/libxml2
make -j4
Congratulations! You have finally installed GENIE. If you encounter any error, do once
make clean
make -j4
If it does not resolve, contact [email protected].
Once GENIE is installed properly, you just need to do,
apptainer shell --writable sandbox_container2
cd /opt/GENIE
./do_end_genie.sh
This should set up your GENIE. You are good to go.
gevgen -r 3 -n 100 -p 14 -t 1000010020 -e 1.0 --cross-sections gxspl-NUsmall.xml
This 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
.