HL-HDF
Compilation and Installation

"Requirements"

The Heirarchical Data Format, version 5, must be built and accessible. Source code and prebuilt releases of HDF5 are available from the National Centre for Supercomputing Applications at http://www.hdfgroup.org/HDF5. Follow the documentation from The HDF Group if you plan on building HDF5 yourself. An extremely important requirement is that an ANSI-compliant C compiler be used. Some native compilers cannot handle ANSI C and HL-HDF will therefore not build.

UNIX

A number of GNU tools are required, or at least highly recommended, in order to build HL-HDF. These tools are:

  • gzip (including zlib), version 1.1.0 or higher
  • tar
  • make, GNU Make version 3.7x or higher (or compatible) all of which which are available from http://www.gnu.org/. GNU C (and Fortran) compilers can also be retrieved from this site.

In order for gzip to work, the ZLIB compression library must be compiled and installed. ZLIB is available http://www.cdrom.com/pub/infozip/zlib/

Windows NT

The free WiZ package, available from http://www.cdrom.com/pub/infozip/WiZ.html, or the proprietary WinZip package, available from http://www.winzip.com/, should be installed and accessible. If you choose to link in the pre-compiled HDF5 libs, then you'll have to use the Microsoft Visual C++ compiler, since this is what was used to build the HDF5 package.

Mac

No support yet

VMS

No support yet

compilation

Make sure that all the requirements presented in the previous section are met.

UNIX

The first step is to unpack the distribution. For ths purposes of this documentation, the path /usr/local/src will be the root of the installation. Unpack the distribution with

/usr/local/src % tar xvzf hlhdf_<rev>.tgz 

This will create a directory called hlhdf and the distribution will be placed in it. If the above arguments fail, then you have not used GNU tar.

HL-HDF has a configure script to determine paths to compilers, headers and libraries. In short it tries to find everything HL-HDF needs to be built.

Execute the configure script. The most relevant arguments are:

–prefix=PATH Set the root of the installation path. Defaults to /usr/local/hlhdf
–with-zlib=INC,LIB Use GNU ZLIB compression headers located at INC and library located at LIB
–with-szlib=INC,LIB Use SZLIB compression headers located at INC and library located at LIB, this requires HDF5 versions >=1.6.0
–with-hdf5=INC,LIB Use the HDF5 headers located at INC and libraries located at LIB
–with-python=yes|no Configure in Python support. Default is yes. Enables building a Python interface.
–with-fortran=yes|no Configure with Fortran. Default is no. Useful if integrating with F77 code.

There are a few more arguments and they are listed by executing.

/usr/local/src/hlhdf % ./configure -help

If configure fails, which is unlikely, then you may be in trouble. See Platform Notes for platform-specific notes. The bottom line is that you may have to make some manual adjustments to your configuration files.

If configuration has been carried out without any problems then you're ready to build HL-HDF with:

/usr/local/src/hlhdf % make

This will generate the library libhlhdf.a located in the /usr/local/src/hlhdf/hlhdf directory.

Windows NT

Unpack the distribution using WiZ or WinZip. The following build instructions apply to the Microsoft Visual C++ 6.0 compiler.

  • Start a new project by selecting "File - New - Projects - Win32 Static Library". Add appropriate Project name (hlhdf) and Location in this same window. No precompiled headers or MFC support is needed.
  • Tools - Options - Directories. Make sure you add the path to the HDF5 header files.
  • Project - Add to Project - Files. Go to where the source and header files for HL-HDF are located and add them all.
  • Project - Settings - C/C++. Set appropriate warning level and optimization.
  • Build - Build hlhdf.lib

This should generate the file hlhdf.lib in the Debug directory.

Testing

We have added a new test suite that can be run prior installation. Currently it requires that HLHDF is compiled with python support since all testcases have been written in python.

UNIX

When building on UNIX, the required libraries and modules will be compiled together with the rest of the software so no extra steps are required. In order to perform the tests, just write

/usr/local/src/hlhdf % make check

If these tests pass, then HL-HDF is working as expected.

Windows NT

We have not run the test script on Windows NT so please let us know the steps you have taken in order to get it to run. In test/python there is a python script called HlhdfTestSuite that can be run to execute the tests after the python modules in that library has been successfully compiled.

Installation

UNIX

Execute

/usr/local/src/hlhdf % make install

and the header files, libraries, binaries, scripts and a MK-file will be installed to the include, lib, bin and mkf directories located under the path specified by the prefix variable that was passed on to the configure script. The HL-HDF installation is complete when this step has been carried out. For information on how to compile and install the Python interface, see chapter Platform Notes.

Windows NT

A specific installation has not been defined. It is up to the user to place the headers, library, and binaries in appropriate locations.

Platform Notes

HL-HDF has been built on a number of systems, most of which are different flavours of UNIX. Unfortunately HDF5 is not available for any form of VMS or other arcane operating system such as DOS. HL-HDF was developed with the intention that is should be possible to build it on most platforms, however since we only have a limited set of different machines, it is impossible for us to say on what machines it is possible to build.

If the pre-compiled binaries are installed, the file mkf/hldef.mk has to be modified manually to point to the locations of the HDF5 installation, the ZLIB installation, the compiler, etc.

For this release, development and testing has been performed on PC Linux, Ubuntu 8.04.