1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
|
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="Adobe PageMill 3.0 Win">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Author" CONTENT="Magdalena Nieplocha">
<TITLE>sf gowno</TITLE>
</HEAD>
<BODY BGCOLOR="#f8f8eb" LINK="#0000ee" VLINK="#990099" TEXT="#000099"
ALINK="#00ffff" BACKGROUND="Image2.gif">
<H2><CENTER><A NAME="overview"></A></CENTER></H2>
<H2><CENTER>Shared Files Library</CENTER></H2>
<P>The Shared Files (SF) library implements logically-shared temporary
files for parallel SPMD (single-program-multiple-data) applications.
Any process can read and write at arbitrary location in a file
independently of other processes. Shared files must be created
and destroyed collectively. To optimize performance of the library,
user can provide hints on:</P>
<UL>
<LI>soft limit, and
<LI>hard limit for the file size.
</UL>
<P>The SF <I>read </I>and <I>write</I> operations are asynchronous/nonblocking
and require a <I>wait</I> operation to complete.</P>
<P>Due to the FORTRAN data type limitations, in order to facilitate
access to files >2GB the file size, request size and offset
arguments use double precision data types.</P>
<P>All SF routines return an error code. The "0" value
means success, other values correspond to error codes.</P>
<P><HR ALIGN=LEFT></P>
<H2><A NAME="sf_create"></A></H2>
<H2>sf_create</H2>
<PRE>integer sf_create(fname, size_hard_limit, size_soft_limit, req_size, handle)
fname -- meta-file name
size_hard_limit -- max file size in bytes not to be exceeded (a hint)
size_soft_limit -- estimated file size (a hint)
req_size -- size of a typical request (a hint)
handle -- returned handle to the created file</PRE>
<P>Creates shared file using name and path specified in <I>fname
</I>as a template. <BR>
<I>req_size</I> specifies size of a typical request (-1. means
"don't know").</P>
<P>Creates shared file using name and path specified in fname
as a template. <BR>
req_size specifies size of a typical request (-1. means "don't
know").</P>
<P>It is a collective operation.</P>
<P><HR ALIGN=LEFT></P>
<P><A NAME="sf_write"></A></P>
<H2>sf_write</H2>
<P> </P>
<PRE>integer sf_write(handle, offset, bytes, buffer, request_id)
handle -- file handle returned from sf_create [in]
offset -- location in file (from the beginning)
where data should be written to [in]
buffer -- local array to put the data [in]
bytes -- number of bytes to read [in]
request_id -- id identifying asynchronous operation [out]</PRE>
<P>Asynchronous write operation. Writes number of <I>bytes</I>
to the file identified by <I>handle</I> at location <I>offset</I>.Operation
is guaranteed to be complete when <I>sf_wait</I> called with <I>request_id
</I>argument returns. <BR>
<HR ALIGN=LEFT></P>
<H2><A NAME="sf_read"></A></H2>
<H2>sf_read</H2>
<PRE>integer sf_read(handle, offset, bytes, buffer, request_id)
handle -- file handle returned from sf_create [in]
offset -- location in file (from the beginning)
where data should be read from [in]
buffer -- local array to put the data [in]
bytes -- number of bytes to read [in]
request_id -- id identifying asynchronous operation [out]</PRE>
<P>Asynchronous read operation. Reads number of <I>bytes</I> to
the file identified by <I>handle</I> at location <I>offset</I>.Operation
is guaranteed to be complete when <I>sf_wait</I> called with <I>request_id
</I>argument returns.</P>
<P><HR ALIGN=LEFT></P>
<H2><A NAME="sf_wait"></A></H2>
<H2>sf_wait</H2>
<PRE>integer sf_wait(request_id)
request_id -- id identifying asynchronous operation [in/out]</PRE>
<P>Blocks the calling process until I/O operation associated with
<I>request</I>_<I>id</I> completes. <BR>
Invalidates <I>request_id.</I> <BR>
<BR>
<HR ALIGN=LEFT><BR>
<A NAME="sf_waitall"></A></P>
<H2>sf_waitall</H2>
<PRE>integer sf_waitall(list, num)
list(num) -- array of ids for asynchronous operations [in/out]
num -- number of entries in list [in]</PRE>
<P>Blocks the calling process until all of the <I>num</I> I/O
operations associated with <I>ids</I><BR>
specified in <I>list</I> complete. Invalidates (modifies) <I>ids</I>
on the <I>list.</I><BR>
<HR ALIGN=LEFT></P>
<H2><A NAME="sf_destroy"></A></H2>
<H2>sf_destroy</H2>
<PRE>
integer sf_destroy(handle)
handle -- file handle returned from sf_create [in]</PRE>
<P>Destroys the shared file associated with <I>handle</I>. It
is a collective operation.
</BODY>
</HTML>
|