1 / 10

Lab setup of software: Geant4

Lab setup of software: Geant4. José A. Ramos Méndez, PhD. University of California San Francisco. 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.

ravenw
Télécharger la présentation

Lab setup of software: Geant4

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. 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 FCFM-BUAP, Puebla, Pue.

  3. geant4.web.cern.ch FCFM-BUAP, Puebla, Pue.

  4. 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 FCFM-BUAP, Puebla, Pue.

  5. 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 FCFM-BUAP, Puebla, Pue.

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

  7. The command line and parallelism FCFM-BUAP, Puebla, Pue.

  8. Running • Let’s start with the example Geant4/basic/B1 • user@user:$ ./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 • helpUICommand - Provide detailed help, navigate it through keyboard • exit - Finalize simulation FCFM-BUAP, Puebla, Pue.

  9. Multithreading • In exampleB1.cc add G4cout << “##### “ << G4Threading::GetNumberOfCores() << “ ####” << G4endl; • rebuild and execute. Then you can set /run/numberOfThreads 4 Or runManger->SetNumberOfThreads( G4Threading::GetNumberOfCores() ); FCFM-BUAP, Puebla, Pue.

  10. 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. FCFM-BUAP, Puebla, Pue.

More Related