Skip to content

Commit

Permalink
removed hard linking of HDF5 (#32)
Browse files Browse the repository at this point in the history
* switch to compiling with h5pcc
* reworked GitHub actions
  • Loading branch information
brtnfld authored Nov 14, 2024
1 parent 0cc42ca commit c15ada9
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 8 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
# as part of the job.
steps:
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4.1.7

- name: Update repository code
run: |
Expand All @@ -51,31 +51,31 @@ jobs:
echo "CC=mpicc" >> $GITHUB_ENV
echo "CPPFLAGS=-I/usr/include/hdf5/mpich" >> $GITHUB_ENV
echo "LDFLAGS=-L/usr/lib/x86_64-linux-gnu/hdf5/mpich" >> $GITHUB_ENV
echo "LIBS=-lhdf5" >> $GITHUB_ENV
- name: Install Dependencies (Linux--HDF5-develop)
if: matrix.hdf5 == 'develop'
run: |
# Use the newest stable gcc compiler
sudo apt-get install automake autoconf libtool libtool-bin
sudo apt-get install -qq mpich
echo "CC=mpicc" >> $GITHUB_ENV
##################################
# INSTALL HDF5 FROM SOURCE
##################################
git clone https://github.com/HDFGroup/hdf5.git
export HOME_DIR=$(echo ~)
cd hdf5
export HDF5_DIR=$PWD/hdf5
echo "HDF5_DIR=$HDF5_DIR" >> $GITHUB_ENV
./autogen.sh
./configure --enable-build-mode=debug --without-szlib --disable-fortran --disable-hl \
CC=mpicc ./configure --enable-build-mode=debug --without-szlib --disable-fortran --disable-hl \
--disable-tests --disable-tools \
--prefix=$HOME_DIR/hdf5 \
--prefix=$HDF5_DIR \
--enable-parallel
make -j 8 install
mydir="$PWD"
export HDF5_DIR=$mydir/hdf5/hdf5
echo "CPPFLAGS=-I$HOME_DIR/hdf5/include" >> $GITHUB_ENV
echo "LDFLAGS=-L$HOME_DIR/hdf5/lib" >> $GITHUB_ENV
echo "CC=$HDF5_DIR/bin/h5pcc" >> $GITHUB_ENV
##################################
# CONFIGURE (Autotools)
Expand Down
8 changes: 8 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,12 @@ AM_INIT_AUTOMAKE([foreign])

AC_CONFIG_FILES([Makefile src/Makefile])

# Checks for libraries.
PKG_CHECK_MODULES([uuid], [uuid],
[], [AC_MSG_ERROR([Could not find libuuid])])

# Checks for header files.
AC_CHECK_HEADER([uuid/uuid.h], [],
[AC_MSG_ERROR([Couldn't find uuid/uuid.h])])

AC_OUTPUT
21 changes: 21 additions & 0 deletions examples/hdf5-iotest.sm.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[DEFAULT]
version = 0
steps = 2
arrays = 4
rows = 32
columns = 128
process-rows = 4
process-columns = 1
# [weak, strong]
scaling = weak
# align along increment [bytes] boundaries
alignment-increment = 16777216
# minimum object size [bytes] to force alignment (0=all objects)
alignment-threshold = 0
# minimum metadata block allocation size [bytes]
meta-block-size = 2048
# [posix, core, mpi-io-uni]
single-process = mpi-io-uni
[CUSTOM]
hdf5-file = hdf5-iotest.sm.h5
csv-file = hdf5-iotest.sm.csv
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ dist_pkgdata_DATA = hdf5_iotest.ini combinator.sh
hdf5_iotest_SOURCES = configuration.c dataset.c hdf5_iotest.c ini.c read_test.c \
utils.c write_test.c

hdf5_iotest_LDADD = -lhdf5 -luuid
hdf5_iotest_LDADD = -luuid

0 comments on commit c15ada9

Please sign in to comment.