/[PAMELA software]/gpamela/README
ViewVC logotype

Contents of /gpamela/README

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3.1.1.1 - (show annotations) (download) (vendor branch)
Thu Jul 11 16:01:58 2002 UTC (22 years, 4 months ago) by cafagna
Branch: v3r0
CVS Tags: v4r0, v4r1, v4r2, v4r3, firstrelease, v3r3, v3r1, v3r2
Changes since 3.1: +0 -0 lines
First GPAMELA release on CVS

1
2 Quick and dirty instruction list to build GPAMELA executable
3 ------------------------------------------------------------
4
5 (F. Cafagna, Bari 11 July 2002)
6
7
8 1. INTRODUCTION
9
10 In this directory you will find all the sources and auxiliary files needed
11 to build GPAMELA.
12
13 GPAMELA sources are distributed in several subdirectories along with
14 the GARFIELD car files needed to build the GARFIELD library.
15
16 To build GPAMELA you need the Makefile in the top directory along with
17 the file: makefile_linux, stored in the garfield/src directory.
18
19 2. BUILD GPAMELA EXECUTABLE FOR INPATIENTS
20
21 Here is the list of action for the inpatients:
22
23 - Create the directory you want to store executables and run the program,
24 in this example I wil create my_gpamela in my home directory:
25
26 > mkdir $HOME/my_gpamela
27
28 - Define the environment variable GPAMELA_BIN pointing the the created directory:
29
30 > GPAMELA_BIN = $HOME/my_gpamela; export GPAMELA_BIN (for [ba]sh )
31 > setenv GPAMELA_BIN $HOME/my_gpamela (for [t]csh)
32
33 - Make it:
34
35 > make distclean; make gpamelax11.exe; make gpamela.exe
36 > make gpamelax11_deb.exe; make gpamela_deb.exe
37
38 - Install it:
39
40 > make install
41
42 3. DIRECTORY TREE
43
44 Here follows the gpamela directory tree:
45 .
46 |-- Makefile
47 |-- aux
48 | |-- Auxiliary files needed by GPAMELA, i.e. field map, data cards,
49 | garfield definitions etc. etc.
50 |-- cmz
51 | `-- Versions
52 | |-- History of the previous CMZ releases
53 |-- garfield
54 | `-- src
55 | |-- GARFIELD sources and makefile
56 |-- gcdes
57 | |-- GEANT 3.21 include files
58 |-- gpamela
59 | |-- general purpose routine, for example GUSTEP, GPDAT etc. etc.
60 |-- gpcal
61 | |-- CALorimeter related routines
62 |-- gpcas
63 | |-- CAS related soubroutine
64 |-- gpcat
65 | |-- CAT related soubroutine
66 |-- gpcdes
67 | |-- GPAMELA include files
68 |-- gpfield
69 | |-- magnetic field related subroutines
70 |-- gpgar
71 | |-- GPAMELA- GARFIELD interface related subroutines
72 |-- gphys
73 | |-- obsolete routines to integrate dE/dx fluctuations
74 | in the GEANT physics bank
75 |-- gpmain
76 | `-- GPAMELA main routine
77 |-- gpobsolete
78 | |-- obsolete code for tracker digitization
79 |-- gpspe
80 | |-- SPEctrometer related subroutine
81 |-- gptof
82 | |-- TOF related subroutine
83 |-- gptrd
84 | |-- TOF related subroutine
85 |-- gpxint
86 | |-- GPAMELA main routine for the interactive version
87 |-- history
88 | `-- history file (GPAMELA logbook)
89 `-- inform
90 `-- list and usage of GPAMELA data cards
91
92 Please note that no lib and bin directories are presents in the distribution.
93 They will be created by make.
94
95 Please note that all the source files have the .F extensions, they must be preprocessed.
96
97 4. BUILD GPAMELA EXECUTABLE, LONG VERSION
98
99 You can create GPAMELA executables using gmake. For sake of simplicity I am
100 using just one Makefile located in the top directory: gpamela.
101
102 The Makefile will create the executables locally in the bin directory
103 of the top directory gpamela and will install them into the any user
104 created directory along with the auxiliaries files need. You can pass
105 the used directory via the GPAMELA_BIN environment variable.
106
107 Please note that the Makefile does use GNUmake: gmake,
108 extension. Usually in the RedHat Linux distributions make points to
109 gmake so the usage is equivalent.
110
111 The Makefile contains the following targets:
112
113 -gpamelax11.exe : builds the interactive version of GPAMELA
114 -gpamela.exe : builds the batch version of GPAMELA
115 -gpamelax11_deb.exe : builds the interactive version of GPAMELA with debug flags
116 -gpamela_deb.exe : builds the batch version of GPAMELA with debug flags
117 -depend : creates dependency files for each source file
118 -install : install GPAMELA executables and auxiliary files in GPAMELA_BIN
119 -${GPLIBDIR}/libgarfield-7.a: builds the GARFIELD library in garfield/src directory
120 -createdir : creates the ./bin directory in the top directory
121 -distclean : deletes all the objects, dependency files, executables,
122 GARFIELD library, bin and lib directories
123 -clean : deletes all the objects and dependency files
124
125 The Makefile contains the following implicit rule:
126
127 %.d: %.F : builds dependency files from the .F files
128
129 Please note that no rule has been included to build dependencies for .f files.
130 To avoid confusion all the GPAMELA fortran sources must have the .F extension.
131
132 The Makefiles does use the g77 capability of creating dependencies suitable for
133 usage in makefile. Once the dependency files have been created Makefiles does include
134 them and use them as targets to build the objects from the sources.
135 Because I am using a single Makefile in the top directory the rule does create the
136 dependency files in the subdirectories.
137
138 Please note tha gmake scans the Makefile before executing it. If no
139 files are available for the include directive gmake will try to build
140 them. For this reason you will get the "Creating dependency files"
141 message also when you try to delete them .......
142
143 Please note that all the object files are deleted after executable
144 creation. Because the GPAMELA code relies on the preprocessor
145 directives codes must be preprocessed for each case, i.e. interactive
146 or not interactive version. Deleting them in each executable target
147 will force the object creation next time you build any target. To be
148 sure you are using the right objects you should issue a "make clean"
149 command before any executable creation.
150
151 Please note that the dependency files are note recreated. This means
152 that they should not depend on preprocessor directives, i.e. #if
153 #define etc. etc.
154
155 GPAMELA depends on GARFIELD libraries. In case libgarfield-7.a is not
156 present in the lib subdirectory it will be created from scratch. This
157 is a long procedure that may take several minutes.
158
159 Here is the list of action to build GPAMELA executables:
160
161 - Create the directory you want to store executables and run the program,
162 in this example I wil create my_gpamela in my home directory:
163
164 > mkdir $HOME/my_gpamela
165
166 - Define the environment variable GPAMELA_BIN pointing the the created directory:
167
168 > GPAMELA_BIN = $HOME/my_gpamela; export GPAMELA_BIN (for [ba]sh )
169 > setenv GPAMELA_BIN $HOME/my_gpamela (for [t]csh)
170
171 - Delete all the objects, dependency files and GARFIELD library (you never know):
172 > make distclean
173
174 - Create interactive executable (it will create the libgarfield-7.a also):
175 > make gpamelax11.exe;
176
177 - Create batch executable:
178 > make gpamela.exe
179
180 - Create debug versions
181 > make gpamelax11_deb.exe; make gpamela_deb.exe
182
183 - Install all executables, along with GPAMELA.FFR, gpfield.rz,
184 TRD_ATT.DAT, PROVA.GAR, in GPAMELA_BIN directory:
185 > make install
186
187 5. OUTPUT MESSAGES
188
189 To maintain backward compatibility with the previous g77 version, I am
190 still using the debug-kludge flag to access fortran COMMONs in
191 debug. This is obsolete in the new release: 2.96. For this reason if
192 you are running a RedHat 7.x you will receive the message:
193
194 f771:warning: -fdebug-kludge disabled, use normal debugging flags
195
196 During gpamelax11(_deb).exe building you will get the message:
197
198 /cern/pro/lib/libpawlib.a(bugrep.o): In function `br_create_template':
199 bugrep.o(.text+0x113): the use of `tmpnam' is dangerous, better use `mkstemp'
200
201 It is a warning related to the pawlib in the cern release that is still not RH7.x certified.

  ViewVC Help
Powered by ViewVC 1.1.23