HDF5 error when reading cross sections

Hello,

I am trying to install OpenMC for use on ALCF’s theta. I have successfully installed v0.12.2 with conda and from source (only the executable). However, for both installations I am running into a HDF5 read error during runtime:

         Copyright | 2011-2021 MIT and OpenMC contributors
           License | https://docs.openmc.org/en/latest/license.html
           Version | 0.12.2
          Git SHA1 | 37e74fb1e385478fdc25fdd0594b6f2cbb458d53
         Date/Time | 2022-01-20 23:32:03
    OpenMP Threads | 1

 Reading settings XML file...
 Reading cross sections XML file...
 Reading materials XML file...
 Reading geometry XML file...
 Reading Pu239 from /home/gchee/data/zip/endfb71_hdf5/Pu239.h5
HDF5-DIAG: Error detected in HDF5 (1.12.1) thread 1:
  #000: H5F.c line 620 in H5Fopen(): unable to open file
    major: File accessibility
    minor: Unable to open file
  #001: H5VLcallback.c line 3501 in H5VL_file_open(): failed to iterate over available VOL connector plugins
    major: Virtual Object Layer
    minor: Iteration failed
  #002: H5PLpath.c line 578 in H5PL__path_table_iterate(): can't iterate over plugins in plugin path '(null)'
    major: Plugin for dynamically loaded library
    minor: Iteration failed
  #003: H5PLpath.c line 620 in H5PL__path_table_iterate_process_path(): can't open directory: /gpfs/mira-home/gchee/openmc-env/lib/hdf5/plugin
    major: Plugin for dynamically loaded library
    minor: Can't open directory or file
  #004: H5VLcallback.c line 3351 in H5VL__file_open(): open failed
    major: Virtual Object Layer
    minor: Can't open object
  #005: H5VLnative_file.c line 97 in H5VL__native_file_open(): unable to open file
    major: File accessibility
    minor: Unable to open file
  #006: H5Fint.c line 1898 in H5F_open(): unable to lock the file

For the conda install, I load the miniconda-3 env on theta and then use conda install -c conda-forge openmc to install openmc. In my run script, I again add those environments before running the input file:

module load miniconda-3
conda activate /gpfs/mira-home/gchee/openmc-env
aprun -n 1 -N 1 --env OMP_NUM_THREADS=1 python jezebel.py

For the installation from source, I use the following commands to install it

module switch PrgEnv-intel PrgEnv-gnu
module load gcc
module load cray-mpich
module load cmake
module load cray-hdf5
export CRAYPE_LINK_TYPE=dynamic
export CRAY_ADD_RPATH=yes
export CXX=CC 
export CC=cc 
git clone https://github.com/openmc-dev/openmc.git
cd openmc
git checkout v0.12.2
mkdir build && cd build
cmake ..
make -j 16

This is what my bashrc looks like:
export OPENMC_CROSS_SECTIONS="/home/gchee/data/zip/endfb71_hdf5/cross_sections.xml" export PATH="/home/gchee/github/openmc/build/bin:$PATH"

Let me know if you have any ideas about why HDF5 is throwing this read error.

Thanks,
Gwen

1 Like

Hey @gwenchee. I’ve hit this one before so just had to look back at my notes. On Theta /home is a GPFS filesystem which evidently doesn’t implement flock, thereby causing problems for HDF5. There are two ways around this:

  1. Move your HDF5 libraries to /projects/, which is a Lustre filesystem. In fact, I have that particular library at /projects/CSC249ADSE08/endfb71_hdf5 (should be world-readable) that you can use directly.
  2. You can also try export HDF5_USE_FILE_LOCKING=FALSE
1 Like

export HDF5_USE_FILE_LOCKING=FALSE works for me! Also, seems like /projects/CSC249ADSE08/endfb71_hdf5 isn’t readable for me.

Thanks for your help @paulromano :slight_smile: