HDF5 1.12.2 parallel (impi) installation

export VER=1.12.2
rm -r hdf5-$VER
zcat hdf5-$VER.tar.gz | tar -xvf -

echo "unpacked hdf5-"$VER
echo "Press ENTER to continue";read aaa

module load intel/2022.2
module load impi/2021.6

export COMPILER=intel.22
export CC=mpiicc
export CXX=mpiicpc
export F77=mpiifort
export FC=mpiifort

export COMPOPT="-fPIC -O3 -qopt-zmm-usage=high -march=skylake-avx512 -xskylake-avx512 -mtune=skylake-avx512 -mcmodel=medium -fargument-noalias-global -fp-model precise -shared-inte
l"
export COMPOPT="-fPIC -O2"

export SLURM_CPU_BIND=none   
export I_MPI_HYDRA_TOPOLIB=ipl
export I_MPI_HYDRA_BRANCH_COUNT=-1
export I_MPI_EXTRA_FILESYSTEM=1
export I_MPI_EXTRA_FILESYSTEM_FORCE=lustre

export BUILDDIR=hdf5-$VER
cd $BUILDDIR

parentdir="$(dirname "$(pwd)")"
echo "building in "$BUILDDIR

export PREFIX=/sw/dataformats/hdf5-parallel/impi.21/$COMPILER/$VER/skl
echo "building for "$PREFIX
echo "Press ENTER to configure";read aaa
export SZIP=$PREFIX
export LD_RUN_PATH=$PREFIX/lib:$LIBRARY_PATH

export CFLAGS="  $COMPOPT -align -Wl,-rpath=$LD_RUN_PATH"
export CXXFLAGS="$COMPOPT -align -Wl,-rpath=$LD_RUN_PATH"
export FCFLAGS=" $COMPOPT -assume nostd_value -align array64byte -Wl,-rpath=$LD_RUN_PATH"
#export LDLAGS="-O3 -fPIC"

#Set to true to make sure taht it is really switched off
export HDF5_USE_FILE_LOCKING=FALSE

../hdf5-$VER/configure --prefix=$PREFIX --with-szlib=$SZIP --with-pic \
         --enable-build-mode=production \
         --enable-parallel \
         --disable-file-locking
         --enable-direct-vfd \
#         --enable-file-locking --enable-recursive-rw-locks
#         --enable-direct-vfd --enable-mirror-vfd \
#          --enable-optimization=high \
#         --enable-threadsafe --enable-unsupported \

echo "Press ENTER to run make";read aaa
make -j8 | tee comp.out
echo "Press ENTER to run make check";read aaa
make -i check | tee check.out 2>&1  
echo "Press ENTER to run make install";read aaa
make install
echo "Do not forget to run make clean!"