Skip to content
Snippets Groups Projects
Commit 175e541f authored by Johannes Schumann's avatar Johannes Schumann
Browse files

First project components including singularity file for GiBUU container

parent a7f7e031
No related branches found
No related tags found
No related merge requests found
#Singularity
*.simg
# GiBUU
*.dat
output/
Makefile 0 → 100644
export REPO_OUTPUT_DIR := output
export REPO_JOBCARDS_DIR := jobcards
export CONTAINER_OUTPUT_DIR := /opt/output
export CONTAINER_JOBCARD_DIR := /opt/jobcards
default: run
build: km3buu.Singularity
sudo singularity build GiBUU.simg km3buu.Singularity
run: GiBUU.simg
@if [ ! -d "jobcards/${CARDSET}" ];then \
exit 1; \
fi;
@if [ -d "${REPO_OUTPUT_DIR}/${CARDSET}" ];then \
echo "Output directory for this cardset already exists; remove and go on [y/n]";\
read REPLY; \
if [ ! $$REPLY = "y" ];then \
exit 2;\
fi;\
fi;
rm -rf ${REPO_OUTPUT_DIR}/${CARDSET};
mkdir -p ${REPO_OUTPUT_DIR}/${CARDSET};
singularity exec -B ${REPO_JOBCARDS_DIR}/${CARDSET}:$$CONTAINER_JOBCARD_DIR\
-B ${REPO_OUTPUT_DIR}/${CARDSET}:$$CONTAINER_OUTPUT_DIR\
GiBUU.simg\
/bin/sh run.sh $$CONTAINER_JOBCARD_DIR $$CONTAINER_OUTPUT_DIR
lyon:
@echo "TO DO"
clean:
@rm -rf output
# KM3BUU
This project contains software and data related to the GiBUU studies done for KM3NeT.
\ No newline at end of file
The KM3BUU project is an integrated environment for the GiBUU studies within the KM3NeT experiment. The execution is mainly based on
## Installation
The project is based on images using `singularity`, for which version 3 or higher (e.g. [v3.4](https://sylabs.io/guides/3.4/user-guide/)) is required. This is done due to the intention to provide a comparable installation on all systems and thus make the results
easily reproducible. The main project control is based on `make`.
In order to apply installation commands presented within this section, clone this repository and change to the project directory:
```
git clone https://git.km3net.de/jschumann/km3buu
cd km3buu
```
### Local Machine
By "Local Machine" a computer where are root (administrative) privileges are available is
meant. These root privileges are required to build the singularity image by yourself. To start the build run following `make` command:
```
make build
```
### Compute Cluster
In order to make this project also usable in a non-root environment, binaries will be provided. Within KM3NeT computing infrastructure this is the case for the lyon compute cluster, thus this case is customised for this environment.
This part is currently under development, so it is time to say: Coming soon ... ;-)
## Structure & Usage
The used GiBUU jobcards are located in a sub-folder within the jobcards folder.
Each sub-folder represents a set of jobcards, which can be processed by:
```
make run CARDSET=examples
```
This command runs all jobcards within the `jobcards/examples` folder and writes the output it to the folder `output`. The folder structure is applied from the `jobcards`folder.
\ No newline at end of file
&neutrino_induced
process_ID = -2 ! 2:CC, 3:NC, -2:antiCC, -3:antiNC
flavor_ID = 2 ! 1:electron, 2:muon, 3:tau
nuXsectionMode = 6 ! 6: dSigmaMC
includeDIS = .true. ! enables DIS events
printAbsorptionXS = T
/
&target
target_Z=1
target_A=1
/
&input
numEnsembles = 1000 ! for H: 100000,
! for O: 6400
! decrease it if there are
! problems with memory or
! for heavier nuclei
eventtype = 5 ! 5=neutrino
! of a given particle
numTimeSteps = 0 ! the distance numTimeSteps*delta_T
! should significantly
! exceed the radius
! of the target nucleus
! for H this must be 0
! numTimeSteps=0 gives inclusive
! X-sections
delta_T = 0.2 ! timestep for hadron propagation
localEnsemble = .true. ! sets fullEnsemble = True
num_runs_SameEnergy = 1 ! increase these if you want to
! increase statistics
! (= number of generated events)
LRF_equals_CALC_frame = .true. ! if .false.:
! no offshelltransport
! possible
path_to_input = '/opt/buuinput2019' ! needs to be
! changed to actual path
/
&nl_SigmaMC
enu = 4.0 !energy of the initial neutrino
/
&neutrinoAnalysis
outputEvents = .true ! output list of events and
! all outgoing particles in
! each event to the file
! FinalEvents.dat
/
&pythia
PARP(91)=0.44
/
Bootstrap: docker
From: debian:stretch
%post
apt-get update -qq
apt-get install -qq -y neovim
apt-get install -qq -y gfortran make libbz2-dev
apt-get install -qq -y wget
cd /opt && \
wget https://gibuu.hepforge.org/downloads?f=buuinput2019.tar.gz && \
tar xvzf downloads?f=buuinput2019.tar.gz && \
wget https://gibuu.hepforge.org/downloads?f=release2019.tar.gz && \
tar xvzf downloads?f=release2019.tar.gz && \
ls -ahl && \
cd release2019 && \
make -j withROOT=0
rm -rf /opt/*.tar.gz
%environment
export CONTAINER_GIBUU_EXEC=/opt/release2019/objects/GiBUU.x
run.sh 0 → 100755
#!/bin/bash
if [ -z "$CONTAINER_GIBUU_EXEC+x" ];
then
echo "No GIBUU executable provided via CONTAINER_GIBUU_EXEC";
exit 1
fi;
if [ $# -eq 0 ];
then
echo "No paths provided!";
exit 1;
elif [ $# -eq 1 ];
then
echo "No output directory within the container given!";
exit 1;
fi;
CONTAINER_JOBCARD_DIR=$1
CONTAINER_OUTPUT_DIR=$2
JOBCARDS=$(find $CONTAINER_JOBCARD_DIR -name "*.job")
cd $CONTAINER_OUTPUT_DIR
for filepath in $JOBCARDS; do
filename=$(basename -- $filepath)
foldername="${filename%.*}"
mkdir $foldername; cd $foldername
$CONTAINER_GIBUU_EXEC < $filepath;
cd ..
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment