Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Building the parallel OpenMPI-HDF5-NetCDF stack

Parallel OpenMPI-HDF5-NetCDF stack


Instructions for building the OpenMPI-HDF5-NetCDF stack with parallel I/O from source, using the Intel Compiler suite.

Valid for the following packages:

  • openmpi-2.1.1
  • hdf5-1.8.19
  • netcdf-
  • netcdf-fortran-4.4.4


  • zlib


Set OPENMPI, HDF5, and NETCDF to appropriate install directories.

Building openmpi

export OPENMPI=/path/to/install/directory
CC=icc CXX=icpc FC=ifort ./configure --prefix=$OPENMPI
make && make install
export PATH=$OPENMPI/bin:$PATH

Building HDF5

export HDF5=/path/to/install/directory
CC=mpicc FC=mpif90 CFLAGS=-fPIC ./configure --enable-shared --enable-parallel --enable-fortran --enable-fortran2003 --prefix=$HDF5
make && make install

Building NetCDF-C

export NETCDF=/path/to/install/directory
CC=mpicc LDFLAGS=-L$HDF5/lib LIBS=-lhdf5 CPPFLAGS=-I$HDF5/include ./configure --prefix=$NETCDF
make && make install

Building NetCDF-Fortran

CC=mpicc FC=mpif90 LDFLAGS=-L$NETCDF/lib CPPFLAGS=-I$NETCDF/include LIBS=-lnetcdf ./configure --prefix=$NETCDF --enable-parallel-tests
make && make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment