clearer
 

How to install Geant4 11 in Mac (20230106 updated)

How to install Geant4 11 (20230104 updated)

  • Download package (http://geant4.web.cern.ch/geant4/support/download.shtml) : download tar version
  • Check the version of root : https://root.cern.ch/content/release-60600
    • For ubuntu : download and install “Ubuntu 14 gcc4.8”
    • For SLC7 : download and install “CentOS Cern 7 gcc4.X”
  • Unpack file
  • Install libxmu-dev (to avoid the Xmu problem)
    • sudo apt-get install libxmu-dev libxi-dev libgl1-mesa-dev (ubuntu)
    • sudo yum install libxmu-dev libxi-dev (SL7)
  • Install Qt5 (link
  • Set directory to install : (for example : dir=/home/dmoon/Work/Geant4/)
  • cd /home/dhmoon/Work/Geant4/
  • cp “Unpacked directory” .
  • mkdir geant4.11.01-build geant4.11.01-install
  • cd geant4.11.01-build
  • cmake -DCMAKE_INSTALL_PREFIX=/home/dmoon/Work/Geant4/geant4.11.01-install -DGEANT4_INSTALL_DATA=ON -DGEANT4_INSTALL_DATA_TIMEOUT=3600 -DGEANT4_USE_OPENGL_X11=ON -DGEANT4_USE_RAYTRACER_X11=ON -DGEANT4_BUILD_EXAMPLES=OFF -DGEANT4_USE_SYSTEM_EXPAT=OFF /home/dmoon/Work/Geant4/geant4.11.01
    • cmake version 이 낮으면 다시 설치해 준다 (link)
  • make -j 2
  • make install
  • source /home/dmoon/Work/Geant4/geant4.11.01-build/geant4make.sh (geant4 실행하기 전에 해줘야 함, 귀찮으면 .bashrc 파일에 추가해도 됨)
  • Running example
    • cd /home/dmoon/Work/Geant4/examples/basic/B1
    • mkdir build
    • cd build
    • cmake ..
    • ./exampleB1

How to install Geant4 9.6.p04

  • Install CLHEP package, because this is not default in 9.X.X version of Geant4 (http://besixdouze.net/?p=119)
  • Visit https://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/ and select clhep-2.1.4.2 (or 2.1.3.1)
  • Copy clhep-2.1.4.2.tar.gz in your install directory (e.g : /home/dhmoon/Work/Geant4/)
  • For safe install, better make one more directory “CLHEP”
    • mkdir CLHEP
    • cp ../clhep-2.1.4.2.tar.gz .
    • tar -zxvf clhep-2.1.4.2.tar.gz
    • mkdir clhep-intall clhep-build
    • cd clhep-build
    • cmake -DCMAKE_INSTALL_PREFIX=/home/dhmoon/Work/Geant4/CLHEP/clhep-install /home/dhmoon/Work/Geant4/CLHEP/2.1.4.2/CLHEP
    • make
    • make test
    • make install
  • Download Geant4.9.6.p04
    • tar -zxvf geant4.9.6.p04.tar.gz
    • mkdir geant4.9.6-build geant4.9.6.p04-install
    • cd geant4.9.6-build
    • cmake -DCMAKE_INSTALL_PREFIX=/home/dhmoon/Work/Geant4/geant4.9.6.p04-install -DGEANT4_INSTALL_DATA=ON -DGEANT4_INSTALL_DATA_TIMEOUT=3600 -DGEANT4_USE_OPENGL_X11=ON -DGEANT4_USE_RAYTRACER_X11=ON -DGEANT4_BUILD_EXAMPLES=ON -DGEANT4_USE_SYSTEM_CLHEP=ON -DCLHEP_ROOT_DIR=/hoem/dhmoon/Work/Geant4/CLHEP/clhep-install -DGEANT4_USE_SYSTEM_EXPAT=OFF /home/dhmoon/Work/Geant4/geant4.9.6.p04/
    • make -j 2
    • make install
dhmoon/installg4v10.txt · 마지막 수정: 2023/01/06 05:54 작성자 dhmoon
 
광주광역시 북구 용봉동 전남대학교 자연대 4호관 물리학과 319호 | Tel. +82-62-530-3484
Bld.4-319 Department of Physics, Chonnam National University, 77 Yongbong-ro, Buk-gu, Gwangju 500-757, KOREA
별도로 라이선스를 알리지 않을 경우, 이 위키의 내용은 다음의 라이선스에 따릅니다: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki