Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6ade2a8
cleaned up code. added mpicc/mpicpp & env. vars.
hyoklee Sep 23, 2021
c713131
Merge branch 'HDFGroup:main' into main
hyoklee Sep 23, 2021
f98c73c
Clean up code.
hyoklee Sep 23, 2021
f63d117
added adios2 VOL in vol-tests.
hyoklee Sep 24, 2021
9d9c4b6
Test vol-tests with cache VOL using GitHub Actions.
hyoklee Sep 24, 2021
6897dea
Add szip dependency.
hyoklee Sep 24, 2021
cd8b7bf
Turn off testing. Skip hdf5-hpc-io.
hyoklee Sep 26, 2021
3f81b38
Turn off testing. Skip hdf5-hpc-io.
hyoklee Sep 26, 2021
45737d8
Install openmpi by apt-get.
hyoklee Sep 27, 2021
decaf0f
Switch preferred repo to official one.
hyoklee Sep 28, 2021
8c5a8c6
Update spack.yml
hyoklee Sep 29, 2021
4401d16
Removed unused variable.
hyoklee Sep 29, 2021
779c630
OESS-155: Add GPU VFD package.
hyoklee Nov 18, 2021
f97898f
Merge pull request #2 from hyoklee/OESS-155-hdf5-vfd-gds
hyoklee Nov 18, 2021
1b27ed0
OESS-186: Test spack external find.
hyoklee Nov 24, 2021
f0db051
OESS-186: Test pre-defined external.
hyoklee Nov 25, 2021
89d4317
OESS-186: Add PATH environment variable.
hyoklee Nov 25, 2021
5a22665
Update vfd-gds.yml
hyoklee Nov 25, 2021
c29c2a4
Update vfd-gds.yml
hyoklee Nov 25, 2021
da78ae7
OESS-186: Test master branch.
hyoklee Nov 25, 2021
17897cc
OESS-186: Add export PATH.
hyoklee Nov 25, 2021
44cfbea
OESS-168: Install dependencies.
hyoklee Nov 26, 2021
39c91dc
OESS-186: Sync hdf5 with origin.
hyoklee Nov 26, 2021
ea5d70e
Merge branch 'main' of https://github.com/hyoklee/hdf-spack
hyoklee Nov 26, 2021
d8df9ea
OESS-186: Add apt update.
hyoklee Nov 26, 2021
171c9a9
Address @lrknox review for PR #12.
hyoklee Nov 26, 2021
2b1c006
OESS-186: Build with apt packages.
hyoklee Nov 26, 2021
86b63e4
Change the default version to 1.0.1.
hyoklee Dec 23, 2021
c021720
Update version for tar.gz package.
hyoklee Jan 5, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/spack-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@ jobs:
. ./spack/share/spack/setup-env.sh
spack repo add .
spack repo list
spack install hdf5-cmake
spack install hdf5-hpc-io
spack install hdf5-vol-tests+vol-cache
5 changes: 3 additions & 2 deletions .github/workflows/spack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ jobs:

- name: Run a multi-line script
run: |
sudo apt-get update -y
sudo apt-get install -y libopenmpi-dev
. ./spack/share/spack/setup-env.sh
spack repo add .
spack repo list
spack install hdf5-cmake
spack install hdf5-hpc-io
spack install hdf5-vol-async

42 changes: 42 additions & 0 deletions .github/workflows/vfd-gds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: VFD GDS

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install ninja-build automake autoconf cmake libtool libtool-bin libopenmpi-dev libpthread-stubs0-dev
- name: Install GDS/CUDA
run: |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /"
sudo apt-get -y update
sudo apt-get -y install cuda
- name: Checkout hdf-spack
uses: actions/checkout@v2
- name: Checkout spack
uses: actions/checkout@v2
with:
repository: spack/spack
path: ./spack
- name: Run a multi-line script
run: |
set
export PATH="/usr/local/cuda-11.5/bin:$PATH"
set
. ./spack/share/spack/setup-env.sh
spack repo add .
spack repo list
spack external find cuda
spack install hdf5-vfd-gds@master ^[email protected] ^[email protected]
36 changes: 36 additions & 0 deletions packages/hdf5-vfd-gds/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack import *

class Hdf5VfdGds(CMakePackage, CudaPackage):
"""This pacakge enables GPU Direct Storage Virtual File Driver in HDF5."""

# Package info
homepage = 'https://github.com/hpc-io/vfd-gds'
url = 'https://github.com/hpc-io/vfd-gds/archive/refs/tags/1.0.1.tar.gz'
git = 'https://github.com/hpc-io/vfd-gds.git'
maintainers = ['hyoklee', 'lrknox']

# Versions
version('master', branch='master')
version('1.0.1', sha256='00e125fd149561be991f41e883824de826d8add604aebccf103a4fb82d5faac2', default=True)
version('1.0.0', sha256='6b16105c7c49f13fc05784ee69b78d45fb159270c78d760689f9cd21e230ddd2')

# Dependencies
depends_on('cuda')
depends_on('[email protected]:')
depends_on('[email protected]:')


def cmake_args(self):
spec = self.spec

# CMake options
args = [
self.define('BUILD_TESTING', self.run_tests),
]

return args
26 changes: 20 additions & 6 deletions packages/hdf5-vol-async/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,20 @@ class Hdf5VolAsync(CMakePackage):
"""This package enables asynchronous IO in HDF5."""

homepage = "https://sdm.lbl.gov/"
# hpc-io hasn't accepted the pull request for CMakeLists.txt yet.
# git = "https://github.com/hpc-io/vol-async"
git = "https://github.com/hyoklee/vol-async"
git = "https://github.com/hpc-io/vol-async"
maintainers = ['hyoklee']

version('develop', branch='develop')
version('develop', branch='develop', preferred=True)
version('hyoklee.develop',
branch='develop',
git='https://github.com/hyoklee/vol-async')
version('local.develop', branch='develop',
git='file:///scr/hyoklee/src/vol-async')

depends_on('argobots@main')
# depends_on('hdf5-hpc-io')
depends_on('hdf5-cmake')
depends_on('hdf5-hpc-io')
# Use the following if you want to use HDFGroup/[email protected] instead.
# depends_on('[email protected]+mpi+threadsafe')

def cmake_args(self):
"""Populate cmake arguments for HDF5 VOL."""
Expand All @@ -27,6 +31,16 @@ def cmake_args(self):
args = [
'-DBUILD_SHARED_LIBS:BOOL=ON',
'-DBUILD_TESTING:BOOL=ON'
'-DCMAKE_C_COMPILER=mpicc',
'-DCMAKE_CXX_COMPILER=mpicxx',
]

return args


def setup_environment(self, spack_env, run_env):
spack_env.set('HDF5_PLUGIN_PATH', self.build_directory+'/lib')
spack_env.set('HDF5_VOL_CONNECTOR',
'async under_vol=0\;under_info={}')
spack_env.set('LD_PRELOAD', self.spec['argobots'].prefix+'/lib/libabt.so')

10 changes: 4 additions & 6 deletions packages/hdf5-vol-cache/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ class Hdf5VolCache(CMakePackage):
maintainers = ['hyoklee']

version('default', branch='develop')

# Set hdf5-cmake package option.
o_flt = '~zfp~mafisc~szip~zstd~blosc~bshuf~bitgroom'
o_vol = '~av~pv~cv'
o_par = '+mpi+threadsafe'
o = o_flt+o_vol+o_par
version('hyoklee.develop', branch='develop',
git='https://github.com/hyoklee/vol-cache.git', preferred=True)
version('local.develop', branch='develop',
git='file:///home/hyoklee/vol-cache')

depends_on('hdf5-vol-async')

Expand Down
2 changes: 0 additions & 2 deletions packages/hdf5-vol-external-passthrough/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ class Hdf5VolExternalPassthrough(CMakePackage):

def cmake_args(self):
"""Populate cmake arguments for HDF5 DAOS."""
spec = self.spec

args = [
'-DBUILD_SHARED_LIBS:BOOL=ON',
'-DBUILD_TESTING:BOOL=ON'
Expand Down
25 changes: 19 additions & 6 deletions packages/hdf5-vol-tests/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,34 @@ class Hdf5VolTests(CMakePackage):

maintainers = ['hyoklee']

version('master', preferred=True)
variant('vol-async', default=True, description='Enable async VOL')
version('master', commit='9a147d3')
version('hyoklee.master',
git='https://github.com/hyoklee/vol-tests', preferred=True)
version('local.master',
git='file:///Users/hyoklee/src/vol-tests')
variant('vol-async', default=False, description='Enable async VOL')
variant('vol-cache', default=False, description='Enable cache VOL')
variant('vol-external-passthrough', default=False,
description='Enable external pass-through VOL')

variant('async', default=True, description='Enable parallel tests.')
variant('parallel', default=True, description='Enable async API tests.')
variant('vol-log', default=False,
description='Enable log-based VOL')
variant('vol-adios2', default=False,
description='Enable ADIOS2 VOL')
variant('vol-rest', default=False,
description='Enable REST VOL')

variant('async', default=True, description='Enable async API tests.')
variant('parallel', default=True, description='Enable parallel tests.')
variant('part', default=True,
description='Enable building the main test executable.')
depends_on('szip', when='+parallel')
depends_on('szip')
depends_on('hdf5-vol-async', when='+vol-async')
depends_on('hdf5-vol-cache', when='+vol-cache')
depends_on('hdf5-vol-external-passthrough',
when='+vol-external-passthrough')
depends_on('hdf5-vol-log', when='+vol-log')
depends_on('adios2+shared+hdf5 ^[email protected]', when='+vol-adios2')
depends_on('hdf5-vol-rest', when='+vol-rest')

def cmake_args(self):
args = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ index dd2b171..629418a 100644
EQUIVALENCE (predef_types(6), H5T_NATIVE_INTEGER)
EQUIVALENCE (predef_types(7), H5T_NATIVE_REAL)
EQUIVALENCE (predef_types(8), H5T_NATIVE_DOUBLE)

1 change: 0 additions & 1 deletion packages/hdf5/h5public-skip-mpicxx.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
# include <mpi.h>
#ifndef MPI_FILE_NULL /*MPIO may be defined in mpi.h already */
# include <mpio.h>

42 changes: 29 additions & 13 deletions packages/hdf5/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ class Hdf5(CMakePackage):
maintainers = ['lrknox', 'brtnfld', 'byrnHDF', 'ChristopherHogan', 'epourmal',
'gheber', 'hyoklee', 'lkurz', 'soumagne']

tags = ['e4s']

test_requires_compiler = True

# The 'develop' version is renamed so that we could uninstall (or patch) it
Expand Down Expand Up @@ -91,13 +93,13 @@ class Hdf5(CMakePackage):
# The compiler wrappers (h5cc, h5fc, etc.) run 'pkg-config'.
depends_on('pkgconfig', type='run')

conflicts('api=v114', when='@1.6:1.12.99',
conflicts('api=v114', when='@1.6:1.12',
msg='v114 is not compatible with this release')
conflicts('api=v112', when='@1.6:1.10.99',
conflicts('api=v112', when='@1.6:1.10',
msg='v112 is not compatible with this release')
conflicts('api=v110', when='@1.6:1.8.99',
conflicts('api=v110', when='@1.6:1.8',
msg='v110 is not compatible with this release')
conflicts('api=v18', when='@1.6:1.6.99',
conflicts('api=v18', when='@1.6.0:1.6',
msg='v18 is not compatible with this release')

# The Java wrappers and associated libhdf5_java library
Expand Down Expand Up @@ -172,6 +174,13 @@ def patch(self):
'INTEGER(SIZE_T), INTENT(OUT) :: buf_size',
'fortran/src/H5Fff_F03.f90',
string=True, ignore_absent=True)
if self.run_tests:
# hdf5 has ~2200 CPU-intensive tests, some of them have races:
# Often, these loop endless(at least on one Xeon and one EPYC).
# testphdf5 fails indeterministic. This fixes finishing the tests
filter_file('REMOVE_ITEM H5P_TESTS',
'REMOVE_ITEM H5P_TESTS t_bigio t_shapesame testphdf5',
'testpar/CMakeTests.cmake')

# The parallel compiler wrappers (i.e. h5pcc, h5pfc, etc.) reference MPI
# compiler wrappers and do not need to be changed.
Expand All @@ -185,26 +194,33 @@ def url_for_version(self, version):
return url.format(version.up_to(2), version)

def flag_handler(self, name, flags):
spec = self.spec
cmake_flags = []

if name == "cflags":
cc_name = os.path.basename(self.compiler.cc)
if "clang" in cc_name or "gcc" in cc_name:
if spec.compiler.name in ['gcc', 'clang', 'apple-clang']:
# Quiet warnings/errors about implicit declaration of functions
# in C99:
cmake_flags.append("-Wno-implicit-function-declaration")
if self.spec.satisfies('@:1.8.12~shared'):
# Note that this flag will cause an error if building %nvhpc.
if spec.satisfies('@:1.8.12~shared'):
# More recent versions set CMAKE_POSITION_INDEPENDENT_CODE to
# True and build with PIC flags.
cmake_flags.append(self.compiler.cc_pic_flag)
elif name == 'cxxflags':
if self.spec.satisfies('@:1.8.12+cxx~shared'):
if spec.satisfies('@:1.8.12+cxx~shared'):
cmake_flags.append(self.compiler.cxx_pic_flag)
elif name == "fflags":
if self.spec.satisfies('@:1.8.12+fortran~shared'):
if spec.satisfies('%cce+fortran'):
# Cray compiler generates module files with uppercase names by
# default, which is not handled by the CMake scripts. The
# following flag forces the compiler to produce module files
# with lowercase names.
cmake_flags.append('-ef')
if spec.satisfies('@:1.8.12+fortran~shared'):
cmake_flags.append(self.compiler.fc_pic_flag)
elif name == "ldlibs":
if '+fortran %fj' in self.spec:
if '+fortran %fj' in spec:
cmake_flags.extend(['-lfj90i', '-lfj90f',
'-lfjsrcinfo', '-lelf'])

Expand Down Expand Up @@ -386,9 +402,9 @@ def ensure_parallel_compiler_wrappers(self):
# 1.10.6 and 1.12.0. The current develop versions do not produce 'h5pfc'
# at all. Here, we make sure that 'h5pfc' is available when Fortran and
# MPI support are enabled (only for versions that generate 'h5fc').
if self.spec.satisfies('@1.8.22:1.8.999,'
'1.10.6:1.10.999,'
'1.12.0:1.12.999,'
if self.spec.satisfies('@1.8.22:1.8,'
'1.10.6:1.10,'
'1.12.0:1.12,'
'develop:'
'+fortran+mpi'):
with working_dir(self.prefix.bin):
Expand Down
1 change: 0 additions & 1 deletion packages/hdf5/pre-c99-comments.patch
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,3 @@ index 9ce3524..3b4e5e7 100644
}

/*-------------------------------------------------------------------------