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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
|
<html>
<head><title>
HDF5/H5 Draft API Specification
</title></head>
<body>
<hr>
<center>
<a href="RM_H5Front.html">HDF5 Reference Manual</a>
H5
<a href="RM_H5A.html">H5A</a>
<a href="RM_H5D.html">H5D</a>
<a href="RM_H5E.html">H5E</a>
<a href="RM_H5F.html">H5F</a>
<a href="RM_H5G.html">H5G</a>
<a href="RM_H5P.html">H5P</a>
<a href="RM_H5S.html">H5S</a>
<a href="RM_H5T.html">H5T</a>
<a href="RM_H5Z.html">H5Z</a>
<a href="Glossary.html">Glossary</a>
</center>
<hr>
<center>
<h1>H5: General Library Functions</h1>
</center>
These functions serve general-purpose needs of the HDF5 library
and it users.
<table border=0>
<tr><td valign=top>
<ul>
<li><a href="#Library-Open">H5open</a>
<li><a href="#Library-Close">H5close</a>
</ul>
</td><td> </td><td valign=top>
<ul>
<li><a href="#Library-Version">H5version</a>
<li><a href="#Library-VersCheck">H5vers_check</a>
</ul>
</td><td> </td><td valign=top>
<ul>
<li><a href="#Library-DontAtExit">H5dont_atexit</a>
</ul>
</td></tr>
</table>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Library-Open">H5open</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t</em> <code>H5open</code>(<em>void</em>)
<dt><strong>Purpose:</strong>
<dd>Flushes all data to disk, closes file identifiers, and cleans up memory.
<dt><strong>Description:</strong>
<dd><code>H5open</code> initialize the library. This function is
normally called automatically, but if you find that an
HDF5 library function is failing inexplicably, try calling
this function first.
<dt><strong>Parameters:</strong>
<dl>
<dt>None.
</dl>
<dt><strong>Returns:</strong>
<dd>Returns SUCCEED (0) if successful;
otherwise FAIL (-1).
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Library-Close">H5close</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t</em> <code>H5close</code>(<em>void</em>)
<dt><strong>Purpose:</strong>
<dd>Flushes all data to disk, closes file identifiers, and cleans up memory.
<dt><strong>Description:</strong>
<dd><code>H5close</code> flushes all data to disk,
closes all file identifiers, and cleans up all memory used by
the library. This function is generall called when the
application calls <code>exit</code>, but may be called earlier
in event of an emergency shutdown or out of desire to free all
resources used by the HDF5 library.
<dt><strong>Parameters:</strong>
<dl>
<dt>None.
</dl>
<dt><strong>Returns:</strong>
<dd>Returns SUCCEED (0) if successful;
otherwise FAIL (-1).
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Library-DontAtExit">H5dont_atexit</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t</em> <code>H5dont_atexit</code>(<em>void</em>)
<dt><strong>Purpose:</strong>
<dd>Instructs library not to install <code>atexit</code> cleanup routine.
<dt><strong>Description:</strong>
<dd><code>H5dont_atexit</code> indicates to the library that an
<code>atexit()</code> cleanup routine should not be installed.
The major purpose for this is in situations where the
library is dynamically linked into an application and is
un-linked from the application before <code>exit()</code> gets
called. In those situations, a routine installed with
<code>atexit()</code> would jump to a routine which was
no longer in memory, causing errors.
<p>
In order to be effective, this routine <em>must</em> be called
before any other HDF function calls, and must be called each
time the library is loaded/linked into the application
(the first time and after it's been un-loaded).
<dt><strong>Parameters:</strong>
<dl>
<dt>None.
</dl>
<dt><strong>Returns:</strong>
<dd>Returns SUCCEED (0) if successful;
otherwise FAIL (-1).
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Library-Version">H5version</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t</em> <code>H5version</code>(<em>unsigned *</em><code>majnum</code>,
<em>unsigned *</em><code>minnum</code>,
<em>unsigned *</em><code>relnum</code>,
<em>unsigned *</em><code>patnum</code>
)
<dt><strong>Purpose:</strong>
<dd>
<dt><strong>Description:</strong>
<dd><code>H5version</code> retrieves the major, minor, release, and
patch versions of the library which is linked to the application.
<dt><strong>Parameters:</strong>
<dl>
<dt><em>unsigned *</em><code>majnum</code>
<dd>The major version of the library.
<dt><em>unsigned *</em><code>minnum</code>
<dd>The minor version of the library.
<dt><em>unsigned *</em><code>relnum</code>
<dd>The release number of the library.
<dt><em>unsigned *</em><code>patnum</code>
<dd>The patch number of the library.
</dl>
<dt><strong>Returns:</strong>
<dd>Returns SUCCEED (0) if successful;
otherwise FAIL (-1).
</dl>
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Library-VersCheck">H5vers_check</a>
<dt><strong>Signature:</strong>
<dd><em>herr_t</em> <code>H5vers_check</code>(<em>unsigned *</em><code>majnum</code>,
<em>unsigned *</em><code>minnum</code>,
<em>unsigned *</em><code>relnum</code>,
<em>unsigned *</em><code>patnum</code>
)
<dt><strong>Purpose:</strong>
<dd>
<dt><strong>Description:</strong>
<dd><code>H5vers_check</code> verifies that the arguments match the
version numbers compiled into the library. This function is intended
to be called from user to verify that the versions of header files
compiled into the application match the version of the HDF5 library.
<p>
Due to the risks of data corruption or segmentation faults,
<code>H5vers_check</code> causes the application to abort if the
version numbers do not match.
<dt><strong>Parameters:</strong>
<dl>
<dt><em>unsigned *</em><code>majnum</code>
<dd>The major version of the library.
<dt><em>unsigned *</em><code>minnum</code>
<dd>The minor version of the library.
<dt><em>unsigned *</em><code>relnum</code>
<dd>The release number of the library.
<dt><em>unsigned *</em><code>patnum</code>
<dd>The patch number of the library.
</dl>
<dt><strong>Returns:</strong>
<dd>Returns SUCCEED (0) if successful.
Upon failure, this function causes the application to abort.
</dl>
<hr>
<center>
<a href="RM_H5Front.html">HDF5 Reference Manual</a>
H5
<a href="RM_H5A.html">H5A</a>
<a href="RM_H5D.html">H5D</a>
<a href="RM_H5E.html">H5E</a>
<a href="RM_H5F.html">H5F</a>
<a href="RM_H5G.html">H5G</a>
<a href="RM_H5P.html">H5P</a>
<a href="RM_H5S.html">H5S</a>
<a href="RM_H5T.html">H5T</a>
<a href="RM_H5Z.html">H5Z</a>
<a href="Glossary.html">Glossary</a>
</center>
<hr>
<address>
<a href="mailto:hdfhelp@ncsa.uiuc.edu">HDF Help Desk</a>
<br>
Last modified: 14 July 1998
</body>
</html>
|