Debian Codegraph @

pario/doc/api_eaf.html

raw
1 <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5 <meta name="GENERATOR" content="Mozilla/4.6 [en] (WinNT; I) [Netscape]">
6 <!-- DO NOT EDIT: this is a cleared public file -->
7 </head>
8 <body bgcolor="#FFF8DC" link="#0000EE" vlink="#551A8B">
9
10 <center>
11 <h3>
12 Exclusive Access File Library</h3></center>
13 An exclusive access file is a file which is generated and/or read by a
14 single process of a distributed parallel application. Files are not shared
15 between different processes. The&nbsp; library is an abstract high-performance
16 file system which provides a common interface for a variety of architecture
17 specific parallel storage systems.&nbsp; The library also makes available
18 features like asynchronous input and output to Fortran.&nbsp; EAF's syntax
19 is similar to the standard Unix C file operations, differences indicate
20 new semantics or extended features available through EAF.
21 <br>
22 <hr ALIGN=LEFT SIZE=1 NOSHADE WIDTH="100%">
23 <p><a NAME="OP"></a><font size=+2>EAF_Open</font>
24 <p><b>Description:</b>
25 <ul>Open a file.</ul>
26 <b>Prototype:</b>
27 <ul>
28 <pre>integer EAF_Open(fname, type, fh)</pre>
29
30 <ul>
31 <pre>character *(*) fname</pre>
32
33 <pre>integer type</pre>
34
35 <pre>integer fd</pre>
36 </ul>
37 </ul>
38 <b>Parameters:</b>
39 <ul><tt>fname</tt>
40 <ul>Character string of a globally unique filename (path may be fully qualified)</ul>
41 <tt>type</tt>
42 <ul>Read write permissions. Legal values are EAF_W, EAF_R, and EAF_RW</ul>
43 fh
44 <ul>File descriptor (handle).</ul>
45 </ul>
46 <b>Returns:</b>
47 <ul>0 or error code</ul>
48
49 <hr ALIGN=LEFT SIZE="6">
50 <p><a NAME="WR"></a><font size=+2>EAF_Write</font>
51 <p><b>Description:</b>
52 <ul>Synchronously write to the file specified by the file handle</ul>
53 <b>Prototype:</b>
54 <ul>
55 <pre>integer EAF_Write(fh, offset, buf, bytes)</pre>
56
57 <ul>
58 <pre>integer fh</pre>
59
60 <pre>double offset</pre>
61
62 <pre>_______ buf</pre>
63
64 <pre>double bytes</pre>
65 </ul>
66 </ul>
67 <b>Parameters:</b>
68 <ul><tt>fh</tt>
69 <ul>File Handle offset Absolute offset, in bytes, to start writing at</ul>
70 <tt>buf</tt>
71 <ul>Scalar or array of data</ul>
72 <tt>bytes</tt>
73 <ul>Size of buffer in bytes</ul>
74 </ul>
75 <b>Returns:</b>
76 <ul>0 or error code if an error occured</ul>
77
78 <hr ALIGN=LEFT SIZE="6">
79 <p><a NAME="AW"></a><font size=+2>EAF_AWrite</font>
80 <p><b>Description:</b>
81 <ul>Asynchronously write to the file specified by the file handle, and
82 return a handle to the asynchronous operation.
83 <p>If there are more than MAX_AIO_REQ asynchronous requests (reading and/or
84 writing) pending, the operation is handled in a synchronous fashion and
85 returns a <b>CHEMIO_DONE</b> handle.
86 <p>On architectures where asynchronous I/O operations are not supported,
87 all requests are handled synchronously, returning a <b>CHEMIO_DONE</b>
88 handle.</ul>
89 <b>Prototype:</b>
90 <ul>
91 <pre>integer EAF_AWrite(fh, offset, buf, bytes, req_id)</pre>
92
93 <ul>
94 <pre>integer fh</pre>
95
96 <pre>double offset</pre>
97
98 <pre>_______
99 &nbsp;&nbsp;&nbsp; buf</pre>
100
101 <pre>double bytes</pre>
102
103 <pre>integer req_id</pre>
104 </ul>
105 </ul>
106 <b>Parameters:</b>
107 <ul><tt>fh</tt>
108 <ul>File Handle</ul>
109 <tt>offset</tt>
110 <ul>Absolute offset, in bytes, to start writing at</ul>
111 <tt>buf</tt>
112 <ul>Scalar or array of data</ul>
113 <tt>bytes</tt>
114 <ul>Size of buffer, in bytes</ul>
115 <tt>req_id</tt>
116 <ul>Handle of asynchronous operation</ul>
117 </ul>
118 <b>Returns:</b>
119 <ul>0 or error code if an error occured</ul>
120
121 <hr ALIGN=LEFT SIZE="6">
122 <p><a NAME="RD"></a><font size=+2>EAF_Read</font>
123 <p><b>Description:</b>
124 <ul>Synchronously read from the file specified by the file handle</ul>
125 <b>Prototype:</b>
126 <ul>
127 <pre>integer EAF_Read(fh, offset, buf, bytes)</pre>
128
129 <ul>
130 <pre>integer fh</pre>
131
132 <pre>double offset</pre>
133
134 <pre>_______
135 &nbsp;&nbsp;&nbsp; buf</pre>
136
137 <pre>double bytes</pre>
138
139 <pre>integer req_id</pre>
140 </ul>
141 </ul>
142 <b>Parameters:</b>
143 <ul><tt>fh</tt>
144 <ul>File Handle</ul>
145 <tt>offset</tt>
146 <ul>Absolute offset, in bytes, to start writing at</ul>
147 <tt>buf</tt>
148 <ul>Scalar or array of data</ul>
149 <tt>bytes</tt>
150 <ul>Size of buffer, in bytes</ul>
151 <b>Returns:</b>
152 <ul>0, or error code if an error occured</ul>
153 </ul>
154
155 <hr ALIGN=LEFT SIZE="6">
156 <p><a NAME="AR"></a><font size=+2>EAF_ARead</font>
157 <p><b>Description:</b>
158 <ul>Asynchronously read from the file specified by the file handle, and
159 return a handle to the asynchronous operation.
160 <p>If there are more than MAX_AIO_REQ asynchronous requests (reading and/or
161 writing) pending, the operation is handled in a synchronous fashion and
162 returns a <b>EAF_DONE</b> handle.
163 <p>On architectures where asynchronous I/O operations are not supported,
164 all requests are handled synchronously, returning a <b>EAF_DONE</b> handle.</ul>
165 <b>Prototype:</b>
166 <ul>
167 <pre>integer EAF_ARead(fh, offset, buf,bytes, req_id)</pre>
168
169 <ul>
170 <pre>integer fh</pre>
171
172 <pre>double offset</pre>
173
174 <pre>_______
175 &nbsp;&nbsp;&nbsp; buf</pre>
176
177 <pre>double bytes</pre>
178
179 <pre>integer req_id</pre>
180 </ul>
181 </ul>
182 <b>Parameters:</b>
183 <ul><tt>fh</tt>
184 <ul>File Handle</ul>
185 <tt>offset</tt>
186 <ul>Absolute offset, in bytes, to start reading from</ul>
187 <tt>buf</tt>
188 <ul>Scalar or array of data</ul>
189 <tt>bytes</tt>
190 <ul>Size of buffer, in bytes</ul>
191 <tt>req_id</tt>
192 <ul>Handle of asynchronous operation</ul>
193 </ul>
194 <b>Returns:</b>
195 <ul>0 if succeeded, or error code if an error occured</ul>
196
197 <hr ALIGN=LEFT SIZE="6">
198 <p><a NAME="PR"></a><font size=+2>EAF_Probe</font>
199 <p><b>Description:</b>
200 <ul>Determine if an asynchronous request has completed or is pending.</ul>
201 <b>Prototype:</b>
202 <ul>
203 <pre>integer EAF_Probe(id, status)</pre>
204
205 <ul>
206 <pre>integer id</pre>
207
208 <pre>integer status</pre>
209 </ul>
210 </ul>
211 <b>Parameters:</b>
212 <ul><tt>id</tt>
213 <ul>Handle of asynchronous request</ul>
214 <tt>status</tt> Pending or completed status argument</ul>
215 <b>Returns:</b>
216 <ul>0 if probe succeeded, else returns error code .
217 <p><b>status</b> returns 0 if the asynchronous operation is complete, or
218 1 otherwise.
219 <p>If the asynchronous request is complete, <b>id</b> is invalidated.</ul>
220
221 <hr ALIGN=LEFT SIZE="6">
222 <p><a NAME="WA"></a><font size=+2>EAF_Wait</font>
223 <p><b>Description:</b>
224 <ul>Wait for the completion of the asynchronous request associated with
225 id</ul>
226 <b>Prototype:</b>
227 <ul>
228 <pre>integer EAF_Wait(id)</pre>
229
230 <ul>
231 <pre>integer id</pre>
232 </ul>
233 </ul>
234 <b>Parameters:</b>
235 <ul><tt>id</tt>
236 <ul>Handle of asynchronous request</ul>
237 </ul>
238 <b>Returns:</b>
239 <ul>0 if EAF is able to wait for completion, else returns error code.
240 <p><b>id</b> is invalidated.</ul>
241
242 <hr ALIGN=LEFT SIZE="6">
243 <p><a NAME="CL"></a><font size=+2>EAF_Close</font>
244 <p><b>Description:</b>
245 <ul>Close a file</ul>
246 <b>Prototype:</b>
247 <ul>
248 <pre>integer EAF_Close(fh)</pre>
249
250 <ul>
251 <pre>integer fh</pre>
252 </ul>
253 </ul>
254 <b>Parameters:</b>
255 <ul><tt>fh</tt>
256 <ul>File Handle</ul>
257 </ul>
258 <b>Returns:</b>
259 <ul>0 if the file was closed, else returns error code.</ul>
260
261 <hr ALIGN=LEFT SIZE="6">
262 <p><a NAME="DL"></a><font size=+2>EAF_Delete</font>
263 <p><b>Description:</b>
264 <ul>Delete a file</ul>
265 <b>Prototype:</b>
266 <ul>
267 <pre>integer EAF_Delete(fname)</pre>
268
269 <ul>
270 <pre>character*(*) fname</pre>
271 </ul>
272 </ul>
273 <b>Parameters:</b>
274 <ul><tt>fname</tt>
275 <ul>File name</ul>
276 </ul>
277 <b>Returns:</b>
278 <ul>0 if the file was deleted, else returns error code.</ul>
279
280 <hr ALIGN=LEFT SIZE="6">
281 <p><a NAME="LN"></a><font size=+2>EAF_Length</font>
282 <p><b>Description:</b>
283 <ul>Determine the length of a file</ul>
284 <b>Prototype:</b>
285 <ul>
286 <pre>double EAF_Length(fh)</pre>
287
288 <ul>
289 <pre>integer fh</pre>
290 </ul>
291 </ul>
292 <b>Parameters:</b>
293 <ul><tt>fh</tt>
294 <ul>File Handle</ul>
295 </ul>
296 <b>Returns:</b>
297 <ul>file length in bytes</ul>
298
299 <hr ALIGN=LEFT SIZE="6">
300 <p><a NAME="EF"></a><font size=+2>EAF_Eof</font>
301 <p><b>Description:</b>
302 <ul>Determines if the enod of file was reached</ul>
303 <b>Prototype:</b>
304 <ul>
305 <pre>logical EAF_Eof(ierr)</pre>
306
307 <ul>
308 <pre>integer ierr</pre>
309 </ul>
310 </ul>
311 <b>Parameters:</b>
312 <ul><tt>ierr</tt>
313 <ul>error code</ul>
314 </ul>
315 <b>Returns:</b>
316 <ul>true if the end of file was reached, else returns false.
317 <p>ierr=0 means success, otherwise an error.</ul>
318
319 <hr ALIGN=LEFT SIZE="6">
320 <p><a NAME="TR"></a><font size=+2>EAF_Truncate</font>
321 <p><b>Description:</b>
322 <ul>Truncate a file at specified offset</ul>
323 <b>Prototype:</b>
324 <ul>
325 <pre>integer EAF_Close(fh, offset)</pre>
326
327 <ul>
328 <pre>integer fh</pre>
329
330 <pre>double offset</pre>
331 </ul>
332 </ul>
333 <b>Parameters:</b>
334 <ul><tt>fh</tt>
335 <ul>File Handle</ul>
336 <tt>offset</tt>
337 <ul>offset in bytes</ul>
338 </ul>
339 <b>Returns:</b>
340 <ul>0 if the file was truncated, else returns error code.</ul>
341
342 <hr ALIGN=LEFT SIZE="6">
343 <p><a NAME="ST"></a><font size=+2>EAF_Stat</font>
344 <p><b>Description:</b>
345 <ul>Determine available disk space and type for a filesystem</ul>
346 <b>Prototype:</b>
347 <ul>
348 <pre>integer EAF_Stat(fname, avail, fstype)</pre>
349
350 <ul>
351 <pre>character*(*) fname</pre>
352
353 <pre>integer avail</pre>
354
355 <pre>integer fstype</pre>
356 </ul>
357 </ul>
358 <b>Parameters:</b>
359 <ul><tt>fname</tt>
360 <ul>File/directory name</ul>
361 <tt>avail</tt>
362 <ul>amount of available disk space in kilobytes</ul>
363 <tt>fstype</tt>
364 <ul>filesystem type (Unix/PIOFS/PFS/...)</ul>
365 </ul>
366 <b>Returns:</b>
367 <ul>0 if success, else returns error code.</ul>
368
369 <hr ALIGN=LEFT SIZE="6">
370 <p><a NAME="ER"></a><font size=+2>EAF_Errmsg</font>
371 <p><b>Description:</b>
372 <ul>Prints to <i>stdout</i> an error message associated with error code</ul>
373 <b>Prototype:</b>
374 <ul>
375 <pre>subroutine EAF_Errmsg(ierr)</pre>
376
377 <ul>
378 <pre>integer ierr</pre>
379 </ul>
380 </ul>
381 <b>Parameters:</b>
382 <ul><tt>ierr</tt>
383 <ul>error code returned from other EAF routines</ul>
384 </ul>
385 <b>Returns:</b>
386 <ul>nothing</ul>
387
388 </body>
389 </html>