Installing HDF5 on linux

This is just a quick walkthrough of installing HDF5 on a linux system. I'm doing this on CentOS 6.5 right now, but I'm pretty sure the steps were the same for Ubuntu. There's an RPM package for RedHat/CentOS, but since the tgz should work on more systems, that's what I'm using here.

First, download the latest appropriate .tgz package for your system from http://www.hdfgroup.org/HDF5/release/obtain5.html – in this case it's http://www.hdfgroup.org/ftp/HDF5/current/bin/linux-x86_64/hdf5-1.8.13-linux-x86_64-shared.tar.gz

[lariosadd@hydra ~]$ wget http://www.hdfgroup.org/ftp/HDF5/current/bin/linux-x86_64/hdf5-1.8.13-linux-x86_64-shared.tar.gz
--2014-08-05 17:02:41--  http://www.hdfgroup.org/ftp/HDF5/current/bin/linux-x86_64/hdf5-1.8.13-linux-x86_64-shared.tar.gz
Resolving www.hdfgroup.org... 50.28.50.143
Connecting to www.hdfgroup.org|50.28.50.143|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 25636388 (24M) [application/x-gzip]
Saving to: “hdf5-1.8.13-linux-x86_64-shared.tar.gz”

100%[======================================>] 25,636,388  1.10M/s   in 23s     

2014-08-05 17:03:04 (1.08 MB/s) - “hdf5-1.8.13-linux-x86_64-shared.tar.gz” saved [25636388/25636388]

Make a place in the filesystem for the hdf5 tools to live:

[lariosadd@hydra ~]$ sudo mkdir -p /opt/hdf5
[lariosadd@hydra ~]$ cd /opt/hdf5

Extract the tools:

[lariosadd@hydra hdf5]$ sudo tar zxvf ~/hdf5-1.8.13-linux-x86_64-shared.tar.gz 
hdf5-1.8.13-linux-x86_64-shared/
hdf5-1.8.13-linux-x86_64-shared/bin/
hdf5-1.8.13-linux-x86_64-shared/bin/h5fc
[...]
hdf5-1.8.13-linux-x86_64-shared/COPYING
[lariosadd@hydra hdf5]$ 

Make a symbolic link “latest” to point to the latest (only, at this point) version installed:

[lariosadd@hydra hdf5]$ sudo ln -s hdf5-1.8.13-linux-x86_64-shared latest

Run the h5redeploy script to change the paths in a few scripts:

[lariosadd@hydra ~]$ cd /opt/hdf5/latest/bin/
[lariosadd@hydra bin]$ sudo ./h5redeploy 
Update the following tools because they are now installed at a new directory
h5cc:
   current setting="/mnt/scr1/pre-release/hdf5/v1813/thg-builds/koala"
   new     setting="/opt/hdf5/hdf5-1.8.13-linux-x86_64-shared"
h5fc:
   current setting="/mnt/scr1/pre-release/hdf5/v1813/thg-builds/koala"
   new     setting="/opt/hdf5/hdf5-1.8.13-linux-x86_64-shared"
h5c++:
   current setting="/mnt/scr1/pre-release/hdf5/v1813/thg-builds/koala"
   new     setting="/opt/hdf5/hdf5-1.8.13-linux-x86_64-shared"
Continue? (yes/no)
yes
Update h5cc ...
Update h5fc ...
Update h5c++ ...
[lariosadd@hydra bin]$ 

Add /opt/hdf5/latest/bin to the $PATH for connections after this point:

[lariosadd@hydra ~]$ echo 'export PATH=$PATH:/opt/hdf5/latest/bin' | sudo tee /etc/profile.d/hdf5.sh

Log out and back in, then check your path:

[lariosadd@hydra ~]$ echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/cuda/latest/bin:/home/lariosadd/bin:/opt/cuda/latest/bin:/opt/hdf5/latest/bin

Looks good, so see if it works, I guess?

[lariosadd@hydra ~]$ h5cc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[lariosadd@hydra ~]$ 

Navigation

The best way to find something here is to use the search box in the upper right or the site index link below.

Print/export
Mobile QR Link