Using the HDF5 Core Virtual File Driver (VFD)
By default PSH5X creates and opens files with the H5FD_SEC2 driver. The H5FD_CORE driver enables an application to work with a file in memory. Use the -Core switch with the New-H5Drive cmdlet to instruct PSH5X to use the core driver. The core driver will allocate memory in 64 MB increments. Upon Remove-H5Drive or closing a session the core file contents will be flushed to the file on disk that was specified via -File when New-H5Drive was invoked.
To use the core driver with the HDF5 sandbox drive, h5tmp, set the PSH5XTmpCoreVFD environment variable (before invoking Import-Module HDF5).
You can determine the driver used for a drive by checking the Driver property of the PSH5X.DriveInfo object, i.e.,
PS:1 >Import-Module HDF5 PS:2 >(Get-H5Drive h5tmp).Driver H5FD_SEC2
Caution: The core VFD is is not a fire-and-forget solution and your mileage may vary.
Controlling the HDF5 Object Format
Newer versions of the HDF5 library support optimized object formats that, for example, enable compression on groups or let one create large (> 64K) attributes. They dramatically improve performance for certain use cases, but creating such objects in a file breaks backward compatibility with older versions of the library, i.e., an older version of the library may not be able to read certain objects.
By default PSH5X creates objects compatible with the earliest possible format for each object. This behavior can be overridden (and backward compatibility reduced) via the -V18 or the -Latest switches of the New-H5Drive cmdlet. They correspond to using H5F_LIBVER_18 or H5F_LIBVER_LATEST for the libver_low argument in H5Pset_libver_bounds.
The HDF5 sandbox drive, h5tmp, is created with H5F_LIBVER_LATEST for both libver_low and libver_high.
- - Last modified:May 17th 2012