1 | $Id: 00README,v 1.12 2009/11/20 03:36:51 kmura Exp $ |
---|
2 | ========================================================================== |
---|
3 | Geant4Py |
---|
4 | |
---|
5 | Geant4Py is a set of python modules for using Geant4. |
---|
6 | |
---|
7 | ========================================================================== |
---|
8 | |
---|
9 | URL |
---|
10 | --- |
---|
11 | http://www-geant4.kek.jp/projects/Geant4Py/ |
---|
12 | |
---|
13 | |
---|
14 | System Requirements: |
---|
15 | ------------------- |
---|
16 | Python |
---|
17 | - only 2.x is tested. |
---|
18 | |
---|
19 | Geant4 |
---|
20 | - 8.0 or later |
---|
21 | - should be built in "GLOBAL" and "SHARED" libraries. |
---|
22 | - All header files should be collected into $(G4INSTALL)/include |
---|
23 | by "make includes" |
---|
24 | |
---|
25 | CLHEP |
---|
26 | - 1.9.1.1 or later |
---|
27 | - should be built in shared library. |
---|
28 | - Building shared objects is supported since version 1.9. |
---|
29 | |
---|
30 | (Optional) |
---|
31 | ROOT |
---|
32 | |
---|
33 | Before Starting: |
---|
34 | ---------------- |
---|
35 | In dafault situation, Geant4 creates and uses "granular static libraries". |
---|
36 | But, the Python interface requires "GLOBAL SHARED library". |
---|
37 | If you donot build your Geant4 libraries in global shared mode, |
---|
38 | you have to recreate your instance additionally. |
---|
39 | |
---|
40 | In "tools" directory, you can find some ways to handle both "glanular static" |
---|
41 | and "global shared" environments. Please take a look. |
---|
42 | |
---|
43 | |
---|
44 | How to Install: |
---|
45 | --------------- |
---|
46 | There is a configuraton script for building the package. |
---|
47 | |
---|
48 | # ./configure --help |
---|
49 | `configure' configures Geant4Py to adapt to many kinds of systems. |
---|
50 | |
---|
51 | Usage: ./configure SYSTEM [OPTION]... [VAR=VALUE]... |
---|
52 | |
---|
53 | SYSTEM: System type (see Supported Arhitectures) |
---|
54 | |
---|
55 | Options: |
---|
56 | -h, --help Display this help and exit |
---|
57 | |
---|
58 | Installation directories: |
---|
59 | --prefix=PREFIX Installation prefix [./] |
---|
60 | --libdir=DIR Python modules dir [PREFIX/lib] |
---|
61 | |
---|
62 | Fine tuning of the library path: |
---|
63 | --with-g4-incdir=DIR Geant4 header dir [$G4INCLUDE] |
---|
64 | --with-g4-libdir=DIR Geant4 library dir [$G4LIB/$G4SYSTEM] |
---|
65 | --with-clhep-incdir=DIR CLHEP header dir [$CLHEP_INCLUDE_DIR] |
---|
66 | --with-clhep-libdir=DIR CLHEP library dir [$CLHEP_LIB_DIR] |
---|
67 | --with-clhep-lib=LIB library name of libCLHEP.so [CLHEP|$CLHEP_LIB] |
---|
68 | |
---|
69 | --with-python-incdir=DIR Python header dir [/usr/include/python(2.#)], |
---|
70 | (location of pyconfig.h) |
---|
71 | --with-python-libdir=DIR Python library dir [/usr/lib(64)] |
---|
72 | |
---|
73 | --with-boost-incdir=DIR BOOST-C++ header dir [/usr/include], |
---|
74 | (location of boost/) |
---|
75 | --with-boost-libdir=DIR BOOST-C++ library dir [/usr/lib] |
---|
76 | --with-boost-python-lib=LIB library name of libboost_python.so [boost_python] |
---|
77 | |
---|
78 | --with-package-dir=DIR Geant4 Package dir |
---|
79 | |
---|
80 | --with-extra-dir=DIR Install path for extra packages [/usr/local] |
---|
81 | |
---|
82 | --with-xercesc-incdir=DIR Xerces-C header dir [/usr/include] |
---|
83 | --with-xercesc-libdir=DIR Xerces-C library dir [/usr/lib(64)] |
---|
84 | |
---|
85 | Enable/disable options: prefix with either --enable- or --disable- |
---|
86 | openglx OpenGLX support [auto] |
---|
87 | openglxm OpenGLXm support [disable, $G4VIS_USE_OPENGLXM] |
---|
88 | raytracerx RayTracerX support [disable, $G4VIS_USE_RAYTRACERX] |
---|
89 | |
---|
90 | Supported Architectures: |
---|
91 | linux for Linux gcc 3.x and 4.x (32bit) |
---|
92 | linux64 for Linux gcc 3.x and 4.x (64bit, alias to linuxx8664gcc) |
---|
93 | linuxx8664gcc for AMD Opteron and Intel EM64T Linux gcc 3.x and 4.x |
---|
94 | macosx for MacOSX with gcc (Tiger/Leopard and Xcode) |
---|
95 | |
---|
96 | You can specify all parameters adopting your environment. |
---|
97 | |
---|
98 | For example, |
---|
99 | # ./configure linux64 (miserable) |
---|
100 | --with-g4-incdir=/opt/heplib/Geant4/geant4.8.1/include |
---|
101 | --with-g4-libdir=/opt/heplib/Geant4/geant4.8.1/slib/Linux-g++ |
---|
102 | --with-clhep-incdir=/opt/heplib/CLHEP/2.0.2.2/include |
---|
103 | --with-clhep-libdir=/opt/heplib/CLHEP/2.0.2.2/lib |
---|
104 | --with-clhep-lib=CLHEP-2.0.2.2 |
---|
105 | |
---|
106 | # ./configure linux64 (smart) |
---|
107 | --with-package-dir=/opt/heplib/Geant4/packages/9.1.2 |
---|
108 | |
---|
109 | # ./confugre linux64 (intelligent or haphazard ?) |
---|
110 | |
---|
111 | The configuration script will create config/config.gmk, which describes |
---|
112 | your envrionment. |
---|
113 | |
---|
114 | After executing the configure script, then |
---|
115 | |
---|
116 | # make |
---|
117 | # make install |
---|
118 | |
---|
119 | That's all! |
---|
120 | |
---|
121 | How to Use: |
---|
122 | ----------- |
---|
123 | Some environment variables are required at run time. |
---|
124 | |
---|
125 | * PYTHONPATH |
---|
126 | Python module search directories, given by a colon-separated list |
---|
127 | of directories. |
---|
128 | Practically, $(INSTALL_PATH)/lib is ok. |
---|
129 | |
---|
130 | * LD_LIBRARY_PATH |
---|
131 | Additional shared library path to be searched. |
---|
132 | |
---|
133 | Some libraries paths are already specified via "-rpath" linker option, |
---|
134 | so these paths do not have to be added to "LD_LIBRARY_PATH". |
---|
135 | * Geant4 |
---|
136 | * CLHEP |
---|
137 | * boost-python library |
---|
138 | * $(INSTALL_PATH)/lib |
---|
139 | * $(G4PY_EXLIB_LIBDIR) specified in a module makefile. |
---|
140 | |
---|
141 | |
---|
142 | You can import Geant4Py modules in Python just like |
---|
143 | |
---|
144 | >>> import Geant4 |
---|
145 | |
---|
146 | Notes: |
---|
147 | ----- |
---|
148 | 1) >> IMPORTANT << |
---|
149 | All users' libraries should be build in SHARED libaries. |
---|
150 | |
---|
151 | 2) Development Environment: |
---|
152 | OS: SuSE Linux 11.1 (x86-64) |
---|
153 | g++ : 4.3.2 |
---|
154 | Python: 2.6 |
---|
155 | CLHEP: 2.0.4.4 |
---|
156 | ROOT: 5.20/00 |
---|
157 | |
---|
158 | 3) Tested environment: |
---|
159 | Linux 32/64-bit |
---|
160 | SuSE 11.2 11.1 |
---|
161 | SL4.5 SL5.4 |
---|
162 | Ubuntu 8.0.4 |
---|
163 | MacOSX 10.5 (Leopard) 10.6 (Snow Leopard) |
---|
164 | |
---|
165 | Have A Fun!! |
---|
166 | |
---|
167 | Koichi Murakami <Koichi.Murakami@kek.jp> |
---|