Skip to content

Commit

Permalink
switch to building HDF5 with CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
brtnfld committed Dec 5, 2024
1 parent 9da89c3 commit 14c0246
Showing 1 changed file with 56 additions and 60 deletions.
116 changes: 56 additions & 60 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ on:
# Allows to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
vol-async-hdf5-latest-Makefile:

###############################################
# Testing last version of the HDF5 1.14 series
###############################################

vol-async-hdf5-1.14-Makefile:
runs-on: ubuntu-latest
timeout-minutes: 60

Expand All @@ -27,12 +32,12 @@ jobs:
- name: Dependencies
run: |
sudo apt-get update
sudo apt-get install libtool libopenmpi-dev zlib1g-dev python3 cmake
sudo apt-get install libtool libopenmpi-dev zlib1g-dev python3
- name: Checkout latest HDF5 release
run: |
wget https://github.com/HDFGroup/hdf5/releases/latest/download/hdf5.tar.gz
tar xzf hdf5.tar.gz
wget https://github.com/HDFGroup/hdf5/releases/download/hdf5_1.14.5/hdf5-1.14.5.tar.gz
tar xzf hdf5-1.14.5.tar.gz
ln -sf hdf5-* hdf5
- name: Installation
Expand All @@ -44,19 +49,9 @@ jobs:
mkdir $HDF5_DIR
# Compile HDF5
cd $HDF5_DIR
cmake -G "Unix Makefiles" \
-DCMAKE_INSTALL_PREFIX=$PWD \
-DCMAKE_BUILD_TYPE="Release" \
-DHDF5_ENABLE_PARALLEL:BOOL=ON \
-DHDF5_ENABLE_THREADSAFE:BOOL=ON \
-DHDF5_ALLOW_UNSUPPORTEDA:BOOL=ON \
-DHDF5_TEST_API:BOOL=ON \
-DHDF5_TEST_API_ENABLE_ASYNC:BOOL=ON \
-HDF5_BUILD_HL_LIB=OFF \
-DBUILD_STATIC_LIBS=OFF \
..
cd hdf5
./configure --prefix=$HDF5_DIR --enable-parallel --enable-threadsafe --enable-unsupported \
--disable-tests --disable-hl --disable-fortran --disable-tools
make && make install
# Compile Argobots
Expand Down Expand Up @@ -111,7 +106,7 @@ jobs:
make check
date
vol-async-hdf5-develop-Makefile:
vol-async-hdf5-1.14-cmake:
runs-on: ubuntu-latest
timeout-minutes: 30

Expand All @@ -120,33 +115,34 @@ jobs:
uses: actions/[email protected]
with:
submodules: 'true'

- name: Checkout HDF5 latest
uses: actions/[email protected]
with:
repository: HDFGroup/hdf5
path: hdf5


- name: Dependencies
run: |
sudo apt-get update
sudo apt-get install libtool libopenmpi-dev zlib1g-dev python3
sudo apt-get install libtool libopenmpi-dev zlib1g-dev python3 cmake
- name: Checkout latest HDF5 release
run: |
wget https://github.com/HDFGroup/hdf5/releases/download/hdf5_1.14.5/hdf5-1.14.5.tar.gz
tar xzf hdf5-1.14.5.tar.gz
ln -sf hdf5-* hdf5
- name: Installation
run: |
mydir="$PWD"
export HDF5_DIR=$mydir/hdf5/install
export ABT_DIR=$mydir/argobots
export VOL_DIR=$mydir
export VOL_DIR=$mydir/vol-async/install
mkdir $HDF5_DIR
# Compile HDF5
cd hdf5
export HDF5_LIBTOOL=/usr/bin/libtoolize
./autogen.sh
./configure --prefix=$HDF5_DIR --enable-parallel --enable-threadsafe --enable-unsupported \
--disable-tests --disable-hl --disable-fortran --disable-tools
make && make install
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$HDF5_DIR -DHDF5_ENABLE_PARALLEL=ON -DHDF5_ENABLE_THREADSAFE=ON \
-DALLOW_UNSUPPORTED=ON -DBUILD_TESTING=OFF -DHDF5_BUILD_HL_LIB=OFF \
-DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_FORTRAN=OFF -DCMAKE_C_COMPILER=mpicc ..
make -j && make install
# Compile Argobots
cd $ABT_DIR
Expand All @@ -155,51 +151,47 @@ jobs:
make && make install
# Compile Asynchronous VOL connector
cd $VOL_DIR/src
tail -n 48 Makefile.summit > Makefile
make
pwd
cd ../
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$VOL_DIR -DCMAKE_C_COMPILER=mpicc ..
make && make install
- name: Compile and Test Vol-Async
run: |
# Compile vol-async tests
mydir="$PWD"
cd $mydir
cd test
echo $PWD
cd build
# Set Environmental Variables
export H5_DIR=$mydir/hdf5
export VOL_DIR=$mydir/
export VOL_DIR=$mydir/vol-async/install
export ABT_DIR=$mydir/argobots
export ASYNC_DIR=$mydir/src
export HDF5_DIR=$mydir/hdf5/install
export LD_LIBRARY_PATH=$VOL_DIR/src:$H5_DIR/install/lib:$ABT_DIR/lib:$LD_LIBRARY_PATH
export HDF5_PLUGIN_PATH="$VOL_DIR/src"
export LD_LIBRARY_PATH=$VOL_DIR/lib:$HDF5_DIR/install/lib:$ABT_DIR/lib:$LD_LIBRARY_PATH
export HDF5_PLUGIN_PATH="$VOL_DIR/lib"
export HDF5_VOL_CONNECTOR="async under_vol=0;under_info={}"
# Makefile
tail -n 47 Makefile.summit > Makefile
export LD_PRELOAD=$mydir/argobots/lib/libabt.so
make
date
# Run serial and parallel tests
make check
date
ctest -V
date
# Test with async VOL double buffering
cd ../src
sed -i "s/CFLAGS =/CFLAGS = -DENABLE_WRITE_MEMCPY=1 /g" ./Makefile
cat Makefile
# Test with async VOL write memcopy (double buffering)
cmake -DCMAKE_INSTALL_PREFIX=$VOL_DIR -DCMAKE_C_COMPILER=mpicc -DENABLE_WRITE_MEMCPY=ON ..
make clean
make
cd ../test
make && make install
date
make clean
make
make check
ctest -V
date
#################################################
# Testing with the HDF5 2.0+ series
# * Note: autools support was dropped in HDF5
#################################################

vol-async-hdf5-latest-cmake:
runs-on: ubuntu-latest
timeout-minutes: 30
Expand Down Expand Up @@ -281,6 +273,10 @@ jobs:
ctest -V
date
#######################################
# Testing using HDF5's "develop" branch
#######################################

vol-async-hdf5-develop-cmake:
runs-on: ubuntu-latest
timeout-minutes: 30
Expand Down

0 comments on commit 14c0246

Please sign in to comment.