[svn-r3659]

Added html files with references to the fortran 90 files.
(under examples/)
This commit is contained in:
Barbara Jones
2001-03-19 09:26:47 -05:00
parent 380eb42bc5
commit f11cef2c56
30 changed files with 2967 additions and 3139 deletions

View File

@@ -1,5 +1,5 @@
<HTML><HEAD>
<TITLE>HDF5 Tutorial - Introductory Topics Questions with Answers
<TITLE>HDF5 Tutorial - Introductory Topics Quiz with Answers
</TITLE>
</HEAD>
@@ -13,182 +13,290 @@ width=78 height=27 alt="NCSA"><P></A>
[ <A HREF="title.html"><I>HDF5 Tutorial Top</I></A> ]
<H1>
<BIG><BIG><BIG><FONT COLOR="#c101cd">Introductory Topics Questions with
Answers</FONT>
<BIG><BIG><BIG><FONT COLOR="#c101cd">Introductory Topics Quiz
with Answers</FONT>
</BIG></BIG></BIG></H1>
<hr noshade size=1>
<PRE>
Section 2: HDF File Organization
================================
<h3>Section 2: HDF File Organization</h3>
<ol>
1. Name and describe the two primary objects that can be stored in an HDF5
file:
<li>Name and describe the two primary objects that can be stored in an HDF5
file.
Answer:
Group: A grouping structure containing zero or more HDF5 objects, together
with supporting metadata.
<dl>
<dt><b>Answers:</b>
<dd><em>Group:</em> A grouping structure containing zero or more
HDF5 objects, together with supporting metadata.
<dd><em>Dataset:</em> A multidimensional array of data elements,
together with supporting metadata.
</dl>
Dataset: A multidimensional array of data elements, together with
supporting metadata.
<p>
<li>What is an attribute?
2. What is an attribute?
<dl>
<dt><b>Answer:</b>
<dd>An HDF5 attribute is a user-defined HDF5 structure that provides extra
information about an HDF5 object.
</dl>
Answer: An HDF attribute is a user-defined HDF5 structure that provides extra
information about an HDF5 object.
<p>
<li>Give the path name for an object called <code>harry</code> that is
a member of a group called <code>dick</code>, which, in turn, is a
member of the root group.
3. Give the path name for an object called "harry" that is a member of a
group called "dick," which in turn is a member of the root group.
Answer: /dick/harry
Section 3: The HDF5 API
=======================
Describe the purpose of each of the following HDF5 APIs:
H5A, H5D, H5E, F5F, H5G, H5T, H5Z
H5A: Attribute access and manipulation routines.
H5D: Dataset access and manipulation routines.
H5E: Error handling routines.
F5F: File access routines.
H5G: Routines for creating and operating on groups.
H5T: Routines for creating and manipulating the datatypes of dataset elements.
H5Z: Data compression routines.
<dl>
<dt><b>Answer:</b>
<dd><code>/dick/harry</code>
</dl>
Section 4: Creating an HDF File
===============================
</ol>
<h3>Section 3: The HDF5 API</h3>
<ol>
1. What two HDF5 routines must be called in order to create an HDF5 file?
<li>Describe the purpose of each of the following HDF5 APIs:
Answer: H5Fcreate and H5Fclose.
<dir>
H5A, H5D, H5E, H5F, H5G, H5T, H5Z
</dir>
2. What include file must be included in any file that uses the HDF5 library.
Answer: hdf5.h must be included because it contains definitions and
declarations used by the library.
3. An HDF5 file is never completely empty because as soon as an HDF5 file
is created, it automatically contains a certain primary object. What is
that object?
Answer: The root group.
<dl>
<dt><b>Answers:</b>
<dir>
H5A: Attribute access and manipulation routines <br>
H5D: Dataset access and manipulation routines <br>
H5E: Error handling routines <br>
H5F: File access routines <br>
H5G: Routines for creating and operating on groups <br>
H5T: Routines for creating and manipulating the
datatypes of dataset elements <br>
H5Z: Data compression routines
</dir>
</dl>
Section 5: Creating a Dataset
=============================
</ol>
<h3>Section 4: Creating an HDF5 File</h3>
<ol>
1. Name and describe two major datatype categories.
<li>What two HDF5 routines must be called to create an HDF5 file?
Answer: atomic datatype - An atomic datatype cannot be decomposed into
smaller units at the API level.
compound datatype - A compound datatype is a collection of atomic/
compound datatypes, or small arrays of such types.
<dl>
<dt><b>Answer:</b>
<dd><code>H5Fcreate</code> and <code>H5Fclose</code>.
</dl>
2. List the HDF5 atomic datatypes. Give an example of a predefined datatype.
<p>
<li>What include file must be included in any file that uses the HDF5 library?
Answer: There are six HDF5 atomic datatypes: integer, floating point,
date and time, character string, bit field, opaque.
H5T_IEEE_F32LE - 4-byte little-endian, IEEE floating point,
H5T_NATIVE_INT - native integer
<dl>
<dt><b>Answer:</b>
<dd><code>hdf5.h</code> must be included because it contains definitions
and declarations used by the library.
</dl>
3. What does the dataspace describe? What are the major characteristics of the
simple dataspace?
<p>
<li>An HDF5 file is never completely empty because as soon as it is created,
it automatically contains a certain primary object. What is that object?
Answer: The dataspace describes the dimensionality of the dataset. It is
characterized by its rank and dimension sizes.
<dl>
<dt><b>Answer:</b>
<dd>The root group.
</dl>
</ol>
<h3>Section 5: Creating a Dataset</h3>
<ol>
<li>Name and describe two major datatype categories.
<dl>
<dt><b>Answers:</b>
<dd><em>Atomic datatype:</em>
An atomic datatype cannot be decomposed into smaller units at the
API level.
<br>
<em>Compound datatype:</em>
A compound datatype is a collection of atomic and compound datatypes,
or small arrays of such types.
</dl>
<p>
<li>List the HDF5 atomic datatypes. Give an example of a predefined datatype.
<dl>
<dt><b>Answers:</b>
<dd>There are six HDF5 atomic datatypes: integer, floating point,
date and time, character string, bit field, and opaque.
Examples of predefined datatypes include the following:
<dir>
<code>H5T_IEEE_F32LE</code>
- 4-byte little-endian, IEEE floating point <br>
<code>H5T_NATIVE_INT</code>
- native integer
</dir>
</dl>
<p>
<li>What does the dataspace describe? What are the major characteristics of
the simple dataspace?
<dl>
<dt><b>Answers:</b>
<dd>The dataspace describes the dimensionality of the dataset.
A simple dataspace is characterized by its rank and dimension sizes.
</dl>
4. What information needs to be passed to the H5Dcreate function, i.e.
<p>
<li>What information needs to be passed to the H5Dcreate function, i.e.,
what information is needed to describe a dataset at creation time?
Answer: dataset location, name, dataspace, datatype, and creation properties.
<dl>
<dt><b>Answer:</b>
<dd>The dataset location, name, dataspace, datatype, and dataset
creation property list.
</dl>
Section 6: Reading from/Writing to a Dataset
============================================
</ol>
<h3>Section 6: Reading from and Writing to a Dataset</h3>
<ol>
1. What are six pieces of information which need to be specified for
<li>What are six pieces of information which need to be specified for
reading and writing a dataset?
Answer: A dataset, a dataset's datatype and dataspace in memory, the
dataspace in the file, the transfer properties and data buffer.
<dl>
<dt><b>Answer:</b>
<dd>The dataset identifier, the dataset's datatype and dataspace in
memory, the dataspace in the file, the dataset transfer property
list, and a data buffer.
</dl>
2. Why are both the memory dataspace and file dataspace needed for
read/write operations, but only the memory datatype is specified for the
datatype?
<p>
<li>Why are both the memory dataspace and file dataspace needed for
read/write operations, while only the memory datatype is required?
Answer: A dataset's file datatype is specified at creation time and cannot be
changed. Both file and memory dataspaces are needed for performing
subsetting and partial I/O operations.
<dl>
<dt><b>Answer:</b>
<dd>A dataset's file datatype is not required for a read/write operation
because the file datatype is specified when the dataset is created
and cannot be changed. Both file and memory dataspaces are required
for dataset subsetting and for performing partial I/O operations.
</dl>
3. What does the line DATASPACE { SIMPLE (4 , 6 ) / ( 4 , 6 ) } in Fig 6.1
means?
<p>
<li>What does the line
<br>&nbsp;&nbsp;&nbsp;
<code>DATASPACE { SIMPLE (4 , 6 ) / ( 4 , 6 ) } </code>
<br>in Figure 6.1 mean?
Answer: It means that the dataset "dset" has a simple dataspace with the
current dimensions (4,6) and the maximum size of the dimensions (4,6).
<dl>
<dt><b>Answer:</b>
<dd>It means that the dataset <code>dset</code> has a simple dataspace
with the current dimensions (4,6) and the maximum size of the
dimensions (4,6).
</dl>
Section 7: Creating an Attribute
================================
</ol>
<h3>Section 7: Creating an Attribute</h3>
<ol>
1. What is an attribute?
<li>What is an attribute?
Answer: An attribute is a dataset attached to an object. It describes the
nature and/or the intended usage of the object.
<dl>
<dt><b>Answer:</b>
<dd>An attribute is a dataset attached to an object. It describes the
nature and/or the intended usage of the object.
</dl>
2. Can partial I/O operations be performed on attributes?
<p>
<li>Can partial I/O operations be performed on attributes?
Answer: No
<dl>
<dt><b>Answer:</b>
<dd>No.
</dl>
Section 8: Creating a Group
===========================
</ol>
<h3>Section 8: Creating a Group</h3>
<ol>
What are the two primary objects that can be included in
a group?
<li>What are the two primary objects that can be included in a group?
Answer: A group and a dataset
<dl>
<dt><b>Answer:</b>
<dd>A group and a dataset.
</dl>
Section 9: Creating Groups using Absolute/Relative Names
========================================================
</ol>
<h3>Section 9: Creating Groups Using Absolute and Relative Names</h3>
<ol>
1. Group names can be specified in two "ways". What are these
two types of group names that you can specify?
<li>Group names can be specified in two ways. What are these two types
of group names?
Answer: relative and absolute
<dl>
<dt><b>Answer:</b>
<dd>Relative and absolute.
</dl>
2. You have a dataset named "moo" in the group "boo", which is
in the group "foo", which in turn, is in the root group. How would
you specify an absolute name to access this dataset?
<p>
<li>You have a dataset named <code>moo</code> in the group
<code>boo</code>, which is in the group <code>foo</code>,
which, in turn, is in the root group.
How would you specify an absolute name to access this dataset?
Answer: /foo/boo/moo
<dl>
<dt><b>Answer:</b>
<dd><code>/foo/boo/moo</code>
</dl>
Section 10: Creating Datasets in Groups
=======================================
Describe a way to access the dataset "moo" described in the previous section
(Section 9, question 2), using a relative and absolute pathname.
</ol>
<h3>Section 10: Creating Datasets in Groups</h3>
<ol>
Answers: 1. Access the group, "/foo", and get the group ID.
Access the group "boo" using the group ID obtained in Step 1.
Access the dataset "moo" using the group ID in Step 2.
gid = H5Gopen (file_id, "/foo", 0); /* absolute path */
gid1 = H5Gopen (gid, "boo", 0); /* relative path */
did = H5Dopen (gid1, "moo"); /* relative path */
<li>Describe a way to access the dataset <code>moo</code> described in
the previous section (Section&nbsp;9, question&nbsp;2) using a
relative name.
Describe a way to access the same dataset using an absolute name.
<dl>
<dt><b>Answers:</b>
<ol>
<li>Access the group <code>/foo</code> and get the group ID.
Access the group <code>boo</code> using the group ID obtained
in Step&nbsp;1.
Access the dataset <code>moo</code> using the group ID obtained
in Step&nbsp;2.
<pre>
gid = H5Gopen (file_id, "/foo", 0); /* absolute path */
gid1 = H5Gopen (gid, "boo", 0); /* relative path */
did = H5Dopen (gid1, "moo"); /* relative path */ </pre>
2. Access the group, "/foo", and get the group ID.
Access the dataset "boo/moo", with the group ID just obtained.
gid = H5Gopen (file_id, "/foo", 0); /* absolute path */
did = H5Dopen (gid, "boo/moo"); /* relative path */
<li>Access the group <code>/foo</code> and get the group ID.
Access the dataset <code>boo/moo</code> with the group ID
just obtained.
<pre>
gid = H5Gopen (file_id, "/foo", 0); /* absolute path */
did = H5Dopen (gid, "boo/moo"); /* relative path */ </pre>
3. Access the dataset with an absolute path.
did = H5Dopen (file_id, "/foo/boo/moo"); /* absolute path */
</PRE>
<li>Access the dataset with an absolute path.
<pre>
did = H5Dopen (file_id, "/foo/boo/moo"); /* absolute path */ </pre>
</ol>
</dl>
</ol>
<!-- BEGIN FOOTER INFO -->
<P><hr noshade size=1>
@@ -203,7 +311,8 @@ Answers: 1. Access the group, "/foo", and get the group ID.
<!-- <A HREF="helpdesk.mail.html"> -->
<A HREF="mailto:hdfhelp@ncsa.uiuc.edu">
hdfhelp@ncsa.uiuc.edu</A>
<BR> <H6>Last Modified: August 2, 1999</H6><BR>
<br>
<BR> <H6>Last Modified: January 13, 2000</H6><BR>
<!-- modified by Barbara Jones - bljones@ncsa.uiuc.edu -->
</FONT>
<BR>