GRAS installation script for UbuntuΒΆ

Created for Ubuntu 20.04 LTS

# pre-requisites
sudo apt update
sudo apt upgrade -y
sudo apt-get -y install gcc cmake libxerces-c3.2 libxerces-c-dev qt5-default libxmu-dev freeglut3 freeglut3-dev libexpat1-dev g++
sudo apt-get install libhdf5-cpp-103
# python packages for the test suites
sudo apt-get install python3-pandas python3-nbformat

# Geant4
cd
mkdir -p software/geant4/10.07.p04
cd software/geant4/10.07.p04
wget  https://geant4-data.web.cern.ch/releases/geant4.10.07.p04.tar.gz
tar -zxf geant4.10.07.p04.tar.gz
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/geant4/10.07.p04 -DGEANT4_USE_GDML=ON -DGEANT4_BUILD_MULTITHREADED=ON -DGEANT4_INSTALL_DATA=ON -DGEANT4_INSTALL_DATADIR=/usr/local/geant4/data -DGEANT4_USE_GDML=ON -DGEANT4_USE_OPENGL_X11=ON -DGEANT4_USE_QT=ON -DGEANT4_USE_RAYTRACER_X11=ON ../geant4.10.07.p04
make -j4
sudo make install
source /usr/local/geant4/10.07.p04/bin/geant4.sh

# GRAS
sudo mkdir /usr/local/gras
cd
mkdir -p software/gras/06.00
cd software/gras/06.00

Download the GRAS release tarball from [https://essr.esa.int/project/gras-geant4-radiation-analysis-for-space ESSR]. Please note that a separate registration is necessary for the ESSR system.

Make sure the GRAS tgz source archive downloaded from ESSR is put into the current directory ~/software/gras/06.00.

tar -zxf gras-06-00-r2201.tgz
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DGRAS_INSTALL_PREFIX=/usr/local/gras/06.00 -DSTATIC_BUILD=OFF ../gras-06-00
make -j4
sudo make install
source /usr/local/gras/06.00/bin/gras-env.sh

Running all tests of the tests suite and creating the report, with a comparison to the reference results

# assuming you are still in the 'build' folder
RunGrasTests.sh
create_gras_report.py -r report gras_tests/ ../gras-06-00/tests/ -l 'installed' 'reference'

Initialisation of Geant4, GRAS:

(This initialisation needs to be performed in each new session / terminal, so the commands below can also be copied at the end of the .bashrc init script)

source /usr/local/geant4/10.07.p04/bin/geant4.sh
source /usr/local/gras/06.00/bin/gras-env.sh

GRAS/trunk/r2242