libhio: add libhio package to spack (#7468)

spack brought out some configury/make issues with
libhio, so some patches come along for the ride.

Signed-off-by: Howard Pritchard <howardp@lanl.gov>
This commit is contained in:
Howard Pritchard 2018-03-28 19:20:46 -06:00 committed by Adam J. Stewart
parent 4c6199923e
commit cdd3f76bd1
3 changed files with 118 additions and 6 deletions

View file

@ -0,0 +1,38 @@
From 3a7b7432a7354661d0a971b074c30529f5db457c Mon Sep 17 00:00:00 2001
From: Howard Pritchard <howardp@lanl.gov>
Date: Sat, 10 Mar 2018 13:51:41 -0800
Subject: [PATCH] configury: fix a problem with bz2 configury
turns out by default spack wants to use a non-default
location bz2, or we have to turn it off. either way
the bz2 configury is wrong and needs to be fixed.
Signed-off-by: Howard Pritchard <howardp@lanl.gov>
diff --git a/m4/hio_check_bz2.m4 b/m4/hio_check_bz2.m4
index 3a373ad1..b7dfdb75 100644
--- a/m4/hio_check_bz2.m4
+++ b/m4/hio_check_bz2.m4
@@ -1,9 +1,9 @@
# -*- mode: shell-script -*-
-# Copyright 2015-2016 Los Alamos National Security, LLC. All rights
+# Copyright 2015-2018 Los Alamos National Security, LLC. All rights
# reserved.
AC_DEFUN([HIO_CHECK_BZ2],[
- AC_ARG_WITH(bz2, [AS_HELP_STRING([--with-external-bz2=PATH],
+ AC_ARG_WITH(external-bz2, [AS_HELP_STRING([--with-external_bz2=PATH],
[use external bzip2. pass yes to use default version @<:@default=no@:>@])],
[], [with_external_bz2=no])
@@ -14,6 +14,7 @@ AC_DEFUN([HIO_CHECK_BZ2],[
else
LDFLAGS="$LDFLAGS -L$with_external_bz2/lib64"
fi
+ LIBS="$LIBS -lbz2"
fi
AC_CHECK_LIB([bz2],[BZ2_bzBuffToBuffCompress],[hio_have_bz2=1])
--
2.4.0.rc3.16.g0ab00b9

View file

@ -0,0 +1,37 @@
From 6aec1b94fe84f2fe3a82e3ff338fd4721c84db34 Mon Sep 17 00:00:00 2001
From: Howard Pritchard <howardp@lanl.gov>
Date: Mon, 12 Mar 2018 14:19:28 -0700
Subject: [PATCH] hdf5: make docs optional
With the current makefile, configuring in hdf5
hio plugin always ends up trying to generate docs.
Make generating hdf5/hio plugin docs optional with
make docs
Signed-off-by: Howard Pritchard <howardp@lanl.gov>
diff --git a/hdf5-hio/Makefile.am b/hdf5-hio/Makefile.am
index e4c93b77..1733866d 100644
--- a/hdf5-hio/Makefile.am
+++ b/hdf5-hio/Makefile.am
@@ -1,6 +1,6 @@
# -*- Makefile.am -*-
#
-# Copyright (c) 2014-2016 Los Alamos National Security, LLC. All rights
+# Copyright (c) 2014-2018 Los Alamos National Security, LLC. All rights
# reserved.
# $COPYRIGHT$
#
@@ -11,7 +11,7 @@
ACLOCAL_AMFLAGS=-I m4
-SUBDIRS = src test doc
+SUBDIRS = src test
EXTRA_DIST =
DISTCLEANFILES =
--
2.4.0.rc3.16.g0ab00b9

View file

@ -22,20 +22,57 @@
# License along with this program; if not, write to the Free Software # License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
from spack import * from spack import *
class Libhio(AutotoolsPackage): class Libhio(AutotoolsPackage):
""" """libHIO is a flexible, high-performance parallel IO package developed
A library for writing to hierarchical data store systems. at LANL. libHIO supports IO to either a conventional PFS or to Cray
DataWarp with management of Cray DataWarp space and stage-in and
stage-out from and to the PFS.
""" """
homepage = "https://github.com/hpc/libhio/" homepage = "https://github.com/hpc/libhio"
url = "https://github.com/hpc/libhio/releases/download/hio.1.3.0.1/libhio-1.3.0.1.tar.gz" url = "https://github.com/hpc/libhio/releases/download/hio.1.4.1.0/libhio-1.4.1.0.tar.bz2"
version('1.4.0.0', 'a223effbfd50efd452053e6954e3ccf5') #
version('1.3.0.1', 'c073541de8dd70aeb8878bd00d6d877f') # We don't include older versions since they are missing features
# needed by current and future consumers of libhio
#
version('1.4.1.0', '6ef566fd8cf31fdcd05fab01dd3fae44')
#
# main users of libhio thru spack will want to use HFDF5 plugin,
# so make hdf5 variant a default
#
variant('hdf5', default=True, description='Enable HDF5 support')
depends_on("json-c") depends_on("json-c")
depends_on("bzip2") depends_on("bzip2")
depends_on("pkgconfig", type="build") depends_on("pkgconfig", type="build")
depends_on('mpi')
#
# libhio depends on hdf5+mpi if hdf5 is being used since it
# autodetects the presence of an MPI and/or uses mpicc by default to build
depends_on('hdf5+mpi', when='+hdf5')
#
# wow, we need to patch libhio
#
patch('0001-configury-fix-a-problem-with-bz2-configury.patch', when="@1.4.1.0")
patch('0001-hdf5-make-docs-optional.patch', when="@1.4.1.0")
def autoreconf(self, spec, prefix):
autoreconf = which('autoreconf')
autoreconf('-ifv')
def configure_args(self):
spec = self.spec
args = []
args.append('--with-external_bz2={0}'.format(spec['bzip2'].prefix))
if '+hdf5' in spec:
args.append('--with-hdf5={0}'.format(spec['hdf5'].prefix))
return args