Child pages
  • Mox_hdf5
Skip to end of metadata
Go to start of metadata

Below abc is your userid and xyz is your  hyak group.

On your desktop or laptop:

(1) Go to the HDF5 web-site and register:

(2) Click on downloads

Download  hdf5-1.10.5-linux-centos7-x86_64-shared.tar.gz  (You may download a latter version than 1.10.5)

(3) sftp

     mkdir /gscratch/xyz/abc/hdf5install

     put hdf5-1.10.5-linux-centos7-x86_64-shared.tar.gz

On mox:

1)  srun -p build --time 2:00:00 --pty /bin/bash

2) tar -xvf *.gz

3) cd *shared

read the README file for how to use this version of hdf5

You must add the HDF5 library path to the LD_LIBRARY_PATH environment variable.

For example:

export LD_LIBRARY_PATH=/gscratch/xyz/abc/hdf5install/hdf5-1.10.5-linux-centos7-x86_64-shared/lib:$LD_LIBRARY_PATH 

Compiling using a Makefile

If you are using a Makefile then inside your Makefile you should have lines similar to below:

FFLAGS = -O3 -fp-model source -I/gscratch/xyz/abc/hdf5install/hdf5-1.10.5-linux-centos7-x86_64-shared/include

LDFLAGS = -L/usr/lib64 -L/gscratch/xyz/abc/hdf5install/hdf5-1.10.5-linux-centos7-x86_64-shared/lib -lhdf5

Now you can run make.

Compiling at command line

If you are compiling your code at the command line then you should issue commands similar to below commands:

export FFLAGS = -O3 -fp-model source -I/gscratch/xyz/abc/hdf5install/hdf5-1.10.5-linux-centos7-x86_64-shared/include

export LDFLAGS = -L/usr/lib64 -L/gscratch/xyz/abc/hdf5install/hdf5-1.10.5-linux-centos7-x86_64-shared/lib -lhdf5

Now you can run the compiler.


(1) The "-O3 -fp-model source" and "-L/usr/lib64" can be replaced by your choice of compiler and linker flags.

(2) More details on compilimng are at below link:

  • No labels