Geant4 installation in TOHOKU farm
This is a memo when Geant4.10.03
was installed at "/home/gogami/g4install" on TOHOKU farm8.
Installation
- Download source files from the web site →
http://geant4.cern.ch/
- Create installation directory
$ mkdir /home/gogami/g4install
$ mv geant4.10.03 /home/gogami/g4install
$ mkdir /home/gogami/g4install/geant4.10.03-build
← directory for build
$ mkdir /home/gogami/g4install/geant4.10.03-install
← directory for installation
- Newer versions of "cmake", "gcc", "gmp", "mpfr", "mpc", "expat" were required.
So, they were installed on the home directory.
I have installed cmake-3.5.2, gcc-6.3.0, gmp-6.1.2, mpfr-3.1.5, mpc-1.0.3,
and expat-2.1.0, but other versions might work as well.
Source files for their installations can be easily downloaded from web pages.
Installation example1 (in case of cmake):
$ mkdir /home/gogami/cmake
$ mv cmake-3.5.2 /home/gogami/cmake
$ cd /home/gogami/cmake
$ mkdir cmake-3.5.2-install
$ cd cmake-3.5.2
$ ./configure --prefix=/home/gogami/cmake/cmake-3.5.2-install
$ make
$ make install
Installation example2 (in case of gcc):
$ mkdir /home/gogami/gcc
$ mv gcc-6.3.0 /home/gogami/gcc
$ cd /home/gogami/gcc/
$ mkdir /home/gogami/gcc/gcc-6.3.0-install
$ cd /home/gogami/gcc/gcc-6.3.0
$ ./configure --prefix=/home/gogami/gcc/gcc-6.3.0-install
--with-gmp=/home/gogami/gmp/gmp-6.1.2-install (specified newly installed one)
--with-mpfr=/home/gogami/mpfr/mpfr-3.1.5-install (specified newly installed one)
--with-mpc=/home/gogami/mpc/mpc-1.0.3-install (specified newly installed one)
--disable-libjava (error occured, so disabled java by using this option)
$ make
$ make install
- Set variable environment (csh version) as follows (some of them are necessary):
setenv CC /home/gogami/gcc/gcc-6.3.0-install/bin/gcc
setenv CXX /home/gogami/gcc/gcc-6.3.0-install/bin/g++
setenv PATH ${PATH}:/home/gogami/expat/expat-2.1.0-install/bin
setenv PATH ${PATH}:/home/gogami/cmake/cmake-3.5.2-install/bin
setenv GEANT4_USE_SYSTEM_EXPAT ON
setenv EXPAT_INCLUDE_DIR /home/gogami/expat/expat-2.1.0-install/include
← does not work if expat was automatically found elsewhere.
setenv EXPAT_LIBRARY /home/gogami/expat/expat-2.1.0-install/lib/libexpat.so
← does not work if expat was automatically found elsewhere.
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/home/gogami/gmp/gmp-6.1.2-install/lib
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/home/gogami/mpfr/mpfr-3.1.5-install/lib
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/home/gogami/mpc/mpc-1.0.3-install/lib
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/home/gogami/gcc/gcc-6.3.0-install/lib
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/home/gogami/expat/expat-2.1.0-install/lib
setenv LOCAL_INST_DIR /home/gogami/g4install/
setenv G4SYSTEM Linux-g++
setenv G4INSTALL $LOCAL_INST_DIR/geant4.10.03-install
setenv PATH {$PATH}:$G4INSTALL/bin:$LOCAL_INST_DIR/bin:/home/gogami/geant4/bin/
setenv G4WORKDIR /home/gogami/geant4
setenv G4DATADIR $G4INSTALL/share/Geant4-10.3.0/data
setenv G4LEDATA $G4DATADIR/G4EMLOW6.50
setenv G4LEVELGAMMADATA $G4DATADIR/PhotonEvaporation4.3
setenv G4RADIOACTIVEDATA $G4DATADIR/RadioactiveDecay5.1
setenv NeutronHPCrossSections $G4DATADIR/G4NDL4.5
setenv G4NEUTRONHPDATA $G4DATADIR/G4NDL4.5
setenv G4PIIDATA $G4DATADIR/G4PII1.3
setenv G4ABLADATA $G4DATADIR/G4ABLA3.0
setenv G4NEUTRONXSDATA $G4DATADIR/G4NEUTRONXS1.4
setenv G4REALSURFACEDATA $G4DATADIR/RealSurface1.0
setenv G4ENSDFSTATEDATA $G4DATADIR/G4ENSDFSTATE2.1
setenv G4SAIDXSDATA $G4DATADIR/G4SAIDDATA1.1
alias cmake /home/gogami/cmake/cmake-3.5.2-install/bin/cmake
alias gcc /home/gogami/gcc/gcc-6.3.0-install/bin/gcc
- Geant4 installation:
$ cd /home/gogami/g4install/geant4.10.03-build
$ cmake -DEXPAT_INCLUDE_DIR=/home/gogami/expat/expat-2.1.0-install/include -DEXPAT_LIBRARY=/home/gogami/expat/expat-2.1.0-install/lib/libexpat.so -DCMAKE_INSTALL_PREFIX=/home/gogami/g4install/geant4.10.03-install2 -DGEANT4_USE_GDML=ON -DXERCESC_ROOT_DIR=/home/gogami/xerces/xerces-c-3.2.0-install ../geant4.10.03
$ make -j6
$ make install
- Test
$ cd /home/gogami/g4install/geant4.10.03-install/share/Geant4-10.3.0/examples/extended/electromagnetic
$ mkdir test1
$ cd test1
$ cmake ../TestEm0
$ make
$ ./TestEm0 TestEm0.in
→ It worked !!!! at farm8
Checks of Geant4.10.03 in other farms by testing
"example/extended/electromagnetic/TestEm0"
with cmake (cmake version 3.5.2).
farm ID | compile | execution |
1 | ○ | ○ |
2 | ✕ | - |
3 | - | - |
4 | ✕ | - |
5 | - | - |
6 | - | - |
7 | ○ | ○ |
8 | ○ | ○ |
9 | ○ | ○ |
10 | ○ | ○ |
11 | ○ | ○ |
12 | ○ | ○ |
13 | ○ | ○ |
14 | ○ | ○ |
15 | ○ | ○ |
16 | - | - |
17 | ○ | ○ |
18 | ○ | ○ |
19 | ✕ | - |
21 | ✕ | - |
25 | ✕ | - |
26 | ✕ | - |
30 | ✕ | - |
31 | ✕ | - |
35 | - | - |
37 | - | - |
38 | ○ | ○ |
39 | ○ | ○ |