HDF5-1.12.1 make check atomiticity test failure

I’m trying to install a parallel enabled version of hdf5 using openmpi on ubuntu 20.04, but the testphd5 is failing
with:

Atomicity Test Failed Process 1: read_buf[2047] is 0, should be 5

at which point it continues with some other checks and finally mpi exits:

===================================
***PHDF5 tests detected 1536 errors***
===================================
--------------------------------------------------------------------------
Primary job  terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
mpiexec detected that one or more processes exited with non-zero status, thus causing
the job to be terminated. The first process to do so was:

  Process name: [[21659,1],1]
  Exit code:    1
--------------------------------------------------------------------------
Command exited with non-zero status 1
3.23user 1.04system 0:02.51elapsed 170%CPU (0avgtext+0avgdata 250804maxresident)k
0inputs+23152outputs (2212major+155666minor)pagefaults 0swaps

The machine a large workstation with two Xeon 16 core nodes. Openmpi 3.1 version is 4.0.3-0ubuntu1. I’ve attached the check log: testphdf5.chklog (120.8 KB)

2 Likes

I had the same issue. I fixed it by passing the --enable-threadsafe flag to ./configure. Here’s my complete build script:

# https://github.com/HDFGroup/hdf5/blob/hdf5-1_13_1/release_docs/INSTALL_parallel
# https://docs.olcf.ornl.gov/software/python/parallel_h5py.html
# https://www.pism.io/docs/installation/parallel-io-libraries.html
# using ~/local/build/hdf5 as the build directory.
# Install HDF5 1.13.1 with parallel I/O in ~/local/hdf5,

version=1.13.1
prefix=$HOME/local/hdf5
build_dir=~/local/build/hdf5
hdf5_site=https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.13
url=${hdf5_site}/hdf5-${version}/src/hdf5-${version}.tar.gz

mkdir -p ${build_dir}
pushd ${build_dir}

wget -nc ${url}
tar xzf hdf5-${version}.tar.gz

pushd hdf5-${version}

CC=mpicc CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" ./configure \
  --enable-parallel \
  --enable-threadsafe \
  --prefix=${prefix} 2>&1 | tee hdf5_install.log

make clean
make all -j8 2>&1 | tee -a hdf5_install.log
make check 2>&1 | tee -a hdf5_install.log
make install -j8 2>&1 | tee -a hdf5_install.log
make check-install 2>&1 | tee -a hdf5_install.log

popd
popd

–enable-threadsafe isn’t going to work for us (Fedora) because we also build C++/Fortran or parallel versions, and that option is apparently incompatible with those.