guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#32818] [PATCH] gnu: Add petsc-mumps-openmpi.


From: Eric Bavier
Subject: [bug#32818] [PATCH] gnu: Add petsc-mumps-openmpi.
Date: Tue, 25 Sep 2018 08:14:50 -0500

On Mon, 24 Sep 2018 11:32:44 +0100
Paul Garlick <address@hidden> wrote:

> * gnu/packages/maths.scm (petsc-mumps-openmpi): New variable.
> ---
>  gnu/packages/maths.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 42 insertions(+)
> 
> diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
> index 736bac1..b2fff54 100644
> --- a/gnu/packages/maths.scm
> +++ b/gnu/packages/maths.scm
> @@ -1724,6 +1724,48 @@ scientific applications modeled by partial 
> differential equations.")
>             ,@(delete "--with-mpi=0" ,cf)))))
>      (synopsis "Library to solve PDEs (with complex scalars and MPI 
> support)")))
>  
> +(define-public petsc-mumps-openmpi
> +  (package (inherit petsc-openmpi)
> +    (name "petsc-mumps-openmpi")
> +    (inputs
> +     `(("metis" ,metis)
> +       ("mumps" ,mumps-openmpi)
> +       ("scalapack" ,scalapack)
> +       ("scotch" ,pt-scotch)
> +       ,@(package-inputs petsc-openmpi)))

I don't see why we'd add this as a new package, rather than simply
adjust the capabilities/inputs of the "petsc-openmpi" package.

> +    (arguments
> +     (substitute-keyword-arguments (package-arguments petsc-openmpi)
> +       ((#:configure-flags cf)
> +        ``(,(string-append "--with-metis-include="
> +                           (assoc-ref %build-inputs "metis") "/include")
> +           ,(string-append "--with-metis-lib="
> +                           (assoc-ref %build-inputs "metis") "/lib/"
> +                           "libmetis.so")
> +           ,(string-append "--with-mumps-include="
> +                           (assoc-ref %build-inputs "mumps") "/include")
> +           ,(string-append "--with-mumps-lib=["
> +                           (assoc-ref %build-inputs "mumps") "/lib/"
> +                           "libdmumps.a,"
> +                           "libzmumps.a,"
> +                           "libsmumps.a,"
> +                           "libcmumps.a,"
> +                           "libmumps_common.a,"
> +                           "libpord.a]")
> +           ,(string-append "--with-scalapack-lib="
> +                           (assoc-ref %build-inputs "scalapack") "/lib/"
> +                           "libscalapack.so")
> +           ,(string-append "--with-ptscotch-include="
> +                           (assoc-ref %build-inputs "scotch") "/include")
> +           ,(string-append "--with-ptscotch-lib=["
> +                           (assoc-ref %build-inputs "scotch") "/lib/"
> +                           "libesmumps.a,"
> +                           "libscotch.a,"
> +                           "libscotcherr.a,"
> +                           "libptesmumps.a,"
> +                           "libptscotch.a,"
> +                           "libptscotcherr.a]")

I believe PETSc's configure script will handle much of the flags on its
own if it's provided with "--with-metis", "--with-scotch",
"--with-mumps", "--with-scalapack" flags.

I have not tried building this yet, but I will give it a try later.

`~Eric

Attachment: pgpK91mLSDDO7.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]