Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lab setup of software: Geant4

Similar presentations


Presentation on theme: "Lab setup of software: Geant4"— Presentation transcript:

2 Lab setup of software: Geant4
José A. Ramos Méndez, PhD. University of California San Francisco

3 Requirements The requirements vary from one OS system to others. But essentially one needs (either main package and developer libraries): C++ and GLIBC CMAKE OpenGL X11 libraries EXPAT Debian-based apt-get install expat-dev RedHat-based yum install expat-devel OSX port install expat 4/26/2017 FCFM-BUAP, Puebla, Pue.

4 geant4.web.cern.ch 4/26/2017 FCFM-BUAP, Puebla, Pue.

5 Installation Create a directory named Geant4 in your home directory.
Uncompress Geant4 and the DATA files downloaded from the webpage Create the directories: Geant4/geant4-build and Geant4/geant4-install Inside Geant4/geant4-build do the follow: cmake ../geant4.xxx.xxx -DGEANT4_BUILD_MULTITHREADED=ON -DGEANT4_USE_OPENGL_X11=ON -DGEANT4_USE_RAYTRACER_X11=ON -DEXPAT_LIBRARY=/usr/lib/libexpat.so -DGEANT4_INSTALL_DATA=OFF -DCMAKE_INSTALL_PREFIX=../geant4-install Then: make -jN where N is the number of CPUs in your PC Finally make install 4/26/2017 FCFM-BUAP, Puebla, Pue.

6 Installation Setup the environment variables:
For example if your Geant4 is at your $HOME/Geant4, then export GEANT4=$HOME/Geant4 export Geant4_DIR=$GEANT4/geant4-install export G4LEDATA=$GEANT4/G4EMLOW6.41 export G4NEUTRONHPDATA=$GEANT4/G4NDL4.5 export G4SAIDXSDATA=$GEANT4/G4SAIDDATA1.1 export G4NEUTRONXSDATA=$GEANT4/G4NEUTRONXS1.4 export G4LEVELGAMMADATA=$GEANT4/PhotonEvaporation3.1 export G4RADIOACTIVEDATA=$GEANT4/RadioactiveDecay4.2 Add those lines to ~/.bashrc; ~/.bash_profile 4/26/2017 FCFM-BUAP, Puebla, Pue.

7 Running user@user$ cd $GEANT4/geant4.xxx.xxx
cd examples/basic/B1 mkdir build cd build cmake ../ make -jN ./exampleB1 run1.mac ./exampleB1 4/26/2017 FCFM-BUAP, Puebla, Pue.

8 The command line and parallelism
4/26/2017 FCFM-BUAP, Puebla, Pue.

9 Running Let’s start with the example Geant4/basic/B1
./exampleB1 Idle> /run/beamOn 10 Like-Unix commands. Do not use in a macro. cd, pwd - jump to a command directory and shows the path, respectively ls - all available commands history - used commands ?UICommand - shows the parameter of command UICommand help UICommand - Provide detailed help, navigate it through keyboard exit - Finalize simulation 4/26/2017 FCFM-BUAP, Puebla, Pue.

10 Multithreading In exampleB1.cc add
G4cout << “##### “ << G4Threading::GetNumberOfCores() << “ ####” << G4endl; rebuild and execute. Then you can set /run/numberOfThreads 4 Or runManger->SetNumberOfThreads( G4Threading::GetNumberOfCores() ); Modify run1.mac. Set verbosity to 0. 4/26/2017 FCFM-BUAP, Puebla, Pue.

11 Cluster Let’s play with the random generation seed. In exampleB1.cc
G4int myseed = G4UIcommand::ConvertToInt(argv[2]); G4Random::setTheSeed(mySeed); Rebuild and execute for different seeds ./exampleB1 run1.mac 2324 Everyone pick a ID number, we will use in each simulation. Assign a seed number to each attendee. Let’s create our cluster. 4/26/2017 FCFM-BUAP, Puebla, Pue.


Download ppt "Lab setup of software: Geant4"

Similar presentations


Ads by Google