unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#32818] [PATCH] gnu: Add petsc-mumps-openmpi.
@ 2018-09-24 10:32 Paul Garlick
  2018-09-24 12:33 ` Ludovic Courtès
  2018-09-25 13:14 ` Eric Bavier
  0 siblings, 2 replies; 11+ messages in thread
From: Paul Garlick @ 2018-09-24 10:32 UTC (permalink / raw)
  To: 32818; +Cc: Paul Garlick

* 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)))
+    (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]")
+           ,@,cf))))
+    (synopsis "Library to solve PDEs (with MUMPS and MPI support)")))
 
 (define-public python-kiwisolver
   (package
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#32818] [PATCH] gnu: Add petsc-mumps-openmpi.
  2018-09-24 10:32 [bug#32818] [PATCH] gnu: Add petsc-mumps-openmpi Paul Garlick
@ 2018-09-24 12:33 ` Ludovic Courtès
  2018-09-24 16:09   ` Paul Garlick
  2018-09-25 13:14 ` Eric Bavier
  1 sibling, 1 reply; 11+ messages in thread
From: Ludovic Courtès @ 2018-09-24 12:33 UTC (permalink / raw)
  To: Paul Garlick; +Cc: 32818

Hi,

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

> * gnu/packages/maths.scm (petsc-mumps-openmpi): New variable.

On current master (e72702475da2379e10ca09e724e10a9bceceef1b), it fails
like this:

--8<---------------cut here---------------start------------->8---
TESTING: checkDependencies from config.packages.PTScotch(/tmp/guix-build-petsc-mumps-openmpi-3.9.3.drv-0/petsc-3.9.3/config/BuildSystem/config/package.py:721)
TESTING: configureLibrary from config.packages.PTScotch(/tmp/guix-build-petsc-mumps-openmpi-3.9.3.drv-0/petsc-3.9.3/config/BuildSystem/config/package.py:746)
TESTING: check from config.libraries(/tmp/guix-build-petsc-mumps-openmpi-3.9.3.drv-0/petsc-3.9.3/config/BuildSystem/config/libraries.py:155)
*******************************************************************************
         UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log for details):
-------------------------------------------------------------------------------
--with-ptscotch-lib=['/gnu/store/rnbax3lpgai4mg6hgxp9j80jkxhavini-pt-scotch-6.0.5a/lib/libesmumps.a', 'libscotch.a', 'libscotcherr.a', 'libptesmumps.a', 'libptscotch.a', 'libptscotcherr.a'] and 
--with-ptscotch-include=['/gnu/store/rnbax3lpgai4mg6hgxp9j80jkxhavini-pt-scotch-6.0.5a/include'] did not work
*******************************************************************************
--8<---------------cut here---------------end--------------->8---

Any ideas?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [bug#32818] [PATCH] gnu: Add petsc-mumps-openmpi.
  2018-09-24 12:33 ` Ludovic Courtès
@ 2018-09-24 16:09   ` Paul Garlick
  0 siblings, 0 replies; 11+ messages in thread
From: Paul Garlick @ 2018-09-24 16:09 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 32818

Hi Ludo,

> On current master (e72702475da2379e10ca09e724e10a9bceceef1b), it
> fails

That's curious.  The build is succeeding for me (on today's
commit 5c8031f...).

The configure.log should help.  The last error reported is the one to
look for.  For me, the path to a previous failed-build log file was:

/tmp/guix-build-petsc-mumps-openmpi-3.9.3.drv-6/petsc-3.9.3/arch-
linux2-c-debug/lib/petsc/conf/configure.log

My build commands are:

$ ./pre-inst-env guix environment --pure petsc-mumps-openmpi --ad-hoc
guile-gcrypt guile-git 

$ GUILE_LOAD_PATH=$GUIX_ENVIRONMENT/share/guile/site/2.2 ./pre-inst-env 
guix build -K petsc-mumps-openmpi

Can you see in your configure.log a clue, such as 'undefined
reference', near to the end?  

Best regards,

Paul.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [bug#32818] [PATCH] gnu: Add petsc-mumps-openmpi.
  2018-09-24 10:32 [bug#32818] [PATCH] gnu: Add petsc-mumps-openmpi Paul Garlick
  2018-09-24 12:33 ` Ludovic Courtès
@ 2018-09-25 13:14 ` Eric Bavier
  2018-09-25 13:40   ` Paul Garlick
  2018-09-25 15:28   ` [bug#32818] [PATCH] gnu: Add petsc-mumps-openmpi Paul Garlick
  1 sibling, 2 replies; 11+ messages in thread
From: Eric Bavier @ 2018-09-25 13:14 UTC (permalink / raw)
  To: Paul Garlick; +Cc: 32818

[-- Attachment #1: Type: text/plain, Size: 3089 bytes --]

On Mon, 24 Sep 2018 11:32:44 +0100
Paul Garlick <pgarlick@tourbillion-technology.com> 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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [bug#32818] [PATCH] gnu: Add petsc-mumps-openmpi.
  2018-09-25 13:14 ` Eric Bavier
@ 2018-09-25 13:40   ` Paul Garlick
  2018-09-26  3:54     ` Eric Bavier
  2018-09-25 15:28   ` [bug#32818] [PATCH] gnu: Add petsc-mumps-openmpi Paul Garlick
  1 sibling, 1 reply; 11+ messages in thread
From: Paul Garlick @ 2018-09-25 13:40 UTC (permalink / raw)
  To: Eric Bavier; +Cc: 32818

Hi Eric,

> 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.

Yes, that was my Plan A.  However, I spotted that the package dealii-
openmpi has petsc-openmpi as an input but also mumps-metis-openmpi,
instead of mumps-openmpi.  If the mumps configuration in petsc-mumps-
openmpi is included in petsc-openmpi then dealii-openmpi may not build.
 WDYT?

> 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.

This would be handy for sure.  I will give it a try.

Best regards,

Paul.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [bug#32818] [PATCH] gnu: Add petsc-mumps-openmpi.
  2018-09-25 13:14 ` Eric Bavier
  2018-09-25 13:40   ` Paul Garlick
@ 2018-09-25 15:28   ` Paul Garlick
  1 sibling, 0 replies; 11+ messages in thread
From: Paul Garlick @ 2018-09-25 15:28 UTC (permalink / raw)
  To: Eric Bavier; +Cc: 32818

Hi Eric,

>  I will give it a try.

The build is successful with the "--with-PACKAGENAME=1" flags.  The
PETSc configure script picks up the same set of libraries that I had
specified by the "--with-PACKAGENAME-lib" flags.  Thank you for the
tip!

Actually, I would like to add a "--with-hypre=1" flag too to add in
support for the HYPRE preconditioner.  However, this is related to the
petsc-mumps-openmpi vs petsc-openmpi naming question.  As far as I can
see the presence of HYPRE would not interfere with dealii-openmpi so
perhaps it would be better to include it in petsc-openmpi instead.

Paul.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [bug#32818] [PATCH] gnu: Add petsc-mumps-openmpi.
  2018-09-25 13:40   ` Paul Garlick
@ 2018-09-26  3:54     ` Eric Bavier
  2018-09-26  9:08       ` Paul Garlick
  0 siblings, 1 reply; 11+ messages in thread
From: Eric Bavier @ 2018-09-26  3:54 UTC (permalink / raw)
  To: Paul Garlick; +Cc: 32818

[-- Attachment #1: Type: text/plain, Size: 990 bytes --]

On Tue, 25 Sep 2018 14:40:52 +0100
Paul Garlick <pgarlick@tourbillion-technology.com> wrote:

> Hi Eric,
> 
> > 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.  
> 
> Yes, that was my Plan A.  However, I spotted that the package dealii-
> openmpi has petsc-openmpi as an input but also mumps-metis-openmpi,
> instead of mumps-openmpi.  If the mumps configuration in petsc-mumps-
> openmpi is included in petsc-openmpi then dealii-openmpi may not build.
>  WDYT?

Good point.  I'm not sure how dealii would react to that.  It's also
possible that the state of affairs has changed in more recent versions
of dealii (also on my todo list).  I suppose we'd need to give it a try
to know.  If it does fail, I'd say a patch to dealii is called for,
since the presense of scotch ordering capability in MUMPS should not
prevent dealii from using the metis orderings in any way.

`~Eric

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [bug#32818] [PATCH] gnu: Add petsc-mumps-openmpi.
  2018-09-26  3:54     ` Eric Bavier
@ 2018-09-26  9:08       ` Paul Garlick
  2018-09-26 11:59         ` [bug#32818] [PATCH] gnu: petsc-openmpi: Configure with support for MUMPS solver Paul Garlick
  0 siblings, 1 reply; 11+ messages in thread
From: Paul Garlick @ 2018-09-26  9:08 UTC (permalink / raw)
  To: Eric Bavier; +Cc: 32818

Hi Eric,

> Good point.  I'm not sure how dealii would react to that.  It's also
> possible that the state of affairs has changed in more recent
> versions
> of dealii (also on my todo list).  I suppose we'd need to give it a
> try
> to know.  If it does fail, I'd say a patch to dealii is called for,
> since the presense of scotch ordering capability in MUMPS should not
> prevent dealii from using the metis orderings in any way.
> 

OK, let's go for the 'add-mumps-to-petsc-openmpi' plan.  

I shall re-submit this patch (#32818) to add MUMPS support to the
existing petsc-openmpi package.

Best regards,

Paul.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [bug#32818] [PATCH] gnu: petsc-openmpi: Configure with support for MUMPS solver.
  2018-09-26  9:08       ` Paul Garlick
@ 2018-09-26 11:59         ` Paul Garlick
  2018-10-04 13:53           ` Paul Garlick
  0 siblings, 1 reply; 11+ messages in thread
From: Paul Garlick @ 2018-09-26 11:59 UTC (permalink / raw)
  To: 32818, Eric Bavier; +Cc: Paul Garlick

* gnu/packages/maths.scm (petsc-openmpi)[inputs]: Add metis,
mumps-openmpi, scalapack and pt-scotch.
[arguments]: Add "--with-PACKAGENAME=1" flags.  Move 'mpi-setup' phase
ahead of 'configure' phase.
---
 gnu/packages/maths.scm | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 636b485..6adddc0 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1695,13 +1695,21 @@ scientific applications modeled by partial differential equations.")
   (package (inherit petsc)
     (name "petsc-openmpi")
     (inputs
-     `(("openmpi" ,openmpi)
-       ("hdf5" ,hdf5-parallel-openmpi)
+     `(("hdf5" ,hdf5-parallel-openmpi)
+       ("metis" ,metis)
+       ("mumps" ,mumps-openmpi)
+       ("openmpi" ,openmpi)
+       ("scalapack" ,scalapack)
+       ("scotch" ,pt-scotch)
        ,@(package-inputs petsc)))
     (arguments
      (substitute-keyword-arguments (package-arguments petsc)
        ((#:configure-flags cf)
         ``("--with-mpiexec=mpirun"
+           "--with-metis=1"
+           "--with-mumps=1"
+           "--with-scalapack=1"
+           "--with-ptscotch=1"
            ,(string-append "--with-mpi-dir="
                            (assoc-ref %build-inputs "openmpi"))
            ,(string-append "--with-hdf5-include="
@@ -1711,9 +1719,9 @@ scientific applications modeled by partial differential equations.")
            ,@(delete "--with-mpi=0" ,cf)))
        ((#:phases phases)
         `(modify-phases ,phases
-           (add-before 'check 'mpi-setup
+           (add-before 'configure 'mpi-setup
              ,%openmpi-setup)))))
-    (synopsis "Library to solve PDEs (with MPI support)")))
+    (synopsis "Library to solve PDEs (with MUMPS and MPI support)")))
 
 (define-public petsc-complex-openmpi
   (package (inherit petsc-complex)
@@ -1730,7 +1738,6 @@ 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 python-kiwisolver
   (package
     (name "python-kiwisolver")
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [bug#32818] [PATCH] gnu: petsc-openmpi: Configure with support for MUMPS solver.
  2018-09-26 11:59         ` [bug#32818] [PATCH] gnu: petsc-openmpi: Configure with support for MUMPS solver Paul Garlick
@ 2018-10-04 13:53           ` Paul Garlick
  2018-10-04 23:08             ` bug#32818: " Leo Famulari
  0 siblings, 1 reply; 11+ messages in thread
From: Paul Garlick @ 2018-10-04 13:53 UTC (permalink / raw)
  To: 32818, Eric Bavier

Hi Guix,

Are there any comments on the revised patch? 

I  have re-checked that it builds successfully.  It does.

Best regards,

Paul.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#32818: [PATCH] gnu: petsc-openmpi: Configure with support for MUMPS solver.
  2018-10-04 13:53           ` Paul Garlick
@ 2018-10-04 23:08             ` Leo Famulari
  0 siblings, 0 replies; 11+ messages in thread
From: Leo Famulari @ 2018-10-04 23:08 UTC (permalink / raw)
  To: Paul Garlick; +Cc: 32818-done

[-- Attachment #1: Type: text/plain, Size: 258 bytes --]

On Thu, Oct 04, 2018 at 02:53:16PM +0100, Paul Garlick wrote:
> Hi Guix,
> 
> Are there any comments on the revised patch? 
> 
> I  have re-checked that it builds successfully.  It does.

I pushed as 9e2aa70bad8c06cdf9a44065a31f12b3205e92e0. Thanks!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-10-04 23:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-24 10:32 [bug#32818] [PATCH] gnu: Add petsc-mumps-openmpi Paul Garlick
2018-09-24 12:33 ` Ludovic Courtès
2018-09-24 16:09   ` Paul Garlick
2018-09-25 13:14 ` Eric Bavier
2018-09-25 13:40   ` Paul Garlick
2018-09-26  3:54     ` Eric Bavier
2018-09-26  9:08       ` Paul Garlick
2018-09-26 11:59         ` [bug#32818] [PATCH] gnu: petsc-openmpi: Configure with support for MUMPS solver Paul Garlick
2018-10-04 13:53           ` Paul Garlick
2018-10-04 23:08             ` bug#32818: " Leo Famulari
2018-09-25 15:28   ` [bug#32818] [PATCH] gnu: Add petsc-mumps-openmpi Paul Garlick

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).