* Implement support for complex number datatypes Adds the new datatype class H5T_COMPLEX Adds the new API function H5Tcomplex_create which creates a complex number datatype from an ID of a base floating-point datatype Adds the new feature check macros H5_HAVE_COMPLEX_NUMBERS and H5_HAVE_C99_COMPLEX_NUMBERS Adds the new datatype size macros H5_SIZEOF_FLOAT_COMPLEX, H5_SIZEOF_DOUBLE_COMPLEX and H5_SIZEOF_LONG_DOUBLE_COMPLEX Adds the new datatype ID macros H5T_NATIVE_FLOAT_COMPLEX, H5T_NATIVE_DOUBLE_COMPLEX, H5T_NATIVE_LDOUBLE_COMPLEX, H5T_CPLX_IEEE_F16LE, H5T_CPLX_IEEE_F16BE, H5T_CPLX_IEEE_F32LE, H5T_CPLX_IEEE_F32BE, H5T_CPLX_IEEE_F64LE and H5T_CPLX_IEEE_F64BE Adds hard and soft datatype conversion paths between complex number datatypes and all the integer and floating-point datatypes, as well as between other complex number datatypes Adds a special conversion path between complex number datatypes and array or compound datatypes where the in-memory layout of data is the same between the datatypes and data can be converted directly Adds support for complex number datatypes to the h5dump, h5ls and h5diff/ph5diff tools. Allows h5dump '-m' option to change floating-point printing format for float complex and double complex datatypes, as well as long double complex if it has the same size as double complex Adds minimal support to the h5watch and h5import tools Adds support for the predefined complex number datatypes and H5Tcomplex_create function to the Java wrappers. Also adds initial, untested support to the JNI for future use with HDFView Adds support for just the H5T_COMPLEX datatype class to the Fortran wrappers Adds support for the predefined complex number datatypes and H5Tcomplex_create function to the high level library H5LT interface for use with the H5LTtext_to_dtype and H5LTdtype_to_text functions Changes some usages of "complex" in the library since it conflicts with the "complex" keyword from the complex.h header. Also changes various usages of the word "complex" throughout the library to distinguish compound datatypes from complex datatypes.
HDF5 API Tests
This directory contains several test applications that exercise HDF5's public API and serve as regression tests for HDF5 VOL Connectors.
Build Process and options
These HDF5 API tests are disabled by default, but can be enabled by passing the
-DHDF5_TEST_API=ON option to CMake. The following build options are available
to influence how the API tests get built:
CMake
To set an option, it should be prepended with -D when passed to the cmake command.
For example,
cmake -DHDF5_TEST_API=OFF ..
HDF5_TEST_API (Default: ON) - Determines whether the API tests will be built.
HDF5_TEST_API_INSTALL (Default: ON) - Determines whether the API tests should be installed
on the system.
HDF5_TEST_API_ENABLE_ASYNC (Default: OFF) - Determines whether tests for HDF5's asynchronous
I/O capabilities should be enabled. Note that the "native" HDF5 VOL connector doesn't support
this functionality, so these tests are directed towards VOL connectors that do.
HDF5_TEST_ENABLE_DRIVER (Default: OFF) - Determines whether the API test driver program should
be built. This driver program is useful when a VOL connector relies upon a server executable
(as well as possible additional executables) in order to function. The driver program can be
supplied with a server executable and
HDF5_TEST_API_SERVER (Default: empty string) - If HDF5_TEST_ENABLE_DRIVER is set to ON, this
option should be edited to point to the server executable that the driver program should attempt
to launch before running the API tests.
Autotools
Currently unsupported
Usage
These API tests currently only support usage with the native HDF5 VOL connector and HDF5 VOL connectors that can be loaded dynamically as a plugin. For information on how to build a VOL connector in this manner, refer to section 2.3 of the HDF5 VOL Connector Author Guide.
TODO: section on building VOL connectors alongside HDF5 for use with tests
These API tests can also be used to test an HDF5 VOL connector that is external to the library.
For convenience, the HDF5_TEST_API_INSTALL option can be used to install these tests on the
system where other HDF5 executables (such as h5dump) are installed.
To run these tests with your VOL connector, set the following two environment variables:
HDF5_VOL_CONNECTOR - This environment variable should be set to the name chosen for the VOL connector
to be used. For example, HDF5's DAOS VOL connector uses the name "daos" and would therefore set:
HDF5_VOL_CONNECTOR=daos
HDF5_PLUGIN_PATH - This environment variable should be set to the directory that contains the built
library for the VOL connector to be used.
Once these are set, the HDF5 API tests will attempt to automatically load the specified VOL connector and use it when running tests. If HDF5 is unable to locate or load the VOL connector specified, it will fall back to running the tests with the native HDF5 VOL connector and an error similar to the following will appear in the test output:
HDF5-DIAG: Error detected in HDF5 (X.XX.X) MPI-process 0:
#000: /home/user/git/hdf5/src/H5.c line 1010 in H5open(): library initialization failed
major: Function entry/exit
minor: Unable to initialize object
#001: /home/user/git/hdf5/src/H5.c line 277 in H5_init_library(): unable to initialize vol interface
major: Function entry/exit
minor: Unable to initialize object
#002: /home/user/git/hdf5/src/H5VLint.c line 199 in H5VL_init_phase2(): unable to set default VOL connector
major: Virtual Object Layer
minor: Can't set value
#003: /home/user/git/hdf5/src/H5VLint.c line 429 in H5VL__set_def_conn(): can't register connector
major: Virtual Object Layer
minor: Unable to register new ID
#004: /home/user/git/hdf5/src/H5VLint.c line 1321 in H5VL__register_connector_by_name(): unable to load VOL connector
major: Virtual Object Layer
minor: Unable to initialize object
Help and Support
For help with building or using the HDF5 API tests, please contact the HDF Help Desk.