diff options
author | Tiziano Müller <dev-zero@gentoo.org> | 2014-08-11 07:15:24 +0000 |
---|---|---|
committer | Tiziano Müller <dev-zero@gentoo.org> | 2014-08-11 07:15:24 +0000 |
commit | d08244469cfc25831ab29d4c5d0110db2ec5ead4 (patch) | |
tree | 71662e905a3112cf000da0df92b285ff63a68d6b /sci-libs/netcdf | |
parent | bump; add IUSE doc, drop arm keyword to enable addition of doc deps, add doc ... (diff) | |
download | gentoo-2-d08244469cfc25831ab29d4c5d0110db2ec5ead4.tar.gz gentoo-2-d08244469cfc25831ab29d4c5d0110db2ec5ead4.tar.bz2 gentoo-2-d08244469cfc25831ab29d4c5d0110db2ec5ead4.zip |
Pull patch from upstream to use HDF5 >=1.8.13 with MPI (bug #512502).
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 0x1A5D023975B0583D!)
Diffstat (limited to 'sci-libs/netcdf')
-rw-r--r-- | sci-libs/netcdf/ChangeLog | 8 | ||||
-rw-r--r-- | sci-libs/netcdf/files/netcdf-4.3.2-HDF5-1.8.13+-compat.patch | 145 | ||||
-rw-r--r-- | sci-libs/netcdf/netcdf-4.3.2-r1.ebuild | 59 |
3 files changed, 211 insertions, 1 deletions
diff --git a/sci-libs/netcdf/ChangeLog b/sci-libs/netcdf/ChangeLog index 97b1e8d15e7e..e2f66142f669 100644 --- a/sci-libs/netcdf/ChangeLog +++ b/sci-libs/netcdf/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sci-libs/netcdf # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/netcdf/ChangeLog,v 1.114 2014/06/16 20:06:02 jauhien Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/netcdf/ChangeLog,v 1.115 2014/08/11 07:15:23 dev-zero Exp $ + +*netcdf-4.3.2-r1 (11 Aug 2014) + + 11 Aug 2014; Tiziano Müller <dev-zero@gentoo.org> + +files/netcdf-4.3.2-HDF5-1.8.13+-compat.patch, +netcdf-4.3.2-r1.ebuild: + Pull patch from upstream to use HDF5 >=1.8.13 with MPI (bug #512502). 16 Jun 2014; Jauhien Piatlicki <jauhien@gentoo.org> netcdf-4.1.3.ebuild, netcdf-4.2.1.1.ebuild, netcdf-4.3.0.ebuild, netcdf-4.3.1.1.ebuild, diff --git a/sci-libs/netcdf/files/netcdf-4.3.2-HDF5-1.8.13+-compat.patch b/sci-libs/netcdf/files/netcdf-4.3.2-HDF5-1.8.13+-compat.patch new file mode 100644 index 000000000000..783a5b06e991 --- /dev/null +++ b/sci-libs/netcdf/files/netcdf-4.3.2-HDF5-1.8.13+-compat.patch @@ -0,0 +1,145 @@ +From 435d8a03ed28bb5ad63aff12cbc6ab91531b6bc8 Mon Sep 17 00:00:00 2001 +From: Quincey Koziol <quincey@koziol.cc> +Date: Wed, 7 May 2014 08:45:15 -0500 +Subject: [PATCH] Account for the HDF5 library not having the MPI-POSIX VFD + configured in. + +--- + RELEASE_NOTES.md | 2 ++ + libsrc4/nc4file.c | 40 ++++++++++++++++++++++++++++++++++++++++ + nc_test4/tst_nc4perf.c | 5 +++++ + nc_test4/tst_parallel3.c | 5 +++++ + 4 files changed, 52 insertions(+) + +diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md +index 27f228c..1a69d17 100644 +--- a/RELEASE_NOTES.md ++++ b/RELEASE_NOTES.md +@@ -9,6 +9,8 @@ This file contains a high-level description of this package's evolution. Release + + ### 4.3.3-rc1 Released TBD + ++* When the NC_MPIPOSIX flag is given for parallel I/O access and the HDF5 library does not have the MPI-POSIX VFD configured in, the NC_MPIPOSIX flag is transparently aliased to the NC_MPIIO flag within the netCDF-4 library. ++ + ## 4.3.2 Released 2014-04-23 + + * As part of an ongoing project, the Doxygen-generated netcdf documentation has been reorganized. The goal is to make the documentation easier to parse, and to eliminate redundant material. This project is ongoing. +diff --git a/libsrc4/nc4file.c b/libsrc4/nc4file.c +index ec3bb0c..5c957be 100644 +--- a/libsrc4/nc4file.c ++++ b/libsrc4/nc4file.c +@@ -308,12 +308,21 @@ nc4_create_file(const char *path, int cmode, MPI_Comm comm, MPI_Info info, + if (H5Pset_fapl_mpio(fapl_id, comm, info) < 0) + BAIL(NC_EPARINIT); + } ++#ifdef USE_PARALLEL_POSIX + else /* MPI/POSIX */ + { + LOG((4, "creating parallel file with MPI/posix")); + if (H5Pset_fapl_mpiposix(fapl_id, comm, 0) < 0) + BAIL(NC_EPARINIT); + } ++#else /* USE_PARALLEL_POSIX */ ++ /* Should not happen! Code in NC4_create/NC4_open should alias the ++ * NC_MPIPOSIX flag to NC_MPIIO, if the MPI-POSIX VFD is not ++ * available in HDF5. -QAK ++ */ ++ else /* MPI/POSIX */ ++ BAIL(NC_EPARINIT); ++#endif /* USE_PARALLEL_POSIX */ + + /* Keep copies of the MPI Comm & Info objects */ + if (MPI_SUCCESS != MPI_Comm_dup(comm, &nc4_info->comm)) +@@ -465,6 +474,17 @@ NC4_create(const char* path, int cmode, size_t initialsz, int basepe, + ) + return NC_EINVAL; + ++#ifndef USE_PARALLEL_POSIX ++/* If the HDF5 library has been compiled without the MPI-POSIX VFD, alias ++ * the NC_MPIPOSIX flag to NC_MPIIO. -QAK ++ */ ++ if(cmode & NC_MPIPOSIX) ++ { ++ cmode &= ~NC_MPIPOSIX; ++ cmode |= NC_MPIIO; ++ } ++#endif /* USE_PARALLEL_POSIX */ ++ + cmode |= NC_NETCDF4; + + /* Apply default create format. */ +@@ -2168,12 +2188,21 @@ nc4_open_file(const char *path, int mode, MPI_Comm comm, + if (H5Pset_fapl_mpio(fapl_id, comm, info) < 0) + BAIL(NC_EPARINIT); + } ++#ifdef USE_PARALLEL_POSIX + else /* MPI/POSIX */ + { + LOG((4, "opening parallel file with MPI/posix")); + if (H5Pset_fapl_mpiposix(fapl_id, comm, 0) < 0) + BAIL(NC_EPARINIT); + } ++#else /* USE_PARALLEL_POSIX */ ++ /* Should not happen! Code in NC4_create/NC4_open should alias the ++ * NC_MPIPOSIX flag to NC_MPIIO, if the MPI-POSIX VFD is not ++ * available in HDF5. -QAK ++ */ ++ else /* MPI/POSIX */ ++ BAIL(NC_EPARINIT); ++#endif /* USE_PARALLEL_POSIX */ + + /* Keep copies of the MPI Comm & Info objects */ + if (MPI_SUCCESS != MPI_Comm_dup(comm, &nc4_info->comm)) +@@ -2640,6 +2669,17 @@ NC4_open(const char *path, int mode, int basepe, size_t *chunksizehintp, + (mode & NC_MPIIO && mode & NC_MPIPOSIX)) + return NC_EINVAL; + ++#ifndef USE_PARALLEL_POSIX ++/* If the HDF5 library has been compiled without the MPI-POSIX VFD, alias ++ * the NC_MPIPOSIX flag to NC_MPIIO. -QAK ++ */ ++ if(mode & NC_MPIPOSIX) ++ { ++ mode &= ~NC_MPIPOSIX; ++ mode |= NC_MPIIO; ++ } ++#endif /* USE_PARALLEL_POSIX */ ++ + + /* Depending on the type of file, open it. */ + +diff --git a/nc_test4/tst_nc4perf.c b/nc_test4/tst_nc4perf.c +index 47af70e..3528b82 100644 +--- a/nc_test4/tst_nc4perf.c ++++ b/nc_test4/tst_nc4perf.c +@@ -244,6 +244,11 @@ int test_pio_4d(size_t cache_size, int facc_type, int access_flag, MPI_Comm comm + return 0; + } + ++/* Note: When the MPI-POSIX VFD is not compiled in to HDF5, the NC_MPIPOSIX ++ * flag will be aliased to the NC_MPIIO flag within the library, and ++ * therefore this test will exercise the aliasing, with the MPI-IO VFD, ++ * under that configuration. -QAK ++ */ + #define NUM_MODES 2 + #define NUM_FACC 2 + #define NUM_CHUNK_COMBOS_2D 3 +diff --git a/nc_test4/tst_parallel3.c b/nc_test4/tst_parallel3.c +index 27f9c98..9fa534f 100644 +--- a/nc_test4/tst_parallel3.c ++++ b/nc_test4/tst_parallel3.c +@@ -129,6 +129,11 @@ int main(int argc, char **argv) + if (mpi_rank == 0) + SUMMARIZE_ERR; + ++/* Note: When the MPI-POSIX VFD is not compiled in to HDF5, the NC_MPIPOSIX ++ * flag will be aliased to the NC_MPIIO flag within the library, and ++ * therefore this test will exercise the aliasing, with the MPI-IO VFD, ++ * under that configuration. -QAK ++ */ + if (mpi_rank == 0) + printf("*** Testing parallel IO for raw-data with MPIPOSIX-IO (driver)..."); + facc_type = NC_NETCDF4|NC_MPIPOSIX; +-- +2.0.3 + diff --git a/sci-libs/netcdf/netcdf-4.3.2-r1.ebuild b/sci-libs/netcdf/netcdf-4.3.2-r1.ebuild new file mode 100644 index 000000000000..3155d923c1f6 --- /dev/null +++ b/sci-libs/netcdf/netcdf-4.3.2-r1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/netcdf/netcdf-4.3.2-r1.ebuild,v 1.1 2014/08/11 07:15:23 dev-zero Exp $ + +EAPI=5 + +inherit autotools-utils + +DESCRIPTION="Scientific library and interface for array oriented data access" +HOMEPAGE="http://www.unidata.ucar.edu/software/netcdf/" +SRC_URI="ftp://ftp.unidata.ucar.edu/pub/netcdf/${P}.tar.gz" + +LICENSE="UCAR-Unidata" +SLOT="0/7" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="+dap examples hdf +hdf5 mpi static-libs szip test tools" + +RDEPEND=" + dap? ( net-misc/curl:0= ) + hdf? ( sci-libs/hdf:0= sci-libs/hdf5:0= ) + hdf5? ( sci-libs/hdf5:0=[mpi=,szip=,zlib] )" +DEPEND="${RDEPEND}" +# doc generation is missing many doxygen files in tar ball +# doc? ( app-doc/doxygen[dot] )" + +REQUIRED_USE="test? ( tools ) szip? ( hdf5 ) mpi? ( hdf5 )" + +PATCHES=( "${FILESDIR}/${P}-HDF5-1.8.13+-compat.patch" ) + +src_configure() { + # --docdir="${EPREFIX}"/usr/share/doc/${PF} + # $(use_enable doc doxygen) + local myeconfargs=( + --disable-examples + --disable-dap-remote-tests + $(use_enable dap) + $(use_enable hdf hdf4) + $(use_enable hdf5 netcdf-4) + $(use_enable tools utilities) + ) + if use mpi; then + export CC=mpicc + myeconfargs+=( --enable-parallel ) + use test && myeconfargs+=( --enable-parallel-tests ) + fi + autotools-utils_src_configure +} + +src_test() { + autotools-utils_src_test -j1 +} + +src_install() { + autotools-utils_src_install + if use examples; then + insinto /usr/share/doc/${PF} + doins -r examples + fi +} |