New Compilation Procedure V6.2

From Wiki OpenGATE
Jump to: navigation, search
!!IMPORTANT!! Before continuing, make sure all required packages are installed. See Package Requirements

Package required

The minimal software distribution should be the following:

CLHEP v2.1.1.0
Geant4 9.5.p01
Gate V6.2

Optionnal packages are required for output management:

ROOT
ECAT
LMF

CLHEP

You can download CLHEP at this address:

http://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION

Download the CLHEP version according the GEANT4 recommendations:

http://geant4.web.cern.ch/geant4/support/ReleaseNotes4.9.5.html

The recommended version for GATE v6.2 is CLHEP v2.1.1.0 To install, unzip and untar the downloaded file:

tar -xzf clhep-2.1.1.0.tgz

Move into the CLHEP directory:

cd 2.1.1.0/CLHEP

Launching the configure command and the make command as follow:

./configure --prefix=$PWD
make -jN (N is the number of processor(s) in your PC)
make install

Finally, update your environment variables file with the following command lines: (this part is summarized in the item 5 of this document)

• bash or zsh:

export PATH=$PATH:/PATH_TO/2.1.1.0/CLHEP/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/PATH_TO/2.1.1.0/CLHEP/lib

• [t]csh:

setenv PATH ${PATH}:/PATH_TO/2.1.1.0/CLHEP/bin
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/PATH_TO/2.1.1.0/CLHEP/lib

ROOT

You can download ROOT at this following address:

http://root.cern.ch/drupal

It is recommended to install directly the ROOT binaries. Users have to compile the ROOT sources only if necessary. Choose the ROOT version according to hardware architecture and uncompressed the downloaded file:

• 64 bits:

tar -xzf root_v5.XX.XX.Linux-slc5_amd64-gcc4.3.tar.gz

• 32 bits:

tar -xzf root_v5.XX.XX.Linux-slc5-gcc4.3.tar.gz

Move the ROOT name directory:

mv root root_v5.XX

Depending on your environment, you need to source ROOT as follow (this final step is summarized in the item 5 of this documentation):

• bash or zsh:

source /PATH_TO/root_v5.XX/bin/thisroot.sh

• [t]csh:

source /PATH_TO/root_v5.XX/bin/thisroot.csh

Geant4

!!!WARNING: From the 9.5 GEANT4 version, the installation procedure is managed by CMAKE!!!

(Note: With Ubuntu Linux distribution, the packages are 'cmake' and 'cmake-curses-gui'. sudo apt-get install cmake cmake-curses-gui)

First download the GEANT sources at this address:

http://geant4.web.cern.ch/geant4/support/download.shtml

To install, unzip and untar the downloaded file:

tar -xzf geant4.9.5.p01.tar.gz

In the same directory, create two directories to build and install GEANT4:

mkdir geant4.9.5.p01-build
mkdir geant4.9.5.p01-install

Move into the GEANT4 build directory:

cd geant4.9.5.p01-build

Launching the ccmake as follow:

ccmake ../geant4.9.5.p01

You will obtain the following screen and you need to configure the different options as it is done in this figure: (QT and OPENGL are optional, depending of what users want to do).

GEANT4_INSTALL_DATA and GEANT4_USE_SYSTEM_CLHEP are mandatory.
Press 'c' to configure and 'g' to generate the compilation environment.

After this step you will automatically back to the prompt terminal and then, you will launch the compilation:

make -jN (N is the number of processor(s) in your PC)
make install

CmakeG4.jpg

Finally, update your environment variables file with the following command lines: (this part is summarized in the item 5 of this document)

• bash or zsh:

source /PATH_TO/geant4.9.5.p01-install/bin/geant4.sh

• [t]csh:

source /PATH_TO/geant4.9.5.p01-install/bin/geant4.csh

For details, read the official GEANT4 installation procedure: http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ch02.html

Gate V6.2

!!!WARNING: From the 6.2 GATE version, the installation procedure is managed by CMAKE!!!

Download the sources at this address:

www.opengatecollaboration.org

Remember that you need to be registered to download GATE. To install, unzip and untar the downloaded file:

tar -xzf gate_v6.2.tar.gz

In the same directory, create two directories to build and install GATE:

mkdir gate.6.2-build
mkdir gate.6.2-install

Move into the GATE build directory:

cd gate.6.2-build

Launching the ccmake command to the gate_v6.2 source directory:

ccmake ../gate_v6.2

CmakeGate.jpg

Warning Information about following environment variables:

GATE_USE_ECAT7     OFF: by default, set to ON if you want to use this library
GATE_USE_LMF       OFF: by default, set to ON if you want to use this library
GATE_USE_OPTICAL   OFF: by default, set to ON if you want to perform simulation for optical imaging applications       

As it was the case for Geant4, press 'c' to configure and 'g' to generate the compilation environment. Finally:

make -jN (N is the number of processor(s) in your PC)
make install

Finally, update your environment variables file with the following command lines: (this part is summarized in the item 5 of this document)

• bash or zsh:

export PATH=$PATH:/PATH_TO/gate.6.2-install/bin

• [t]csh

setenv PATH ${PATH}:$/PATH_TO/gate.6.2-install/bin

Environment configuration and starting GATE

We highly recommended to configure a your_file.bashrc (or .cshrc) file to set up all environment variables which are mandatory to perform a full Gate simulation.

This file should be defined as follow:

• bash or zsh:

source /PATH_TO/root_v5.XX/bin/thisroot.sh
export PATH=$PATH:/PATH_TO/2.1.1.0/CLHEP/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/PATH_TO/2.1.1.0/CLHEP/lib
source /PATH_TO/geant4.9.5.p01-install/bin/geant4.sh
export PATH=$PATH:/PATH_TO/gate.6.2-install/bin

• [t]csh

source /PATH_TO/root_v5.XX/bin/thisroot.csh
setenv PATH ${PATH}:/PATH_TO/2.1.1.0/CLHEP/bin
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/PATH_TO/2.1.1.0/CLHEP/lib
source /PATH_TO/geant4.9.5.p01-install/bin/geant4.csh
setenv PATH ${PATH}:$/PATH_TO/gate.6.2-install/bin

Finally, before to start a GATE session:

source  your_file.bashrc

ECAT7

enter

/opt/simulation/ecat7

copy the right Makefile.<os> to Makefile if Makefile exists this step is not necessary

cp Makefile.unix Makefile

compile

make

this will build the library goto the utils directory copy the right Makefile.<os> to Makefile if Makefile exists this step is not necessary

cp Makefile.unix Makefile

compile do not use make -j4 !!!

make

this will create some ultility programs


After compilation create the following folder: include

mkdir /opt/simulation/ecat7/include

In this folder copy all *.h files

cp *.h /opt/simulation/ecat7/include

check that the file libecat.a is in lib/Linux-g++/ if it isn't copy it there

mkdir lib
mkdir lib/Linux-g++
cp libecat.a lib/Linux-g++/

LMF 3

enter

/opt/simulation/lmf_3_0

configure lmf

./configure

compile do not use make -j4 !!!

make clean
make

If it does not exist, after compilation create the following folder: includes

mkdir /opt/simulation/lmf_3_0/includes

In this folder copy all *.h files, if they aren't in there already

cp *.h /opt/simulation/lmf_3_0/includes

check that the file libLMF.a is in lib/Linux-g++/ if it isn't copy it there

mkdir lib/Linux-g++
cp lib/libLMF.a lib/Linux-g++/

Installation of cluster tools

jobsplitter

go to /opt/simulation/gate6_1/cluster_tools/jobsplitter

cd /opt/simulation/gate6_1/cluster_tools/jobsplitter

make sure Gate pathes are set

source /opt/simulation/gate6_1/env_gate.sh

compile

make

Copy the library to the correct place

cp /opt/simulation/gate6_1/cluster_tools/jobsplitter/tmp/Linux-g++/gjs/libgjs.so /opt/simulation/gate6_1/cluster_tools/jobsplitter/bin/Linux-g++

filemerger

go to /opt/simulation/gate6_1/cluster_tools/filemerger

cd /opt/simulation/gate6_1/cluster_tools/filemerger

make sure Gate pathes are set

source /opt/simulation/gate6_1/env_gate.sh

compile

make