]>
Commit | Line | Data |
---|---|---|
1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" | |
2 | "http://www.w3.org/TR/REC-html40/loose.dtd"> | |
3 | <HTML> | |
4 | <HEAD> | |
5 | <TITLE>Installation</TITLE> | |
6 | <!-- Changed by: , 1-Nov-1999 --> | |
7 | <link rev="made" href="mailto:Federico.Carminati@cern.ch"> | |
8 | <STYLE> | |
9 | BODY { | |
10 | background: #FFFFFF; | |
11 | } | |
12 | ||
13 | COL, COLGROUP, TABLE, TBODY, TD, TR { | |
14 | color: black; | |
15 | text-decoration: none; | |
16 | border-color: black; | |
17 | border-style: none; | |
18 | background: #FFFFFF; | |
19 | } | |
20 | ||
21 | </STYLE> | |
22 | <link rel="stylesheet" href="http://www.w3.org/StyleSheets/Core/Swiss" type="text/css"> | |
23 | </HEAD> | |
24 | ||
25 | <BODY background=#FFFFFF> | |
26 | <TABLE> | |
27 | <TR> | |
28 | <TD><img src="picts/MadHatter.gif" alt="ALICE Off-line Project Logo"> | |
29 | <TD><img src="picts/installation_name.gif" alt="Installation"> | |
30 | <TD><img src="picts/AliceLogo.gif" alt="ALICE Logo"> | |
31 | </TR> | |
32 | </TABLE> | |
33 | ||
34 | <H2><A NAME="#Content">Content</A></H2> | |
35 | <UL> | |
36 | <LI><A HREF="#Installation">Installation</A> | |
37 | <LI><A HREF="#Code">Code development and user environment</A> | |
38 | </UL> | |
39 | ||
40 | <HR> | |
41 | ||
42 | <h2><A HREF="#Content" NAME="Installation">Installation</A></h2> | |
43 | ||
44 | ||
45 | <ol> | |
46 | <p><li> Install <a href="http://root.cern.ch">ROOT</a> and define the | |
47 | necessary variables correctly. | |
48 | ||
49 | <p><li> Decide where the code will reside (from here on <i>directory</i>). | |
50 | ||
51 | <p><li>Define the following global variables in the login script | |
52 | ||
53 | <p><table align=centre borders=no> | |
54 | <tr><th align=left>variable</th><th align=left>value</th></tr> | |
55 | <tr><td width=30%>ALICE </td><td> <i>directory</i> | |
56 | <tr><td>ALICE_LEVEL </td><td> pro </td></tr> | |
57 | <tr><td>ALICE_ROOT </td><td> $ALICE/$ALICE_LEVEL </td></tr> | |
58 | <tr><td>ALICE_TARGET </td><td> `uname` | |
59 | (i.e. result of the Unix <b>uname</b> command)</td></tr> | |
60 | <tr><td colspan=2><i><center>on all systems but HP-UX</center></i></td></tr> | |
61 | <tr><td>LD_LIBRARY_PATH</td> | |
62 | <td>$ALICE_ROOT/lib/tgt_${ALICE_TARGET}\:$LD_LIBRARY_PATH</td></tr> | |
63 | <tr><td colspan=2><i><center>on HP-UX</center></i></td></tr> | |
64 | <tr><td>SHLIB_PATH</td> | |
65 | <td>$ALICE_ROOT/lib/tgt_${ALICE_TARGET}\:$SHLIB_PATH</td></tr> | |
66 | <tr><td>PATH</td> | |
67 | <td> $PATH\:$ALICE_ROOT/bin/tgt_${ALICE_TARGET} </td></tr> | |
68 | </table> | |
69 | ||
70 | <p>At this point you should logout, login again and check that the symbols | |
71 | are set correctly. | |
72 | ||
73 | <p><li> Retrieve the AliRoot code. There are two ways to do this: | |
74 | ||
75 | <ul> | |
76 | <p><li> <em>From a tar file</em>. This is the preferred way for those who | |
77 | do not have an internet connection to the <em>cvs</em> server from the | |
78 | machine where the code has to be installed. The <a | |
79 | href="ftp://pcepaip01.cern.ch/pub">files</a> containing the latest release | |
80 | should be brought on the target machine. Three files are offered: | |
81 | ||
82 | <p><table align=center borders=no> | |
83 | <tr><th align=left>File<th align=left>Content</tr> | |
84 | <tr><td align=center colspan=2><em>Either</em></tr> | |
85 | <tr><td>AliOffline<i>MM.mm-pp</i>.tar.gz | |
86 | <td>Code and the data files of ALICE Off-line</tr> | |
87 | <tr><td align=center colspan=2><em>Or</em></tr> | |
88 | <tr><td>AliLibs<i>MM.mm-pp</i>.tar.gz | |
89 | <td>Code and the data files of the auxiliary libraries</tr> | |
90 | <tr><td>AliRoot<i>MM.mm-pp</i>.tar.gz | |
91 | <td>All the code and the data files of the AliRoot system</tr> | |
92 | </table> | |
93 | ||
94 | <p> <i>MM.mm-pp</i> is the number of the latest <i>M</i>ajor and | |
95 | <i>m</i>inor version and the <i>p</i>atch number. The file(s) have to be | |
96 | unpacked into the $ALICE directory via the command: | |
97 | ||
98 | <p><pre>$ gtar xvfz Ali[...].tar.gz</pre> | |
99 | ||
100 | ||
101 | <p><li> <em>From cvs remote cvs server</em>. This method has the advantage | |
102 | that new patches can be incrementally retrieved and installed via internet. | |
103 | At the moment the problem is that the version of cvs currently installed at | |
104 | CERN (1.09) does not support well binary files. Therefore some data files | |
105 | will be missing with this download mechanism, and these will have to be | |
106 | fetched <em>by hand</em>. The setup of the access to the remote cvs server | |
107 | is described in the Code Development section. The | |
108 | code is dowloaded via the command: | |
109 | ||
110 | <p><pre> | |
111 | $ cd $ALICE | |
112 | $ cvsa co -d pro AliRoot | |
113 | </pre> | |
114 | ||
115 | </ul> | |
116 | ||
117 | <p><li>install the CERN library part | |
118 | ||
119 | <p><pre> | |
120 | $ cd $ALICE_ROOT | |
121 | $ gmake cernlibs | |
122 | </pre> | |
123 | ||
124 | <p><li>Install the ALICE specific software | |
125 | ||
126 | <p><pre> | |
127 | $ cd $ALICE_ROOT | |
128 | $ gmake | |
129 | </pre> | |
130 | ||
131 | <p><li>Copy the file $ALICE_ROOT/.rootrc to your home directory | |
132 | ||
133 | <p><li>For users with c-like shells, update your search path: | |
134 | ||
135 | <p> | |
136 | <pre> | |
137 | $ rehash | |
138 | </pre> | |
139 | ||
140 | <p>This usually has to be done only once, after having defined the new PATH. | |
141 | ||
142 | <p><li>Change to your home directory and run the code | |
143 | ||
144 | <p> | |
145 | <pre> | |
146 | $ cd | |
147 | $ aliroot | |
148 | ||
149 | <output from aliroot> | |
150 | ||
151 | root [1] .x menu.C | |
152 | </pre> | |
153 | </ol> | |
154 | ||
155 | <h2><A HREF="#Content" NAME="Code">Code development and user environment</A></h2> | |
156 | ||
157 | <p>If the ALICE environment is set up correctly, the | |
158 | <var>$ALICE_ROOT/lib/tgt_$ALICE_TARGET</var> directory is in the shared | |
159 | libraries load path, and the <var>$ALICE_ROOT/bin/tgt_$ALICE_TARGET</var> | |
160 | directory is in the PATH variable. This means that the command aliroot will | |
161 | in fact correspond to the file | |
162 | <var>$ALICE_ROOT/bin/tgt_$ALICE_TARGET/aliroot</var>. | |
163 | ||
164 | <p>This is convenient for the normal user, but as soon as the user wants to | |
165 | modify one or more directories, this arrangement becomes inefficient | |
166 | because if a local copy of one of the shared libraries is remade, the | |
167 | linker will always find the official unmodified one that sits in the above | |
168 | directory before the local one in the load library path. Moreover, and | |
169 | unless the full path is specified, the local version of the <b>aliroot</b> | |
170 | executable will be ignored and the official version executed. | |
171 | ||
172 | <p>Therefore in order to develop one or more packages locally | |
173 | (let's say the TPC) and make modifications, the following steps should be | |
174 | performed. We suppose here that the remote cvs server has been setup correctly | |
175 | as explained in the <a href="../development.html">code development</a> section. | |
176 | ||
177 | <p><table> | |
178 | <tr align=left> | |
179 | <th width=30%>$ mkdir AliRoot | |
180 | <td width=50%>create the working directory | |
181 | <tr align=left> | |
182 | <th>$ cd AliRoot | |
183 | <td>set default to it | |
184 | <tr align=left> | |
185 | <th>$ mkdir pro | |
186 | <td>create pro subdirectory | |
187 | <tr align=left> | |
188 | <th>$ cd pro | |
189 | <td>set default to it | |
190 | <tr align=left> | |
191 | <th>$ ln -s $ALICE_ROOT/* ./ | |
192 | <td>link all files here | |
193 | <tr align=left> | |
194 | <th>$ rm lib | |
195 | <td>remove link for library, we need a local file here to containing the new | |
196 | TPC library | |
197 | <tr align=left> | |
198 | <th>$ rm bin | |
199 | <td>remove link for bin directory, we need it to rebuild <b>aliroot</b> executable | |
200 | <tr align=left> | |
201 | <th>$ rm TPC | |
202 | <td>remove link for TPC subdirectory, we need the real files here | |
203 | <tr align=left> | |
204 | <th>$ rm ALIROOT | |
205 | <td>remove link to ALIROOT subdirectory, may be this is not really necessary | |
206 | on all systems, but we do it just to be on the safe side | |
207 | <tr align=left> | |
208 | <th>$ cvsa co TPC | |
209 | <td>get from the cvs server the TPC files to be modified | |
210 | <tr align=left> | |
211 | <th>$ cvsa co ALIROOT | |
212 | <td>get from the server the ALIROOT files to recreate the executable | |
213 | <tr align=left> | |
214 | <th>$ mkdir -p lib/tgt_$ALICE_TARGET | |
215 | <td>create library directory | |
216 | <tr align=left> | |
217 | <th>$ cd lib/tgt_$ALICE_TARGET | |
218 | <td>set default to the lib directory | |
219 | <tr align=left> | |
220 | <th>$ ln -s $ALICE_ROOT/lib/* ./ | |
221 | <td>link all libraries here | |
222 | <tr align=left> | |
223 | <th>$ rm libTPC.sl | |
224 | <td>remove link to TPC library, we need a real one | |
225 | <tr align=left> | |
226 | <th>$ changeRoot $HOME/AliRoot | |
227 | <td>change the AliRoot root to $HOME/AliRoot | |
228 | <tr align=left> | |
229 | <th>$ rehash | |
230 | <td>make sure that the new PATH is taken into account by the shell | |
231 | <tr align=left> | |
232 | <th>$ cd $ALICE_ROOT/TPC | |
233 | <td>(1) set default to TPC directory | |
234 | <tr align=left> | |
235 | <th>$ make macroclean | |
236 | <td>clean up all objects | |
237 | <tr align=left> | |
238 | <th>$ emacs AliTPCv1.cxx | |
239 | <td>(2) edit all the files... | |
240 | <tr align=left> | |
241 | <th>$ make | |
242 | <td>(3) recreate ../lib/libTPC.sl | |
243 | <tr align=left> | |
244 | <th>$ cd ../ALIROOT | |
245 | <td>set default to ALIROOT directory | |
246 | <tr align=left> | |
247 | <th>$ make macroclean | |
248 | <td>clean up object files | |
249 | <tr align=left> | |
250 | <th>$ make | |
251 | <td>make new executable | |
252 | <tr align=left> | |
253 | <th>$ cd <em>directory</em> | |
254 | <td>(4) set default elsewhere | |
255 | <tr align=left> | |
256 | <th>$ aliroot | |
257 | <td>(5) run aliroot | |
258 | </table> | |
259 | ||
260 | <p>Steps 1-5 are the normal development cycle after the first pass through the | |
261 | procedure. | |
262 | ||
263 | <hr> | |
264 | <address> | |
265 | <script language="JavaScript"> | |
266 | document.write("Last modified "+ document.lastModified) | |
267 | // end of script --> | |
268 | </script> | |
269 | by <a href="mailto:Federico.Carminati@cern.ch">Federico Carminati</a> | |
270 | </address> | |
271 | </BODY> | |
272 | </HTML> |