Difference between revisions of "TF GEANT4.10.2"

From New IAC Wiki
Jump to navigation Jump to search
(Created page with "==resources== http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/ http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/ForApplicati…")
 
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
 +
 
==resources==
 
==resources==
  
Line 6: Line 8:
  
  
using wget to get version 4.9.6
+
using wget to get version 4.10.2
  
wget http://geant4.cern.ch/support/source/geant4.9.6.p02.tar.gz
+
wget http://geant4.cern.ch/support/source/geant4.10.02.p02.tar.gz
  
 
==Step -by- Step commands==
 
==Step -by- Step commands==
  
mkdir geant4.9.6.p02
+
mkdir geant4.10.2
  
cd geant4.9.6.p02
+
cd geant4.10.2
  
mv ../geant4.9.6.p02.tar ./
+
using wget to get version 4.10.2
  
tar -xvf geant4.9.6.p02.tar
+
wget http://geant4.cern.ch/support/source/geant4.10.02.p02.tar.gz
  
ls
+
tar -zxvf geant4.10.02.p02.tar.gz
  
geant4.9.6.p02  geant4.9.6.p02.tar
 
  
mkdir geant4.9.6-build
+
mkdir geant4.10.02-build
  
cd geant4.9.6-build
+
cd geant4.10.02-build
  
 
You need data file for the physics interaction processes
 
You need data file for the physics interaction processes
Line 32: Line 33:
 
If the server is up you can tell CMake to download them for you
 
If the server is up you can tell CMake to download them for you
  
cmake -DCMAKE_INSTALL_PREFIX=~/src/GEANT4/geant4.9.6.p02/geant4.9.6-install -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_OPENGL_X11=ON ~/src/GEANT4/geant4.9.6.p02/geant4.9.6.p02
+
cmake -DCMAKE_INSTALL_PREFIX=~/src/GEANT4/geant4.10.2/geant4.10.2-install -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_OPENGL_X11=ON ~/src/GEANT4/geant4.10.2/geant4.10.02.p02
 +
 
 +
 
 +
 
  
 
(the data files will be installed at geant4.9.6.p02-install/share/Geant4.9.6.p02/data)
 
(the data files will be installed at geant4.9.6.p02-install/share/Geant4.9.6.p02/data)
Line 38: Line 42:
 
If the server is down then you need to download, install and set environmental variables by hand
 
If the server is down then you need to download, install and set environmental variables by hand
  
cmake -DCMAKE_INSTALL_PREFIX=~/src/GEANT4/geant4.9.5/geant4.9.6.p02-install -DGEANT4_INSTALL_DATA=OFF -DGEANT4_USE_OPENGL_X11=ON ~/src/GEANT4/geant4.9.6.p02/geant4.9.6.p02
+
cmake -DCMAKE_INSTALL_PREFIX=~/src/GEANT4/geant4.10.2/geant4.10.2-install -DGEANT4_INSTALL_DATA=OFF -DGEANT4_USE_OPENGL_X11=ON ~/src/GEANT4/geant4.10.2/geant4.10.02.p02
  
  
Line 46: Line 50:
  
 
the above creates the subdirectory  
 
the above creates the subdirectory  
~/src/GEANT4/geant4.9.6.p02/geant4.9.6-install
+
~/src/GEANT4/geant10.2/geant4.10.2-install
  
  
Line 55: Line 59:
 
first try to compile example/novice/N01  located in the directory where you untarred everything  (geant4.9.6.p02)
 
first try to compile example/novice/N01  located in the directory where you untarred everything  (geant4.9.6.p02)
  
source geant4.9.6-install/bin/geant4.csh  
+
source geant4.10.2-install/bin/geant4.csh  
  
cd geant4.9.6.p02/examples/novice/N01
+
cd geant4.10.02.p02/examples/novice/N01
  
 
cmake .
 
cmake .
Line 75: Line 79:
 
cd geant4
 
cd geant4
  
cp -r geant4.9.6.p02/examples/novice/N02 ./
+
cp -r geant4.10.02.p02/examples/novice/N02 ./
  
 
cd N02
 
cd N02
Line 91: Line 95:
 
try using XM instead
 
try using XM instead
  
cmake -DCMAKE_INSTALL_PREFIX=~/src/GEANT4/geant4.9.5/geant4.9.5-install -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_XM=ON ~/src/GEANT4/geant4.9.5/geant4.9.5.p01
+
cmake -DCMAKE_INSTALL_PREFIX=~/src/GEANT4/geant4.10.2/geant4.10.02-install -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_XM=ON ~/src/GEANT4/geant4.10.2/geant4.10.02.p02
  
 
opens up the GUI but also has a Bus error.
 
opens up the GUI but also has a Bus error.
Line 126: Line 130:
 
make
 
make
  
 
+
[[Simulations_of_Particle_Interactions_with_Matter#Building_GEANT4.10]]
GUIXM was build and causes crash on MACOS
 

Latest revision as of 18:25, 3 January 2019


resources

http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/

http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/ForApplicationDeveloper/html/ch02s07.html


using wget to get version 4.10.2

wget http://geant4.cern.ch/support/source/geant4.10.02.p02.tar.gz

Step -by- Step commands

mkdir geant4.10.2

cd geant4.10.2

using wget to get version 4.10.2

wget http://geant4.cern.ch/support/source/geant4.10.02.p02.tar.gz

tar -zxvf geant4.10.02.p02.tar.gz


mkdir geant4.10.02-build

cd geant4.10.02-build

You need data file for the physics interaction processes

If the server is up you can tell CMake to download them for you

cmake -DCMAKE_INSTALL_PREFIX=~/src/GEANT4/geant4.10.2/geant4.10.2-install -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_OPENGL_X11=ON ~/src/GEANT4/geant4.10.2/geant4.10.02.p02



(the data files will be installed at geant4.9.6.p02-install/share/Geant4.9.6.p02/data)

If the server is down then you need to download, install and set environmental variables by hand

cmake -DCMAKE_INSTALL_PREFIX=~/src/GEANT4/geant4.10.2/geant4.10.2-install -DGEANT4_INSTALL_DATA=OFF -DGEANT4_USE_OPENGL_X11=ON ~/src/GEANT4/geant4.10.2/geant4.10.02.p02


make -j2 VERBOSE=1

make install

the above creates the subdirectory ~/src/GEANT4/geant10.2/geant4.10.2-install


examples

You can test your installation by compiling and running the example programs

first try to compile example/novice/N01 located in the directory where you untarred everything (geant4.9.6.p02)

source geant4.10.2-install/bin/geant4.csh

cd geant4.10.02.p02/examples/novice/N01

cmake .

make -f Makefile

./exampleN01

exampleN02 will allow you to test that you have installed the visual drivers needed to draw paraticle trajectories

creating a copy of an example

cd

mkdir geant4

cd geant4

cp -r geant4.10.02.p02/examples/novice/N02 ./

cd N02

rm CMakeCache.txt

cmake .

make -f Makefile

problems

1.) bus error on Mac if using -DGEANT4_USE_OPENGL_X11=ON

try using XM instead

cmake -DCMAKE_INSTALL_PREFIX=~/src/GEANT4/geant4.10.2/geant4.10.02-install -DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_XM=ON ~/src/GEANT4/geant4.10.2/geant4.10.02.p02

opens up the GUI but also has a Bus error.

Commands used for version 4.9.5

Download the source code to a subdirectory.

I stored it in /Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5.p01

Then I created a build subdirectory

mkdir /Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5-build

From inside the build directory I execute the cmake command using a switch to download the data files and install visulatization

cmake -DCMAKE_INSTALL_PREFIX=/Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5-install -DGEANT4_USE_OPENGL_X11=ON GEANT4_INSTALL_DATA=ON /Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5.p01

cmake -DCMAKE_INSTALL_PREFIX=/Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5-install -DGEANT4_USE_XM=ON GEANT4_INSTALL_DATA=ON /Users/tforest/src/GEASNT4/geant4.9.5/geant4.9.5.p01


Then I install if teh make was succcessfull

make install


Build example N02

To build an example you need to create a build subdirectory under the subdirectory of teh example source code.


 cmake -DGeant4_DIR=/Users/tforest/src/GEANT4/geant4.9.5/geant4.9.5-install ../

make

Simulations_of_Particle_Interactions_with_Matter#Building_GEANT4.10