From 458d98e20157b7ec2d2b8c24903dfd9a139c9130 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 26 Nov 2018 20:58:11 -0700 Subject: [PATCH] Update to 1.10.5 --- .gitignore | 5 ++ hdf5-ldouble-ppc64le.patch | 75 --------------------------- hdf5-warning.patch | 76 +++++++++++++++++++++++++++ hdf5.spec | 102 ++++++++++++++++++++----------------- sources | 4 +- 5 files changed, 138 insertions(+), 124 deletions(-) delete mode 100644 hdf5-ldouble-ppc64le.patch create mode 100644 hdf5-warning.patch diff --git a/.gitignore b/.gitignore index d7d6f80..6633521 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,8 @@ hdf5-1.8.5.tar.bz2 /hdf5_1.8.16+docs-8.debian.tar.xz /hdf5-1.8.18.tar.bz2 /hdf5-1.8.20.tar.bz2 +/hdf5-1.10.3.tar.bz2 +/hdf5_1.10.2+repack-1~exp1.debian.tar.xz +/hdf5-1.10.4.tar.bz2 +/hdf5_1.10.4+repack-1.debian.tar.xz +/hdf5-1.10.5.tar.bz2 diff --git a/hdf5-ldouble-ppc64le.patch b/hdf5-ldouble-ppc64le.patch deleted file mode 100644 index dc97f6c..0000000 --- a/hdf5-ldouble-ppc64le.patch +++ /dev/null @@ -1,75 +0,0 @@ -diff -up hdf5-1.8.16/configure.ac.ldouble-ppc64le hdf5-1.8.16/configure.ac ---- hdf5-1.8.16/configure.ac.ldouble-ppc64le 2015-11-13 09:29:08.749125801 -0700 -+++ hdf5-1.8.16/configure.ac 2015-11-13 09:47:02.705174991 -0700 -@@ -2278,6 +2278,13 @@ else - unsigned char s2[8]; - int ret = 1; - -+#if defined __powerpc64__ && defined _LITTLE_ENDIAN -+ /* Don't bother checking on ppc64le, we know it'll work, and -+ * that what hdf5 calls 'special algorithm' simply is -+ * IBM ldouble 128 (i.e. two seperately scaled doubles). -+ * The check below assumes big endian. */ -+ ret = 0; -+#endif - if(sizeof(long double) == 16 && sizeof(long) == 8) { - /*make sure the long double type has 16 bytes in size and - * 11 bits of exponent. If it is, -@@ -2355,6 +2362,13 @@ else - unsigned char s[16]; - int flag=0, ret=1; - -+#if defined __powerpc64__ && defined _LITTLE_ENDIAN -+ /* Don't bother checking on ppc64le, we know it'll work, and -+ * that what hdf5 calls 'special algorithm' simply is -+ * IBM ldouble 128 (i.e. two seperately scaled doubles). -+ * The check below assumes big endian. */ -+ ret = 0; -+#endif - /*Determine if long double has 16 byte in size, 11 bit exponent, and - *the bias is 0x3ff */ - if(sizeof(long double) == 16) { -diff -up hdf5-1.8.16/configure.ldouble-ppc64le hdf5-1.8.16/configure -diff -up hdf5-1.8.16/test/dt_arith.c.ldouble-ppc64le hdf5-1.8.16/test/dt_arith.c ---- hdf5-1.8.16/test/dt_arith.c.ldouble-ppc64le 2015-10-23 23:13:43.000000000 -0600 -+++ hdf5-1.8.16/test/dt_arith.c 2015-11-13 09:29:08.765125707 -0700 -@@ -3010,7 +3010,18 @@ test_conv_flt_1 (const char *name, int r - buf, saved, nelmts); - #if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0 - } else if(src_type == FLT_LDOUBLE) { -- INIT_FP_SPECIAL(src_size, src_nbits, sendian, LDBL_MANT_DIG, dst_size, -+ size_t mant_dig = LDBL_MANT_DIG; -+ if (mant_dig >= src_nbits) { -+ /* This happens for IBM long double in little endian. -+ The macro LDBL_MANT_DIG says 106 mantissa bits, but the -+ HDF5 detection code actually represents it as a normal 64bit -+ double (52 bit mantissa) with the upper double being -+ unspec bits (which is sort of okay as the testsuite -+ wouldn't deal with that format correctly anyway). So -+ override the mantissa size. */ -+ mant_dig = 52; -+ } -+ INIT_FP_SPECIAL(src_size, src_nbits, sendian, mant_dig, dst_size, - buf, saved, nelmts); - #endif - } else -@@ -3663,7 +3674,18 @@ test_conv_int_fp(const char *name, int r - INIT_FP_DENORM(long double, LDBL_MANT_DIG, src_size, src_nbits, sendian, dst_size, - buf, saved, nelmts); - } else { -- INIT_FP_SPECIAL(src_size, src_nbits, sendian, LDBL_MANT_DIG, dst_size, buf, saved, nelmts); -+ size_t mant_dig = LDBL_MANT_DIG; -+ if (mant_dig >= src_nbits) { -+ /* This happens for IBM long double in little endian. -+ The macro LDBL_MANT_DIG says 106 mantissa bits, but the -+ HDF5 detection code actually represents it as a normal 64bit -+ double (52 bit mantissa) with the upper double being -+ unspec bits (which is sort of okay as the testsuite -+ wouldn't deal with that format correctly anyway). So -+ override the mantissa size. */ -+ mant_dig = 52; -+ } -+ INIT_FP_SPECIAL(src_size, src_nbits, sendian, mant_dig, dst_size, buf, saved, nelmts); - } - #endif - } else diff --git a/hdf5-warning.patch b/hdf5-warning.patch new file mode 100644 index 0000000..a4c8197 --- /dev/null +++ b/hdf5-warning.patch @@ -0,0 +1,76 @@ +diff -up hdf5-1.10.4/testpar/t_cache.c.warning hdf5-1.10.4/testpar/t_cache.c +--- hdf5-1.10.4/testpar/t_cache.c.warning 2018-09-10 08:43:41.000000000 -0600 ++++ hdf5-1.10.4/testpar/t_cache.c 2018-11-24 08:08:37.333832898 -0700 +@@ -79,8 +79,8 @@ long local_pins = 0; + + + /* the following fields are used by the server process only */ +-int total_reads = 0; +-int total_writes = 0; ++unsigned total_reads = 0; ++unsigned total_writes = 0; + + + /***************************************************************************** +@@ -175,8 +175,8 @@ struct datum + hbool_t local_pinned; + hbool_t cleared; + hbool_t flushed; +- int reads; +- int writes; ++ unsigned reads; ++ unsigned writes; + int index; + struct H5AC_aux_t * aux_ptr; + }; +@@ -2197,7 +2197,7 @@ serve_entry_reads_request(struct mssg_t + reply.base_addr = target_addr; + reply.len = 0; + reply.ver = 0; +- reply.count = (long)(data[target_index].reads); ++ reply.count = data[target_index].reads; + reply.magic = MSSG_MAGIC; + } + } +@@ -2446,12 +2446,12 @@ static herr_t + datum_image_len(const void *thing, size_t *image_len) + { + int idx; +- struct datum * entry_ptr; ++ const struct datum * entry_ptr; + + HDassert( thing ); + HDassert( image_len ); + +- entry_ptr = (struct datum *)thing; ++ entry_ptr = (const struct datum *)thing; + + idx = addr_to_datum_index(entry_ptr->base_addr); + +@@ -4615,7 +4615,7 @@ verify_entry_reads(haddr_t addr, + int expected_entry_reads) + { + hbool_t success = TRUE; +- int reported_entry_reads; ++ unsigned reported_entry_reads = 0; + struct mssg_t mssg; + + if ( success ) { +@@ -4722,7 +4722,7 @@ verify_entry_writes(haddr_t addr, + int expected_entry_writes) + { + hbool_t success = TRUE; +- int reported_entry_writes; ++ unsigned reported_entry_writes = 0; + struct mssg_t mssg; + + if ( success ) { +@@ -4827,7 +4827,7 @@ static hbool_t + verify_total_reads(int expected_total_reads) + { + hbool_t success = TRUE; /* will set to FALSE if appropriate. */ +- long reported_total_reads; ++ unsigned reported_total_reads; + struct mssg_t mssg; + + if ( success ) { diff --git a/hdf5.spec b/hdf5.spec index 19abd5b..100be08 100644 --- a/hdf5.spec +++ b/hdf5.spec @@ -6,24 +6,21 @@ # NOTE: Try not to release new versions to released versions of Fedora # You need to recompile all users of HDF5 for each version change Name: hdf5 -Version: 1.8.20 -Release: 6%{?dist} +Version: 1.10.5 +Release: 1%{?dist} Summary: A general purpose library and file format for storing scientific data License: BSD URL: https://portal.hdfgroup.org/display/HDF5/HDF5 -Source0: https://support.hdfgroup.org/ftp/HDF5/current18/src/hdf5-%{version}%{?snaprel}.tar.bz2 +Source0: https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-%{version}/src/hdf5-%{version}.tar.bz2 Source1: h5comp # For man pages -Source2: http://ftp.us.debian.org/debian/pool/main/h/hdf5/hdf5_1.8.16+docs-8.debian.tar.xz +Source2: http://ftp.us.debian.org/debian/pool/main/h/hdf5/hdf5_1.10.4+repack-1.debian.tar.xz Patch0: hdf5-LD_LIBRARY_PATH.patch # Properly run MPI_Finalize() in t_pflush1 Patch1: hdf5-mpi.patch -# Fix compilation with -Werror=implicit-function-declaration -Patch2: hdf5-implicit.patch -# Fix long double conversions on ppc64le -# https://bugzilla.redhat.com/show_bug.cgi?id=1078173 -Patch3: hdf5-ldouble-ppc64le.patch +# Fix some warnings +Patch2: hdf5-warning.patch BuildRequires: krb5-devel, openssl-devel, zlib-devel, gcc-gfortran, time # For patches/rpath @@ -152,9 +149,8 @@ HDF5 parallel openmpi static libraries %prep %setup -q -a 2 -n %{name}-%{version}%{?snaprel} %patch0 -p1 -b .LD_LIBRARY_PATH -%patch1 -p1 -b .mpi -%patch2 -p1 -b .implicit -%patch3 -p1 -b .ldouble-ppc64le +#patch1 -p1 -b .mpi +%patch2 -p1 -b .warning # Force shared by default for compiler wrappers (bug #1266645) sed -i -e '/^STATIC_AVAILABLE=/s/=.*/=no/' */*/h5[cf]*.in @@ -225,69 +221,65 @@ done %install %make_install -C build -rm $RPM_BUILD_ROOT%{_libdir}/*.la +rm %{buildroot}%{_libdir}/*.la #Fortran modules -mkdir -p ${RPM_BUILD_ROOT}%{_fmoddir} -mv ${RPM_BUILD_ROOT}%{_includedir}/*.mod ${RPM_BUILD_ROOT}%{_fmoddir} +mkdir -p %{buildroot}%{_fmoddir} +mv %{buildroot}%{_includedir}/*.mod %{buildroot}%{_fmoddir} for mpi in %{?mpi_list} do module load mpi/$mpi-%{_arch} - make -C $mpi install DESTDIR=${RPM_BUILD_ROOT} - rm $RPM_BUILD_ROOT/%{_libdir}/$mpi/lib/*.la + make -C $mpi install DESTDIR=%{buildroot} + rm %{buildroot}/%{_libdir}/$mpi/lib/*.la #Fortran modules - mkdir -p ${RPM_BUILD_ROOT}${MPI_FORTRAN_MOD_DIR} - mv ${RPM_BUILD_ROOT}%{_includedir}/${mpi}-%{_arch}/*.mod ${RPM_BUILD_ROOT}${MPI_FORTRAN_MOD_DIR}/ + mkdir -p %{buildroot}${MPI_FORTRAN_MOD_DIR} + mv %{buildroot}%{_includedir}/${mpi}-%{_arch}/*.mod %{buildroot}${MPI_FORTRAN_MOD_DIR}/ module purge done #Fixup example permissions -find ${RPM_BUILD_ROOT}%{_datadir} \( -name '*.[ch]*' -o -name '*.f90' \) -exec chmod -x {} + +find %{buildroot}%{_datadir} \( -name '*.[ch]*' -o -name '*.f90' \) -exec chmod -x {} + #Fixup headers and scripts for multiarch %ifarch x86_64 ppc64 ia64 s390x sparc64 alpha -sed -i -e s/H5pubconf.h/H5pubconf-64.h/ ${RPM_BUILD_ROOT}%{_includedir}/H5public.h -mv ${RPM_BUILD_ROOT}%{_includedir}/H5pubconf.h \ - ${RPM_BUILD_ROOT}%{_includedir}/H5pubconf-64.h +sed -i -e s/H5pubconf.h/H5pubconf-64.h/ %{buildroot}%{_includedir}/H5public.h +mv %{buildroot}%{_includedir}/H5pubconf.h \ + %{buildroot}%{_includedir}/H5pubconf-64.h for x in h5c++ h5cc h5fc do - mv ${RPM_BUILD_ROOT}%{_bindir}/${x} \ - ${RPM_BUILD_ROOT}%{_bindir}/${x}-64 - install -m 0755 %SOURCE1 ${RPM_BUILD_ROOT}%{_bindir}/${x} + mv %{buildroot}%{_bindir}/${x} \ + %{buildroot}%{_bindir}/${x}-64 + install -m 0755 %SOURCE1 %{buildroot}%{_bindir}/${x} done %else -sed -i -e s/H5pubconf.h/H5pubconf-32.h/ ${RPM_BUILD_ROOT}%{_includedir}/H5public.h -mv ${RPM_BUILD_ROOT}%{_includedir}/H5pubconf.h \ - ${RPM_BUILD_ROOT}%{_includedir}/H5pubconf-32.h +sed -i -e s/H5pubconf.h/H5pubconf-32.h/ %{buildroot}%{_includedir}/H5public.h +mv %{buildroot}%{_includedir}/H5pubconf.h \ + %{buildroot}%{_includedir}/H5pubconf-32.h for x in h5c++ h5cc h5fc do - mv ${RPM_BUILD_ROOT}%{_bindir}/${x} \ - ${RPM_BUILD_ROOT}%{_bindir}/${x}-32 - install -m 0755 %SOURCE1 ${RPM_BUILD_ROOT}%{_bindir}/${x} + mv %{buildroot}%{_bindir}/${x} \ + %{buildroot}%{_bindir}/${x}-32 + install -m 0755 %SOURCE1 %{buildroot}%{_bindir}/${x} done %endif # rpm macro for version checking -mkdir -p ${RPM_BUILD_ROOT}%{macrosdir} -cat > ${RPM_BUILD_ROOT}%{macrosdir}/macros.hdf5 < %{buildroot}%{macrosdir}/macros.hdf5 < - 1.10.5-1 +- Update to 1.10.5 + * Thu Feb 14 2019 Orion Poplawski - 1.8.20-6 - Rebuild for openmpi 3.1.3 diff --git a/sources b/sources index 11ed3f3..54ddbfb 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (hdf5-1.8.20.tar.bz2) = 288e4772a946d406de9096843c92dd6874a0753ed6fbe859aaadf565aa0509fc612ebdb00c301b7955bc0dc63e45f3a224c6b2638f480fe6738ee0c96a993c6e -SHA512 (hdf5_1.8.16+docs-8.debian.tar.xz) = 03a7d08966952e382d4990ef37be3e475e99066b9e12199800fa1c8d5f2665ca64c26d73ef1c712738d6885c3673eac4691c2c0e2682d539fb2bfad21dac4559 +SHA512 (hdf5-1.10.5.tar.bz2) = 769e43b8672e26fe24ed68da0228c010d3d9bc950ca09f0bc60707911a2f26f2f8415c8abc8ec06e07667148d8cdb3b0c7b3e7860d9b19739629c5dfd5ce73d4 +SHA512 (hdf5_1.10.4+repack-1.debian.tar.xz) = 7e08a79c8e96b843331e30d027628065ccbe72843a3ac525ad52d506238d328b9ebae57eff772b6215419943fd1804b4879cbdcd612e2f2c160c65a3d44ef965