GNU bug report logs - #32732
[PATCH] gnu: hdf5-parallel-openmpi: Really enable parallel build.

Previous Next

Package: guix-patches;

Reported by: Paul Garlick <pgarlick <at> tourbillion-technology.com>

Date: Thu, 13 Sep 2018 20:08:02 UTC

Severity: normal

Tags: patch

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 32732 in the body.
You can then email your comments to 32732 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#32732; Package guix-patches. (Thu, 13 Sep 2018 20:08:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Paul Garlick <pgarlick <at> tourbillion-technology.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 13 Sep 2018 20:08:05 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
To: guix-patches <at> gnu.org
Cc: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Subject: [PATCH] gnu: hdf5-parallel-openmpi: Really enable parallel build.
Date: Thu, 13 Sep 2018 21:03:25 +0100
This fix ensures that the H5_HAVE_PARALLEL identifier is correctly set
in the file H5pubconf.h.

* gnu/packages/maths.scm (hdf5-parallel-openmpi)[arguments]: Add
the "--enable-parallel" flag to the list of configure flags.  Remove
the incompatible "--enable-cxx" flag.  Add 'mpi-setup' phase.  Replace
the 'split' phase, omitting the references to the h5fc script which is
not present.
---
 gnu/packages/maths.scm | 38 +++++++++++++++++++++++++++++++++++---
 1 file changed, 35 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index af41093..85d3884 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1034,10 +1034,13 @@ Swath).")
      `(("mpi" ,openmpi)
        ,@(package-inputs hdf5)))
     (arguments
-     (substitute-keyword-arguments `(#:configure-flags '("--enable-parallel")
-                                     ,@(package-arguments hdf5))
+     (substitute-keyword-arguments (package-arguments hdf5)
+       ((#:configure-flags flags)
+        ``("--enable-parallel" ,@(delete "--enable-cxx" ,flags)))
        ((#:phases phases)
         `(modify-phases ,phases
+           (add-after 'build 'mpi-setup
+	     ,%openmpi-setup)
            (add-before 'check 'patch-tests
              (lambda _
                ;; OpenMPI's mpirun will exit with non-zero status if it
@@ -1051,7 +1054,36 @@ Swath).")
                   (string-append front back "\n")))
                (substitute* "tools/h5diff/testph5diff.sh"
                  (("/bin/sh") (which "sh")))
-               #t))))))
+               #t))
+           (replace 'split
+              (lambda* (#:key inputs outputs #:allow-other-keys)
+                ;; Move all fortran-related files
+                (let* ((out (assoc-ref outputs "out"))
+                       (bin (string-append out "/bin"))
+                       (lib (string-append out "/lib"))
+                       (inc (string-append out "/include"))
+                       (ex (string-append out "/share/hdf5_examples/fortran"))
+                       (fort (assoc-ref outputs "fortran"))
+                       (flib (string-append fort "/lib"))
+                       (finc (string-append fort "/include"))
+                       (fex (string-append fort "/share/hdf5_examples/fortran")))
+                  (mkdir-p flib)
+                  (mkdir-p finc)
+                  (mkdir-p fex)
+                  (for-each (lambda (file)
+                              (rename-file file
+                                           (string-append flib "/" (basename file))))
+                            (find-files lib ".*fortran.*"))
+                  (for-each (lambda (file)
+                              (rename-file file
+                                           (string-append finc "/" (basename file))))
+                            (find-files inc ".*mod"))
+                  (for-each (lambda (file)
+                              (rename-file file
+                                           (string-append fex "/" (basename file))))
+                            (find-files ex ".*"))
+                  (delete-file-recursively ex))
+                #t))))))
     (synopsis "Management suite for data with parallel IO support")))
 
 (define-public h5check
-- 
1.8.3.1





Information forwarded to guix-patches <at> gnu.org:
bug#32732; Package guix-patches. (Sun, 16 Sep 2018 21:01:01 GMT) Full text and rfc822 format available.

Message #8 received at 32732 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Cc: 32732 <at> debbugs.gnu.org
Subject: Re: [bug#32732] [PATCH] gnu: hdf5-parallel-openmpi: Really enable
 parallel build.
Date: Sun, 16 Sep 2018 23:00:22 +0200
Hi Paul,

Paul Garlick <pgarlick <at> tourbillion-technology.com> skribis:

> This fix ensures that the H5_HAVE_PARALLEL identifier is correctly set
> in the file H5pubconf.h.
>
> * gnu/packages/maths.scm (hdf5-parallel-openmpi)[arguments]: Add
> the "--enable-parallel" flag to the list of configure flags.  Remove
> the incompatible "--enable-cxx" flag.  Add 'mpi-setup' phase.  Replace
> the 'split' phase, omitting the references to the h5fc script which is
> not present.

Good catch!

> +           (replace 'split
> +              (lambda* (#:key inputs outputs #:allow-other-keys)
> +                ;; Move all fortran-related files

Instead of duplicating the whole phase minus the h5fc bit, what about
changing the phase in ‘hdf5’ so that it does:

                ;; Note: When built with --enable-parallel, the 'h5fc' file
                ;; doesn't exist, hence this condition.
                (when (file-exists? (string-append bin "/h5fc"))
                  (rename-file (string-append bin "/h5fc")
                               (string-append fbin "/h5fc")))

That way, no need to touch the ‘split’ phase in
‘hdf5-parallel-openmpi’.

If that’s fine with you, could you send an updated patch?

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#32732; Package guix-patches. (Thu, 20 Sep 2018 18:02:01 GMT) Full text and rfc822 format available.

Message #11 received at 32732 <at> debbugs.gnu.org (full text, mbox):

From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
To: 32732 <at> debbugs.gnu.org,
	ludo <at> gnu.org
Cc: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Subject: [PATCH 1/2] gnu: hdf5: Allow for absence of utility script.
Date: Thu, 20 Sep 2018 18:59:56 +0100
* gnu/packages/maths.scm (hdf5)[arguments]: Add condition to 'split'
phase to check for existence of h5fc script.
---
 gnu/packages/maths.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 736bac1..30f1610 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -814,8 +814,11 @@ incompatible with HDF5.")
                 (mkdir-p flib)
                 (mkdir-p finc)
                 (mkdir-p fex)
-                (rename-file (string-append bin "/h5fc")
-                             (string-append fbin "/h5fc"))
+                ;; Note: When built with --enable-parallel, the 'h5fc' file
+                ;; doesn't exist, hence this condition.
+                (when (file-exists? (string-append bin "/h5fc"))
+                  (rename-file (string-append bin "/h5fc")
+                               (string-append fbin "/h5fc")))
                 (for-each (lambda (file)
                             (rename-file file
                                          (string-append flib "/" (basename file))))
-- 
1.8.3.1





Information forwarded to guix-patches <at> gnu.org:
bug#32732; Package guix-patches. (Thu, 20 Sep 2018 18:03:02 GMT) Full text and rfc822 format available.

Message #14 received at 32732 <at> debbugs.gnu.org (full text, mbox):

From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
To: 32732 <at> debbugs.gnu.org,
	ludo <at> gnu.org
Cc: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Subject: [PATCH 2/2] gnu: hdf5-parallel-openmpi: Really enable parallel build.
Date: Thu, 20 Sep 2018 18:59:57 +0100
This fix ensures that the H5_HAVE_PARALLEL identifier is correctly set
in the file H5pubconf.h.

* gnu/packages/maths.scm (hdf5-parallel-openmpi)[arguments]: Add
the "--enable-parallel" flag to the list of configure flags.  Remove
the incompatible "--enable-cxx" flag.  Add 'mpi-setup' phase.
---
 gnu/packages/maths.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 30f1610..636b485 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1037,10 +1037,13 @@ Swath).")
      `(("mpi" ,openmpi)
        ,@(package-inputs hdf5)))
     (arguments
-     (substitute-keyword-arguments `(#:configure-flags '("--enable-parallel")
-                                     ,@(package-arguments hdf5))
+     (substitute-keyword-arguments (package-arguments hdf5)
+       ((#:configure-flags flags)
+        ``("--enable-parallel" ,@(delete "--enable-cxx" ,flags)))
        ((#:phases phases)
         `(modify-phases ,phases
+           (add-after 'build 'mpi-setup
+             ,%openmpi-setup)
            (add-before 'check 'patch-tests
              (lambda _
                ;; OpenMPI's mpirun will exit with non-zero status if it
-- 
1.8.3.1





Information forwarded to guix-patches <at> gnu.org:
bug#32732; Package guix-patches. (Fri, 21 Sep 2018 01:08:02 GMT) Full text and rfc822 format available.

Message #17 received at 32732 <at> debbugs.gnu.org (full text, mbox):

From: Eric Bavier <ericbavier <at> centurylink.net>
To: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Cc: ludo <at> gnu.org, 32732 <at> debbugs.gnu.org
Subject: Re: [bug#32732] [PATCH 2/2] gnu: hdf5-parallel-openmpi: Really
 enable parallel build.
Date: Thu, 20 Sep 2018 20:07:13 -0500
[Message part 1 (text/plain, inline)]
On Thu, 20 Sep 2018 18:59:57 +0100
Paul Garlick <pgarlick <at> tourbillion-technology.com> wrote:

> This fix ensures that the H5_HAVE_PARALLEL identifier is correctly set
> in the file H5pubconf.h.
> 
> * gnu/packages/maths.scm (hdf5-parallel-openmpi)[arguments]: Add
> the "--enable-parallel" flag to the list of configure flags.  Remove
> the incompatible "--enable-cxx" flag.  Add 'mpi-setup' phase.
> ---

LGTM!  Thanks!

BTW, I'm working on creating a package for hdf5 version 1.10.3.  There
are a couple packages, and maybe users, that still need 1.8, so I'm
adding it separately.

`~Eric
[Message part 2 (application/pgp-signature, inline)]

Reply sent to ludo <at> gnu.org (Ludovic Courtès):
You have taken responsibility. (Mon, 24 Sep 2018 12:21:02 GMT) Full text and rfc822 format available.

Notification sent to Paul Garlick <pgarlick <at> tourbillion-technology.com>:
bug acknowledged by developer. (Mon, 24 Sep 2018 12:21:02 GMT) Full text and rfc822 format available.

Message #22 received at 32732-done <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Cc: 32732-done <at> debbugs.gnu.org
Subject: Re: [bug#32732] [PATCH 2/2] gnu: hdf5-parallel-openmpi: Really enable
 parallel build.
Date: Mon, 24 Sep 2018 14:20:39 +0200
Paul Garlick <pgarlick <at> tourbillion-technology.com> skribis:

> This fix ensures that the H5_HAVE_PARALLEL identifier is correctly set
> in the file H5pubconf.h.
>
> * gnu/packages/maths.scm (hdf5-parallel-openmpi)[arguments]: Add
> the "--enable-parallel" flag to the list of configure flags.  Remove
> the incompatible "--enable-cxx" flag.  Add 'mpi-setup' phase.

Pushed a few days ago as 45201bf245856954cb8368c328e54773a0a81156.

Thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 23 Oct 2018 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 158 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.