Changes to include directory structure

Was/Is there any discussion around the idea of installing the HDF5 headers into a “sandboxed” include directory such as “hdf5”? If we look at projects like LLVM when they install their headers they go into clang, clang-c, lld, llvm, etc. Maybe my need for hyper organization is driving this but I just worry about clashes with other include headers from other projects as a possibility. I’ve only had that happen a few times in 12 years.

The migration could certainly be a pain or maybe not. If it happens at a major version (1.14) then the FindHDF5.cmake could certainly be updated to reflect the new spot.

Also, developers could use #include <hdf5/hdf5.h> if they wanted.

Just a random thought that I have been sitting on for about 12 years now…

Mike Jackson

Not quite certain what you mean by installing the header files into sandbox.

Nevertheless it is possible to install most versions, – I picked 1 git commit per week, starting from year 2003 – into a separate directory, then individually linking against to a recent openMPI and then linking IOR and MACSio against it. This was a part of a massive regression test for pHDF5, to examine if there was any significant performance fluctuations over the past 17 years. Here is the plot – gaps indicate failed compile.

During the development phase I first used gnu configure --prefix option, then tried cmake as well. If I recall @byrn, @lrknox and @les.kurz helped me through the somewhat bumpy ride – and I am thankful for their help.

So if you meant a feature that allows you to compile HDF5 in an isolated environment, then yes, it is available.

best: steve

Steve,

As usual when I’m too busy, I didn’t really give enough details so I’ll be more precise. Currently when you build and install HDF5, let’s say into /usr/local you will get the headers installed loosely into /usr/local/include. I would like to change that default to /usr/local/include/hdf5/*.h

Try this: ./configure --prefix=/usr/local --includedir=/usr/local/hdf5/include [...]
make -jN && make install where N is the core count, max 32 – on a recent XEON skylake it turned out around 32 cores the compile speed increase is less dramatic.

Here is the desired layout:

steven@honshu:/tmp/usr/local$ tree -L 2
.
├── bin
│   ├── [...]
│   └── h5watch
├── hdf5
│   └── include
├── lib
│   ├── [ ... ]
│   ├── libhdf5.so.103 -> libhdf5.so.103.2.0
│   └── libhdf5.so.103.2.0
└── share
    └── hdf5_examples

Steve,

Cool! Thanks for the tip. Can I do that with the CMake based builds?

Also, /usr/local/include/hdf5