building NetCDF with parallel I/O and shared libraries
Building netCDF for parallel I/O requires some effort, but it's worth it!
I used the mpich2 library. The Fedora repository distribution of mpich2 is broken with respect to shared libraries (apparently a known bug). So I installed from source, getting the mpic2 tarball here: http://www.mcs.anl.gov/research/projects/mpich2/downloads/tarballs/1.3.2p1/mpich2-1.3.2p1.tar.gz.
Mpich2 does not, apparently, use libtool, because it would not build shared libraries for me, until I set CFLAGS=-fPIC myself.
It was also required to set -fPIC for the zlib build to get shared zlib libraries. Then I built HDF5 with --enable-shared --enable-parallel and got a shared build of the HDF5 libraries.
With all that done, the netCDF snapshot release builds and tests cleanly. No special configure options are required - it detects that HDF5 was build with --enable-parallel and builds in parallel I/O. I do have to set CC=mpicc to call the MPI compiler wrapping script.
All this was needed because a recent switch to shared builds by default was breaking parallel builds on my main test machine, which was built with static-only parallel HDF5 and mpich2 libraries.
Add new comment