Subject: Re: [bug#32732] [PATCH] gnu: hdf5-parallel-openmpi: Really enable parallel build.

From: [email-masked] (Ludovic Courtès)
Date: Sun, 16 Sep 2018 23:00:22 +0200

Hi Paul,

Paul Garlick <[email-masked]> 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’.