Geant4.4.1 / CLHEP1.8 / DAWN-3_85b-1 /

on MacOSX (Japanese page is here)

Note

Precompiled CLHEP and DAWN are available from this page as RPM packages.
In order to install them, you need to install the rpm command beforehand.
Note also that DAWN requires XDarwin, the Darwin port of XFree86 (X11).
(See HEP on X page by Dr. Keisuke Fujii.)

All patches have been tested on my machine but may not work on your platform.
Install them thus at your own risk.

If you have questions, send mail here. Don't ask Geant4 Official developers.

Spec

Machines

Macintosh PowerBookG4 500MHz Memory 512MB
Macintosh G4 dual 800MHz Memory 1GB

OS MacOSX10.1.5 / kernel :
Development
environment
gcc-926.3-1a
XFree86-4.1.0

How to install

  1. Install CLHEP1.8
    The binary and source packages are available from RPM and SRPM, respectively.
    Typing

    % rpm -ivh clhep-1.8.0.0-1a.ppc.rpm

    installs the binary rpm under /usr/local.

  2. Get Geant4.4.1 source files and patches
    The original source tarball is here. In addition, you need the following patch to build Geant4 on MacOSX.
  3. Expand the tarball and apply the patches
    Move the source tarball and the patches to a directory of your convenience, then in that directory, type

    % gnutar -zxvf geant4.4.1.gtar.gz
    % ln -s geant4.4.1 pro
    % mv Geant4.4.1-macsox.patch pro
    % cd pro
    % patch -p1 -s < Geant4.4.1-macosx.patch

    Geant4 requires an environmental variable called G4INSTALL be set to the top directory of the Geant4 package.
    In our case, G4INSTALL will be <your convenient directry>/pro.

  4. Define environmental variables
    Add the following lines to ~/.bashrc.

    ##### Geant4 general setting ####
    export G4SYSTEM=Darwin-g++
    export G4USE_STL=1
    export G4INSTALL=$HOME/work/G4/pro (or your convenient directry)
    export CLHEP_BASE_DIR=/usr/local
    export G4DATA=$G4INSTALL/../share/data
    export G4LEVELGAMMADATA=$G4DATA/PhotonEvaporation

    ###### 2. UI

    ############ 2-1. Selection of (G)UI in installation of libraries
    export G4UI_BUILD_TERMINAL_SESSION=1
    export G4UI_BUILD_GAG_SESSION=1

    ############ 2-2. Selection of (G)UI in compiling executables
    export G4UI_USE_TERMINAL=1
    export G4UI_USE_GAG=1

    ###### 3. Visualization
    export G4VRMLFILE_VIEWER=vrwave

    ############ 3-1. Home directory of Mesa
    export OGLHOME=/usr/X11R6

    ############ 3-2. Selection of visualization drivers
    # in installation of libraries
    export G4VIS_BUILD_DAWNFILE_DRIVER=1
    export G4VIS_BUILD_OPENGLX_DRIVER=1
    export G4VIS_BUILD_VRMLFILE_DRIVER=1

    ############ 3-3. Selection of visualization drivers
    # in compiling executables
    export G4VIS_USE_DAWNFILE=1
    export G4VIS_USE_OPENGLX=1
    export G4VIS_USE_VRMLFILE=1

    ############ Selection of viewer
    export GVRMLFILE_VIEWER=vrwave

    ########### image file directry ##############
    export G4DAWNFILE_DEST_DIR=./images/dawn/
    export G4VRMLFILE_DEST_DIR=./images/vrml/

  5. Build Geant4
    Type

    % source ~/.bashrc
    % cd $G4INSTALL/source
    % export G4OPTIMIZE=0
    % make >& make.log &
    % tail -f make.log

    !!!ATTENTION!!!
    We have experienced some anomalous behavior for some of our application programs linked to Geant4 libraries compiled with optimization ("-O").
    The problem disappeared when the entire Geant4 libraries had been recompiled without any optimization ("-O0").
    We have not yet identified exactly which source files should be compiled without optimization.
    For the moment, therefore, using any nonzero optimization level for Geant4 compilation is not recommended on MacOS X.
    By default, a Geant4 config file sets optimization flag.
    Swich off the optimization by typing
    export G4OPTIMIZE=0
    our putting this line into your ~/.bashrc.


  6. Install data files
    Expand data files under $G4DATA.

    % cd $G4DATA
    % gnutar -zxvf G4NDL0.2.tar.gz
    % ln -s PhotonEvaporation.1.0 PhotonEverporation

  7. Install Dawn-3_85b-1 (if you need)
    The binary and source packages are available from RPM and SRPM, respectively.
    Typing

    % rpm -ivh dawn-3_85b-1.rpm

    installs dawn under /usr/local.

HOME