unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 00/14] Add deal.II and some dependencies.
@ 2015-06-28  3:45 ericbavier
  2015-06-28  3:45 ` [PATCH 01/14] gnu: hwloc: Upgrade to 1.10.1 ericbavier
                   ` (13 more replies)
  0 siblings, 14 replies; 36+ messages in thread
From: ericbavier @ 2015-06-28  3:45 UTC (permalink / raw)
  To: guix-devel; +Cc: Eric Bavier

From: Eric Bavier <bavier@member.fsf.org>

The following patches add the deal.II finite element library and some of its
dependencies.  Also included are some non-trivial package upgrades.

I've tested builds on both x86_64 and i686, but cannot comment on mips or arm.

Stylistic or other comments are most welcome.

Eric Bavier (14):
  gnu: hwloc: Upgrade to 1.10.1.
  gnu: hwloc: Move numactl to inputs.
  gnu: openmpi: Upgrade to 1.8.5.
  gnu: Update scotch to 6.0.4.
  gnu: scotch, pt-scotch: Use modify-phases.
  gnu: scotch, pt-scotch: Build esmumps libraries.
  gnu: Add ScaLAPACK.
  gnu: Add p4est.
  gnu: Add METIS.
  gnu: Add MUMPS.
  gnu: petsc: Upgrade to 3.6.0.
  gnu: Add arpack-ng-openmpi.
  gnu: Add SLEPc.
  gnu: Add deal.II.

 gnu-system.am                                      |   5 +-
 gnu/packages/maths.scm                             | 589 ++++++++++++++++++---
 gnu/packages/mpi.scm                               |  54 +-
 gnu/packages/patches/deal.II-p4est-interface.patch |  62 +++
 .../patches/hwloc-gather-topology-lstopo.patch     |  13 +
 gnu/packages/patches/mumps-build-parallelism.patch |  13 +
 gnu/packages/patches/petsc-fix-threadcomm.patch    |  15 -
 .../patches/pt-scotch-build-parallelism.patch      |  13 +
 gnu/packages/patches/scotch-test-threading.patch   | 131 +----
 9 files changed, 670 insertions(+), 225 deletions(-)
 create mode 100644 gnu/packages/patches/deal.II-p4est-interface.patch
 create mode 100644 gnu/packages/patches/hwloc-gather-topology-lstopo.patch
 create mode 100644 gnu/packages/patches/mumps-build-parallelism.patch
 delete mode 100644 gnu/packages/patches/petsc-fix-threadcomm.patch
 create mode 100644 gnu/packages/patches/pt-scotch-build-parallelism.patch

-- 
2.2.1

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

* [PATCH 01/14] gnu: hwloc: Upgrade to 1.10.1.
  2015-06-28  3:45 [PATCH 00/14] Add deal.II and some dependencies ericbavier
@ 2015-06-28  3:45 ` ericbavier
  2015-06-28  9:08   ` Ludovic Courtès
  2015-06-28  3:45 ` [PATCH 02/14] gnu: hwloc: Move numactl to inputs ericbavier
                   ` (12 subsequent siblings)
  13 siblings, 1 reply; 36+ messages in thread
From: ericbavier @ 2015-06-28  3:45 UTC (permalink / raw)
  To: guix-devel; +Cc: Eric Bavier

From: Eric Bavier <bavier@member.fsf.org>

* gnu/packages/patches/hwloc-gather-topology-lstopo.patch: New patch.
* gnu/packages/mpi.scm (hwloc): Upgrade to 1.10.1.
  [source]: Use patch.
  [propagated-inputs]: Remove libpci.
  [inputs]: Add libpciaccess.
* gnu-system.am (dist_patch_DATA): Add patch.
---
 gnu-system.am                                      |  1 +
 gnu/packages/mpi.scm                               | 23 ++++++++++------------
 .../patches/hwloc-gather-topology-lstopo.patch     | 13 ++++++++++++
 3 files changed, 24 insertions(+), 13 deletions(-)
 create mode 100644 gnu/packages/patches/hwloc-gather-topology-lstopo.patch

diff --git a/gnu-system.am b/gnu-system.am
index a420d71..2d45e40 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -461,6 +461,7 @@ dist_patch_DATA =						\
   gnu/packages/patches/gtkglext-disable-disable-deprecated.patch \
   gnu/packages/patches/hop-bigloo-4.0b.patch			\
   gnu/packages/patches/hop-linker-flags.patch			\
+  gnu/packages/patches/hwloc-gather-topology-lstopo.patch	\
   gnu/packages/patches/hydra-automake-1.15.patch		\
   gnu/packages/patches/hydra-disable-darcs-test.patch		\
   gnu/packages/patches/irrlicht-mesa-10.patch			\
diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm
index 8e62da9..0e1016e 100644
--- a/gnu/packages/mpi.scm
+++ b/gnu/packages/mpi.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net>
 ;;;
@@ -39,30 +39,29 @@
 (define-public hwloc
   (package
     (name "hwloc")
-    (version "1.9")
+    (version "1.10.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://www.open-mpi.org/software/hwloc/v"
-                                  version "/downloads/hwloc-"
-                                  version ".tar.bz2"))
+                                  (version-major+minor version)
+                                  "/downloads/hwloc-" version ".tar.bz2"))
               (sha256
                (base32
-                "0zjgiili2a8v63s8ly3a8qp8ibxv1jw3zbgm7diic3w1qgqiza14"))))
+                "0jji5rphy05s0lp6bknn8lxwixrq0hy5rjzsqvhjszbkl2li7kim"))
+              (patches (list
+                        (search-patch "hwloc-gather-topology-lstopo.patch")))))
     (build-system gnu-build-system)
-    (arguments
-     ;; Enable libpci support, which effectively makes hwloc GPLv2+.
-     '(#:configure-flags '("--enable-libpci")))
     (inputs
      `(("libx11" ,libx11)
        ("cairo" ,cairo)
        ("ncurses" ,ncurses)
+       ("libpciaccess" ,libpciaccess)
        ("expat" ,expat)))
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (propagated-inputs
-     ;; 'hwloc.pc' refers to libpci and libnuma, hence the propagation.
-     `(("numactl" ,numactl)
-       ("pciutils" ,pciutils)))
+     ;; 'hwloc.pc' refers to libnuma, hence the propagation.
+     `(("numactl" ,numactl)))
     (home-page "http://www.open-mpi.org/projects/hwloc/")
     (synopsis "Abstraction of hardware architectures")
     (description
@@ -77,8 +76,6 @@ exploit it accordingly and efficiently.
 hwloc may display the topology in multiple convenient formats.  It also offers
 a powerful programming interface to gather information about the hardware,
 bind processes, and much more.")
-
-    ;; But see above about linking against libpci.
     (license bsd-3)))
 
 (define-public openmpi
diff --git a/gnu/packages/patches/hwloc-gather-topology-lstopo.patch b/gnu/packages/patches/hwloc-gather-topology-lstopo.patch
new file mode 100644
index 0000000..06f47ae
--- /dev/null
+++ b/gnu/packages/patches/hwloc-gather-topology-lstopo.patch
@@ -0,0 +1,13 @@
+Derived from upstream commit 0a32f719c.
+
+--- hwloc-1.10.1/tests/linux/Makefile.in	2015-01-26 03:37:52.000000000 -0600
++++ hwloc-1.10.1/tests/linux/Makefile.in	2015-06-15 11:21:49.824842511 -0500
+@@ -1633,7 +1633,7 @@
+ 
+ 
+ install-exec-hook:
+-	$(SED) -e 's/HWLOC_top_builddir\/utils/bindir/' -e '/HWLOC_top_builddir/d' $(DESTDIR)$(bindir)/hwloc-gather-topology > $(DESTDIR)$(bindir)/hwloc-gather-topology.tmp && mv -f $(DESTDIR)$(bindir)/hwloc-gather-topology.tmp $(DESTDIR)$(bindir)/hwloc-gather-topology
++	$(SED) -e 's/HWLOC_top_builddir\/utils\/lstopo/bindir/' -e '/HWLOC_top_builddir/d' $(DESTDIR)$(bindir)/hwloc-gather-topology > $(DESTDIR)$(bindir)/hwloc-gather-topology.tmp && mv -f $(DESTDIR)$(bindir)/hwloc-gather-topology.tmp $(DESTDIR)$(bindir)/hwloc-gather-topology
+ 	chmod +x $(DESTDIR)$(bindir)/hwloc-gather-topology
+ 
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
-- 
2.2.1

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

* [PATCH 02/14] gnu: hwloc: Move numactl to inputs.
  2015-06-28  3:45 [PATCH 00/14] Add deal.II and some dependencies ericbavier
  2015-06-28  3:45 ` [PATCH 01/14] gnu: hwloc: Upgrade to 1.10.1 ericbavier
@ 2015-06-28  3:45 ` ericbavier
  2015-06-28  9:09   ` Ludovic Courtès
  2015-06-28  3:45 ` [PATCH 03/14] gnu: openmpi: Upgrade to 1.8.5 ericbavier
                   ` (11 subsequent siblings)
  13 siblings, 1 reply; 36+ messages in thread
From: ericbavier @ 2015-06-28  3:45 UTC (permalink / raw)
  To: guix-devel; +Cc: Eric Bavier

From: Eric Bavier <bavier@member.fsf.org>

* gnu/packages/mpi.scm (hwloc)[propagated-inputs]: Move numactl from here...
  [inputs]: ...to here.
  [arguments]: New 'refine-libnuma' phase.
---
 gnu/packages/mpi.scm | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm
index 0e1016e..9677c12 100644
--- a/gnu/packages/mpi.scm
+++ b/gnu/packages/mpi.scm
@@ -55,13 +55,23 @@
      `(("libx11" ,libx11)
        ("cairo" ,cairo)
        ("ncurses" ,ncurses)
+       ("numactl" ,numactl)
        ("libpciaccess" ,libpciaccess)
        ("expat" ,expat)))
     (native-inputs
      `(("pkg-config" ,pkg-config)))
-    (propagated-inputs
-     ;; 'hwloc.pc' refers to libnuma, hence the propagation.
-     `(("numactl" ,numactl)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after
+          'install 'refine-libnuma
+          ;; Give -L arguments for libraries to avoid propagation
+          (lambda* (#:key inputs outputs #:allow-other-keys)
+            (let ((out  (assoc-ref outputs "out"))
+                  (numa (assoc-ref inputs "numactl")))
+              (substitute* (map (lambda (f) (string-append out "/" f))
+                                '("lib/pkgconfig/hwloc.pc" "lib/libhwloc.la"))
+                (("-lnuma" lib) (string-append "-L" numa "/lib " lib)))))))))
     (home-page "http://www.open-mpi.org/projects/hwloc/")
     (synopsis "Abstraction of hardware architectures")
     (description
-- 
2.2.1

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

* [PATCH 03/14] gnu: openmpi: Upgrade to 1.8.5.
  2015-06-28  3:45 [PATCH 00/14] Add deal.II and some dependencies ericbavier
  2015-06-28  3:45 ` [PATCH 01/14] gnu: hwloc: Upgrade to 1.10.1 ericbavier
  2015-06-28  3:45 ` [PATCH 02/14] gnu: hwloc: Move numactl to inputs ericbavier
@ 2015-06-28  3:45 ` ericbavier
  2015-06-28  9:10   ` Ludovic Courtès
  2015-06-28  3:45 ` [PATCH 04/14] gnu: Update scotch to 6.0.4 ericbavier
                   ` (10 subsequent siblings)
  13 siblings, 1 reply; 36+ messages in thread
From: ericbavier @ 2015-06-28  3:45 UTC (permalink / raw)
  To: guix-devel; +Cc: Eric Bavier

From: Eric Bavier <bavier@member.fsf.org>

* gnu/packages/mpi.scm (openmpi): Upgrade to 1.8.5.
  [native-inputs]: Add perl.
  [arguments]: Add configure flags for thread support.
---
 gnu/packages/mpi.scm | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm
index 9677c12..9417e35 100644
--- a/gnu/packages/mpi.scm
+++ b/gnu/packages/mpi.scm
@@ -32,6 +32,7 @@
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages xml)
+  #:use-module (gnu packages perl)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages valgrind))
@@ -91,7 +92,7 @@ bind processes, and much more.")
 (define-public openmpi
   (package
     (name "openmpi")
-    (version "1.8.1")
+    (version "1.8.5")
     (source
      (origin
       (method url-fetch)
@@ -100,22 +101,24 @@ bind processes, and much more.")
                           "/downloads/openmpi-" version ".tar.bz2"))
       (sha256
        (base32
-        "13z1q69f3qwmmhpglarfjminfy2yw4rfqr9jydjk5507q3mjf50p"))))
+        "1i7vjf599kl5lm8n4vnwq9q1d9scn4sdjh42kfq1i9yzxnlhdsjc"))))
     (build-system gnu-build-system)
     (inputs
      `(("hwloc" ,hwloc)
        ("gfortran" ,gfortran)
        ("valgrind" ,valgrind)))
     (native-inputs
-     `(("pkg-config" ,pkg-config)))
+     `(("pkg-config" ,pkg-config)
+       ("perl" ,perl)))
     (arguments
      `(#:configure-flags `("--enable-static"
                            "--enable-oshmem"
-                           ;; Thread support causes some applications to hang
-                           ;; "--enable-event-thread-support"
-                           ;; "--enable-opal-multi-threads"
-                           ;; "--enable-orte-progress-threads"
-                           ;; "--enable-mpi-thread-multiple"
+
+                           "--enable-event-thread-support"
+                           "--enable-opal-multi-threads"
+                           "--enable-orte-progress-threads"
+                           "--enable-mpi-thread-multiple"
+
                            "--enable-mpi-ext=all"
                            "--with-devel-headers"
                            "--enable-debug"
-- 
2.2.1

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

* [PATCH 04/14] gnu: Update scotch to 6.0.4.
  2015-06-28  3:45 [PATCH 00/14] Add deal.II and some dependencies ericbavier
                   ` (2 preceding siblings ...)
  2015-06-28  3:45 ` [PATCH 03/14] gnu: openmpi: Upgrade to 1.8.5 ericbavier
@ 2015-06-28  3:45 ` ericbavier
  2015-06-28  9:12   ` Ludovic Courtès
  2015-06-28  3:45 ` [PATCH 05/14] gnu: scotch, pt-scotch: Use modify-phases ericbavier
                   ` (9 subsequent siblings)
  13 siblings, 1 reply; 36+ messages in thread
From: ericbavier @ 2015-06-28  3:45 UTC (permalink / raw)
  To: guix-devel; +Cc: Eric Bavier

From: Eric Bavier <bavier@member.fsf.org>

* gnu/packages/maths.scm (scotch): Update to 6.0.4.
  [arguments]: Add -fPIC to CFLAGS.
* gnu/packages/patches/scotch-test-threading.patch: Adjust patch for a
  new set of test fixes.
* gnu/packages/patches/pt-scotch-build-parallelism.patch: New patch.
* gnu-system.am (dist_patch_DATA): Add it.
---
 gnu-system.am                                      |   1 +
 gnu/packages/maths.scm                             |  16 +--
 .../patches/pt-scotch-build-parallelism.patch      |  13 ++
 gnu/packages/patches/scotch-test-threading.patch   | 131 ++-------------------
 4 files changed, 29 insertions(+), 132 deletions(-)
 create mode 100644 gnu/packages/patches/pt-scotch-build-parallelism.patch

diff --git a/gnu-system.am b/gnu-system.am
index 2d45e40..0c9a2eb 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -549,6 +549,7 @@ dist_patch_DATA =						\
   gnu/packages/patches/polkit-drop-test.patch			\
   gnu/packages/patches/portaudio-audacity-compat.patch		\
   gnu/packages/patches/procps-make-3.82.patch			\
+  gnu/packages/patches/pt-scotch-build-parallelism.patch	\
   gnu/packages/patches/pulseaudio-fix-mult-test.patch		\
   gnu/packages/patches/pulseaudio-longer-test-timeout.patch	\
   gnu/packages/patches/pycairo-wscript.patch			\
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 4e0b1ee..e4fe03b 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
 ;;; Copyright © 2014 John Darrington <jmd@gnu.org>
-;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2014 Federico Beffa <beffa@fbengineering.ch>
 ;;; Copyright © 2014 Mathieu Lirzin <mathieu.lirzin@openmailbox.org>
 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
@@ -785,15 +785,16 @@ implemented in ANSI C, and MPI for communications.")
 (define-public scotch
   (package
     (name "scotch")
-    (version "6.0.0")
+    (version "6.0.4")
     (source
      (origin
       (method url-fetch)
-      (uri (string-append "https://gforge.inria.fr/frs/download.php/31831/"
+      (uri (string-append "https://gforge.inria.fr/frs/download.php/34618/"
                           "scotch_" version ".tar.gz"))
       (sha256
-       (base32 "0yfqf9lk7chb3h42777x42x4adx0v3n0b41q0cdqrdmscp4iczp5"))
-      (patches (list (search-patch "scotch-test-threading.patch")))))
+       (base32 "1ir088mvrqggyqdkx9qfynmiaffqbyih5qfl5mga2nrlm1qlsgzm"))
+      (patches (list (search-patch "scotch-test-threading.patch")
+                     (search-patch "pt-scotch-build-parallelism.patch")))))
     (build-system gnu-build-system)
     (inputs
      `(("zlib" ,zlib)
@@ -820,7 +821,7 @@ CCS = gcc
 CCP = mpicc
 CCD = gcc
 CPPFLAGS =~{ -D~a~}
-CFLAGS = -O2 -g $(CPPFLAGS)
+CFLAGS = -O2 -g -fPIC $(CPPFLAGS)
 LDFLAGS = -lz -lm -lrt -lpthread
 CP = cp
 LEX = flex -Pscotchyy -olex.yy.c
@@ -833,8 +834,7 @@ YACC = bison -pscotchyy -y -b y
                        '("COMMON_FILE_COMPRESS_GZ"
                          "COMMON_PTHREAD"
                          "COMMON_RANDOM_FIXED_SEED"
-                         ;; TODO: Define once our MPI supports
-                         ;; MPI_THREAD_MULTIPLE
+                         ;; XXX: Causes invalid frees in superlu-dist tests
                          ;; "SCOTCH_PTHREAD"
                          ;; "SCOTCH_PTHREAD_NUMBER=2"
                          "restrict=__restrict")))))
diff --git a/gnu/packages/patches/pt-scotch-build-parallelism.patch b/gnu/packages/patches/pt-scotch-build-parallelism.patch
new file mode 100644
index 0000000..2ac5f27
--- /dev/null
+++ b/gnu/packages/patches/pt-scotch-build-parallelism.patch
@@ -0,0 +1,13 @@
+Building with -j may cause the esmumps_main target to fail with a "no rule for
+dependency libptesmumps.a" error.  Fix the dependency name.
+
+--- scotch_6.0.4/src/esmumps/Makefile	2012-12-01 08:29:29.000000000 -0600
++++ scotch_6.0.4/src/esmumps/Makefile	2015-06-15 17:29:23.279605734 -0500
+@@ -160,6 +160,6 @@
+ 					order.h					\
+ 					symbol.h				\
+ 					esmumps.h				\
+-					lib$(ESMUMPSLIB)$(LIB)			\
++					libesmumps$(LIB)			\
+ 					$(libdir)/lib$(SCOTCHLIB)$(LIB)		\
+ 					$(libdir)/lib$(SCOTCHLIB)errexit$(LIB)
diff --git a/gnu/packages/patches/scotch-test-threading.patch b/gnu/packages/patches/scotch-test-threading.patch
index 2527a6e..de8cc49 100644
--- a/gnu/packages/patches/scotch-test-threading.patch
+++ b/gnu/packages/patches/scotch-test-threading.patch
@@ -1,139 +1,22 @@
-* These tests assume threading support, even when the library is compiled
-  without it.  Protect these checks.
+Fix this test so that it succeeds when the library is not compiled with
+SCOTCH_PTHREAD.
 
-* Tests should not require keyboard interaction.
-
---- a/src/check/test_scotch_dgraph_band.c	2012-09-27 10:46:42.000000000 -0500
-+++ b/src/check/test_scotch_dgraph_band.c	2014-05-13 14:36:07.479270243 -0500
-@@ -99,10 +99,12 @@
-     errorPrint ("main: Cannot initialize (1)");
-     exit       (1);
-   }
-+#ifdef SCOTCH_PTHREAD
-   if (thrdlvlreqval > thrdlvlproval) {
-     errorPrint ("main: Cannot initialize (2)");
-     exit       (1);
-   }
-+#endif
- 
-   if (argc != 2) {
-     errorPrint ("main: invalid number of parameters");
-@@ -115,12 +117,14 @@
- 
-   fprintf (stderr, "Proc %2d of %2d, pid %d\n", proclocnum, procglbnbr, getpid ());
- 
-+#ifdef SCOTCH_DEBUG_CHECK2
-   if (proclocnum == 0) {                          /* Synchronize on keybord input */
-     char           c;
- 
-     printf ("Waiting for key press...\n");
-     scanf ("%c", &c);
-   }
-+#endif /* SCOTCH_DEBUG_CHECK2 */
- 
-   if (MPI_Barrier (proccomm) != MPI_SUCCESS) {    /* Synchronize for debug */
-     errorPrint ("main: cannot communicate");
---- a/src/check/test_scotch_dgraph_grow.c	2012-11-30 12:19:33.000000000 -0600
-+++ b/src/check/test_scotch_dgraph_grow.c	2014-05-13 14:35:31.307269303 -0500
-@@ -103,10 +103,12 @@
-     errorPrint ("main: Cannot initialize (1)");
-     exit       (1);
-   }
-+#ifdef SCOTCH_PTHREAD
-   if (thrdlvlreqval > thrdlvlproval) {
-     errorPrint ("main: Cannot initialize (2)");
-     exit       (1);
-   }
-+#endif
- 
-   if (argc != 2) {
-     errorPrint ("main: invalid number of parameters");
-@@ -119,12 +121,14 @@
- 
-   fprintf (stderr, "Proc %2d of %2d, pid %d\n", proclocnum, procglbnbr, getpid ());
- 
-+#ifdef SCOTCH_DEBUG_CHECK2
-   if (proclocnum == 0) {                          /* Synchronize on keybord input */
-     char           c;
- 
-     printf ("Waiting for key press...\n");
-     scanf ("%c", &c);
-   }
-+#endif /* SCOTCH_DEBUG_CHECK2 */
- 
-   if (MPI_Barrier (proccomm) != MPI_SUCCESS) {    /* Synchronize for debug */
-     errorPrint ("main: cannot communicate");
---- a/src/check/test_scotch_dgraph_redist.c	2012-09-26 11:42:27.000000000 -0500
-+++ b/src/check/test_scotch_dgraph_redist.c	2014-05-13 14:34:30.323267722 -0500
-@@ -98,10 +98,12 @@
-     errorPrint ("main: Cannot initialize (1)");
-     exit       (1);
-   }
-+#ifdef SCOTCH_PTHREAD
-   if (thrdlvlreqval > thrdlvlproval) {
-     errorPrint ("main: Cannot initialize (2)");
-     exit       (1);
-   }
-+#endif
- 
-   if (argc != 2) {
-     errorPrint ("main: invalid number of parameters");
-@@ -114,7 +116,6 @@
- 
-   fprintf (stderr, "Proc %2d of %2d, pid %d\n", proclocnum, procglbnbr, getpid ());
- 
--#define SCOTCH_DEBUG_CHECK2
- #ifdef SCOTCH_DEBUG_CHECK2
-   if (proclocnum == 0) {                          /* Synchronize on keybord input */
-     char           c;
---- /tmp/nix-build-scotch-6.0.0.drv-9/scotch_6.0.0/src/check/test_common_thread.c	2012-11-30 11:05:23.000000000 -0600
-+++ scotch_6.0.0/src/check/test_common_thread.c	2014-05-13 17:26:27.159535244 -0500
-@@ -90,7 +90,7 @@
- /*                       */
- /*************************/
- 
--#if ((defined COMMON_PTHREAD) || (defined SCOTCH_PTHREAD))
-+#ifdef SCOTCH_PTHREAD
- 
- static
- void
-@@ -161,7 +161,7 @@
-   return (o);
- }
- 
--#endif /* ((defined COMMON_PTHREAD) || (defined SCOTCH_PTHREAD)) */
-+#endif /* SCOTCH_PTHREAD */
- 
- /*********************/
- /*                   */
+--- scotch_6.0.4/src/check/test_common_thread.c	2014-09-28 11:39:59.000000000 -0500
++++ scotch_6.0.4/src/check/test_common_thread.c	2015-01-10 00:52:00.076229542 -0600
 @@ -175,14 +175,14 @@
  char *              argv[])
  {
    TestThreadGroup       groudat;
 -#if ((defined COMMON_PTHREAD) || (defined SCOTCH_PTHREAD))
-+#ifdef SCOTCH_PTHREAD
++#if ((defined COMMON_PTHREAD) && (defined SCOTCH_PTHREAD))
    TestThread * restrict thrdtab;
    int                   thrdnbr;
--#endif /* ((defined COMMON_PTHREAD) || (defined SCOTCH_PTHREAD)) */
-+#endif /* SCOTCH_PTHREAD */
+ #endif /* ((defined COMMON_PTHREAD) || (defined SCOTCH_PTHREAD)) */
  
    SCOTCH_errorProg (argv[0]);
  
 -#if ((defined COMMON_PTHREAD) || (defined SCOTCH_PTHREAD))
-+#ifdef SCOTCH_PTHREAD
++#if ((defined COMMON_PTHREAD) && (defined SCOTCH_PTHREAD))
    thrdnbr = SCOTCH_PTHREAD_NUMBER;
  
    groudat.redusum = COMPVAL (thrdnbr);
-@@ -197,9 +197,9 @@
-     errorPrint ("main: cannot launch or run threads");
-     return     (1);
-   }
--#else /* ((defined COMMON_PTHREAD) || (defined SCOTCH_PTHREAD)) */
--  printf ("Scotch not compiled with either COMMON_PTHREAD or SCOTCH_PTHREAD\n");
--#endif /* ((defined COMMON_PTHREAD) || (defined SCOTCH_PTHREAD)) */
-+#else /* not SCOTCH_PTHREAD */
-+  printf ("Scotch not compiled with SCOTCH_PTHREAD\n");
-+#endif /* not SCOTCH_PTHREAD */
- 
-   return (0);
- }
-- 
2.2.1

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

* [PATCH 05/14] gnu: scotch, pt-scotch: Use modify-phases.
  2015-06-28  3:45 [PATCH 00/14] Add deal.II and some dependencies ericbavier
                   ` (3 preceding siblings ...)
  2015-06-28  3:45 ` [PATCH 04/14] gnu: Update scotch to 6.0.4 ericbavier
@ 2015-06-28  3:45 ` ericbavier
  2015-06-28  9:15   ` Ludovic Courtès
  2015-06-28  3:45 ` [PATCH 06/14] gnu: scotch, pt-scotch: Build esmumps libraries ericbavier
                   ` (8 subsequent siblings)
  13 siblings, 1 reply; 36+ messages in thread
From: ericbavier @ 2015-06-28  3:45 UTC (permalink / raw)
  To: guix-devel; +Cc: Eric Bavier

From: Eric Bavier <bavier@member.fsf.org>

* gnu/packages/maths.scm (scotch, pt-scotch)[arguments]: Use modify-phases.
---
 gnu/packages/maths.scm | 70 ++++++++++++++++++++++----------------------------
 1 file changed, 31 insertions(+), 39 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index e4fe03b..a3611cf 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -802,15 +802,16 @@ implemented in ANSI C, and MPI for communications.")
        ("bison" ,bison)))
     (arguments
      `(#:phases
-       (alist-cons-after
-        'unpack 'chdir-to-src
-        (lambda _ (chdir "src"))
-        (alist-replace
-         'configure
-         (lambda _
-           (call-with-output-file "Makefile.inc"
-             (lambda (port)
-               (format port "
+       (modify-phases %standard-phases
+         (add-after
+          'unpack 'chdir-to-src
+          (lambda _ (chdir "src")))
+         (replace
+          'configure
+          (lambda _
+            (call-with-output-file "Makefile.inc"
+              (lambda (port)
+                (format port "
 EXE =
 LIB = .a
 OBJ = .o
@@ -831,22 +832,21 @@ MV = mv
 RANLIB = ranlib
 YACC = bison -pscotchyy -y -b y
 "
-                       '("COMMON_FILE_COMPRESS_GZ"
-                         "COMMON_PTHREAD"
-                         "COMMON_RANDOM_FIXED_SEED"
-                         ;; XXX: Causes invalid frees in superlu-dist tests
-                         ;; "SCOTCH_PTHREAD"
-                         ;; "SCOTCH_PTHREAD_NUMBER=2"
-                         "restrict=__restrict")))))
-         (alist-replace
+                        '("COMMON_FILE_COMPRESS_GZ"
+                          "COMMON_PTHREAD"
+                          "COMMON_RANDOM_FIXED_SEED"
+                          ;; XXX: Causes invalid frees in superlu-dist tests
+                          ;; "SCOTCH_PTHREAD"
+                          ;; "SCOTCH_PTHREAD_NUMBER=2"
+                          "restrict=__restrict"))))))
+         (replace
           'install
           (lambda* (#:key outputs #:allow-other-keys)
             (let ((out (assoc-ref outputs "out")))
               (mkdir out)
               (zero? (system* "make"
                               (string-append "prefix=" out)
-                              "install"))))
-          %standard-phases)))))
+                              "install"))))))))
     (home-page "http://www.labri.fr/perso/pelegrin/scotch/")
     (synopsis "Programs and libraries for graph algorithms")
     (description "SCOTCH is a set of programs and libraries which implement
@@ -867,26 +867,18 @@ bio-chemistry.")
     (arguments
      (substitute-keyword-arguments (package-arguments scotch)
        ((#:phases scotch-phases)
-        `(alist-replace
-          'build
-          ;; TODO: Would like to add parallelism here
-          (lambda _
-            (and
-             (zero? (system* "make" "ptscotch"))
-             ;; Install the serial metis compatibility library
-             (zero? (system* "make" "-C" "libscotchmetis" "install"))))
-          (alist-replace
-           'check
-           (lambda _ (zero? (system* "make" "ptcheck")))
-           (alist-replace
-            'install
-            (lambda* (#:key outputs #:allow-other-keys)
-              (let ((out (assoc-ref outputs "out")))
-                (mkdir out)
-                (zero? (system* "make"
-                                (string-append "prefix=" out)
-                                "install"))))
-            ,scotch-phases))))))
+        `(modify-phases ,scotch-phases
+           (replace
+            'build
+            ;; TODO: Would like to add parallelism here
+            (lambda _
+              (and
+               (zero? (system* "make" "ptscotch"))
+               ;; Install the serial metis compatibility library
+               (zero? (system* "make" "-C" "libscotchmetis" "install")))))
+           (replace
+            'check
+            (lambda _ (zero? (system* "make" "ptcheck"))))))))
     (synopsis "Programs and libraries for graph algorithms (with MPI)")))
 
 (define-public gsegrafix
-- 
2.2.1

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

* [PATCH 06/14] gnu: scotch, pt-scotch: Build esmumps libraries.
  2015-06-28  3:45 [PATCH 00/14] Add deal.II and some dependencies ericbavier
                   ` (4 preceding siblings ...)
  2015-06-28  3:45 ` [PATCH 05/14] gnu: scotch, pt-scotch: Use modify-phases ericbavier
@ 2015-06-28  3:45 ` ericbavier
  2015-06-28  9:14   ` Ludovic Courtès
  2015-06-28  3:45 ` [PATCH 07/14] gnu: Add ScaLAPACK ericbavier
                   ` (7 subsequent siblings)
  13 siblings, 1 reply; 36+ messages in thread
From: ericbavier @ 2015-06-28  3:45 UTC (permalink / raw)
  To: guix-devel; +Cc: Eric Bavier

From: Eric Bavier <bavier@member.fsf.org>

* gnu/packages/maths.scm (scotch)[arguments]: Add 'build-esmumps
  phase.  Install esmumps libraries and headers in 'install phase.
  (pt-scotch)[arguments]: Build ptesmumps in 'build phase.  Add
  make parallelism.
---
 gnu/packages/maths.scm | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index a3611cf..765a111 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -818,6 +818,7 @@ OBJ = .o
 MAKE = make
 AR = ar
 ARFLAGS = -ruv
+CAT = cat
 CCS = gcc
 CCP = mpicc
 CCD = gcc
@@ -835,10 +836,18 @@ YACC = bison -pscotchyy -y -b y
                         '("COMMON_FILE_COMPRESS_GZ"
                           "COMMON_PTHREAD"
                           "COMMON_RANDOM_FIXED_SEED"
+                          ;; Prevents symbolc clashes with libesmumps
+                          "SCOTCH_RENAME"
                           ;; XXX: Causes invalid frees in superlu-dist tests
                           ;; "SCOTCH_PTHREAD"
                           ;; "SCOTCH_PTHREAD_NUMBER=2"
                           "restrict=__restrict"))))))
+         (add-after
+          'build 'build-esmumps
+          (lambda _
+            (zero? (system* "make"
+                            (format #f "-j~a" (current-processor-count))
+                            "esmumps"))))
          (replace
           'install
           (lambda* (#:key outputs #:allow-other-keys)
@@ -846,7 +855,14 @@ YACC = bison -pscotchyy -y -b y
               (mkdir out)
               (zero? (system* "make"
                               (string-append "prefix=" out)
-                              "install"))))))))
+                              "install"))
+              ;; esmumps files are not installed with the above
+              (for-each (lambda (f)
+                          (copy-file f (string-append out "/include/" f)))
+                        (find-files "../include" ".*esmumps.h$"))
+              (for-each (lambda (f)
+                          (copy-file f (string-append out "/lib/" f)))
+                        (find-files "../lib" "^lib.*esmumps.*"))))))))
     (home-page "http://www.labri.fr/perso/pelegrin/scotch/")
     (synopsis "Programs and libraries for graph algorithms")
     (description "SCOTCH is a set of programs and libraries which implement
@@ -873,7 +889,9 @@ bio-chemistry.")
             ;; TODO: Would like to add parallelism here
             (lambda _
               (and
-               (zero? (system* "make" "ptscotch"))
+               (zero? (system* "make"
+                               (format #f "-j~a" (current-processor-count))
+                               "ptscotch" "ptesmumps"))
                ;; Install the serial metis compatibility library
                (zero? (system* "make" "-C" "libscotchmetis" "install")))))
            (replace
-- 
2.2.1

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

* [PATCH 07/14] gnu: Add ScaLAPACK.
  2015-06-28  3:45 [PATCH 00/14] Add deal.II and some dependencies ericbavier
                   ` (5 preceding siblings ...)
  2015-06-28  3:45 ` [PATCH 06/14] gnu: scotch, pt-scotch: Build esmumps libraries ericbavier
@ 2015-06-28  3:45 ` ericbavier
  2015-06-28  9:12   ` Ludovic Courtès
  2015-06-28  3:45 ` [PATCH 08/14] gnu: Add p4est ericbavier
                   ` (6 subsequent siblings)
  13 siblings, 1 reply; 36+ messages in thread
From: ericbavier @ 2015-06-28  3:45 UTC (permalink / raw)
  To: guix-devel; +Cc: Eric Bavier

From: Eric Bavier <bavier@member.fsf.org>

* gnu/packages/maths.scm (scalapack): New variable.
---
 gnu/packages/maths.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 765a111..b67ae9c 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -305,6 +305,35 @@ problems in numerical linear algebra.")
     (license (license:non-copyleft "file://LICENSE"
                                 "See LICENSE in the distribution."))))
 
+(define-public scalapack
+  (package
+    (name "scalapack")
+    (version "2.0.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://www.netlib.org/scalapack/scalapack-"
+                           version ".tgz"))
+       (sha256
+        (base32
+         "0p1r61ss1fq0bs8ynnx7xq4wwsdvs32ljvwjnx6yxr8gd6pawx0c"))))
+    (build-system cmake-build-system)
+    (inputs
+     `(("mpi" ,openmpi)
+       ("fortran" ,gfortran)
+       ("lapack" ,lapack)))             ;for testing only
+    (arguments
+     `(#:configure-flags `("-DBUILD_SHARED_LIBS:BOOL=YES")))
+    (home-page "http://www.netlib.org/scalapack/")
+    (synopsis "Library for scalable numerical linear algebra")
+    (description
+     "ScaLAPACK is a Fortran 90 library of high-performance linear algebra
+routines on parallel distributed memory machines.  ScaLAPACK solves dense and
+banded linear systems, least squares problems, eigenvalue problems, and
+singular value problems.")
+    (license (license:bsd-style "file://LICENSE"
+                                "See LICENSE in the distribution."))))
+
 (define-public gnuplot
   (package
     (name "gnuplot")
-- 
2.2.1

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

* [PATCH 08/14] gnu: Add p4est.
  2015-06-28  3:45 [PATCH 00/14] Add deal.II and some dependencies ericbavier
                   ` (6 preceding siblings ...)
  2015-06-28  3:45 ` [PATCH 07/14] gnu: Add ScaLAPACK ericbavier
@ 2015-06-28  3:45 ` ericbavier
  2015-06-28 20:03   ` Ludovic Courtès
  2015-06-28  3:45 ` [PATCH 09/14] gnu: Add METIS ericbavier
                   ` (5 subsequent siblings)
  13 siblings, 1 reply; 36+ messages in thread
From: ericbavier @ 2015-06-28  3:45 UTC (permalink / raw)
  To: guix-devel; +Cc: Eric Bavier

From: Eric Bavier <bavier@member.fsf.org>

* gnu/packages/maths.scm (p4est, p4est-openmpi): New variables.
---
 gnu/packages/maths.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index b67ae9c..3852311 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -928,6 +928,52 @@ bio-chemistry.")
             (lambda _ (zero? (system* "make" "ptcheck"))))))))
     (synopsis "Programs and libraries for graph algorithms (with MPI)")))
 
+(define-public p4est
+  (package
+    (name "p4est")
+    (version "1.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://p4est.github.io/release/p4est-"
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "0faina2h5qsx3m2izbzaj9bbakma1krbbjmq43wrp1hcbyijflqb"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("fortran" ,gfortran)
+       ("blas" ,openblas)
+       ("lapack" ,lapack)
+       ("zlib" ,zlib)))
+    (arguments
+     `(#:configure-flags `(,(string-append "BLAS_LIBS=-L"
+                                           (assoc-ref %build-inputs "blas")
+                                           " -lopenblas")
+                           ,(string-append "LAPACK_LIBS=-L"
+                                           (assoc-ref %build-inputs "lapack")
+                                           " -llapack"))))
+    (home-page "http://www.p4est.org")
+    (synopsis "AMR on Forests of Octrees")
+    (description
+     "The p4est software library enables the dynamic management of a
+collection of adaptive octrees, conveniently called a forest of octrees.
+p4est is designed to work in parallel and scales to hundreds of thousands of
+processor cores.")
+    (license license:gpl2+)))
+
+(define-public p4est-openmpi
+  (package (inherit p4est)
+    (name "p4est-openmpi")
+    (inputs
+     `(("mpi" ,openmpi)
+       ,@(package-inputs p4est)))
+    (arguments
+     (substitute-keyword-arguments (package-arguments p4est)
+       ((#:configure-flags cf)
+        ``("--enable-mpi" ,@,cf))))
+    (synopsis "Parallel AMR on Forests of Octrees")))
+
 (define-public gsegrafix
   (package
     (name "gsegrafix")
-- 
2.2.1

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

* [PATCH 09/14] gnu: Add METIS.
  2015-06-28  3:45 [PATCH 00/14] Add deal.II and some dependencies ericbavier
                   ` (7 preceding siblings ...)
  2015-06-28  3:45 ` [PATCH 08/14] gnu: Add p4est ericbavier
@ 2015-06-28  3:45 ` ericbavier
  2015-06-28 20:03   ` Ludovic Courtès
  2015-06-28  3:45 ` [PATCH 10/14] gnu: Add MUMPS ericbavier
                   ` (4 subsequent siblings)
  13 siblings, 1 reply; 36+ messages in thread
From: ericbavier @ 2015-06-28  3:45 UTC (permalink / raw)
  To: guix-devel; +Cc: Eric Bavier

From: Eric Bavier <bavier@member.fsf.org>

* gnu/packages/maths.scm (metis): New variable.
---
 gnu/packages/maths.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 3852311..bc13fd5 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -928,6 +928,36 @@ bio-chemistry.")
             (lambda _ (zero? (system* "make" "ptcheck"))))))))
     (synopsis "Programs and libraries for graph algorithms (with MPI)")))
 
+(define-public metis
+  (package
+    (name "metis")
+    (version "5.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/"
+                           "metis-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1cjxgh41r8k6j029yxs8msp3z6lcnpm16g5pvckk35kc7zhfpykn"))))
+    (build-system cmake-build-system)
+    (inputs
+     `(("blas" ,openblas)))
+    (arguments
+     `(#:tests? #f                      ;no tests
+       #:configure-flags `("-DSHARED=ON"
+                           ,(string-append "-DGKLIB_PATH=" (getcwd)
+                                           "/metis-" ,version "/GKlib"))))
+    (home-page "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview")
+    (synopsis "Graph partitioning and fill-reducing matrix ordering library")
+    (description
+     "METIS is a set of serial programs for partitioning graphs, partitioning
+finite element meshes, and producing fill-reducing orderings for sparse
+matrices.  The algorithms implemented in METIS are based on the multilevel
+recursive-bisection, multilevel k-way, and multi-constraint partitioning
+schemes.")
+    (license license:asl2.0)))          ;As of version 5.0.3
+
 (define-public p4est
   (package
     (name "p4est")
-- 
2.2.1

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

* [PATCH 10/14] gnu: Add MUMPS.
  2015-06-28  3:45 [PATCH 00/14] Add deal.II and some dependencies ericbavier
                   ` (8 preceding siblings ...)
  2015-06-28  3:45 ` [PATCH 09/14] gnu: Add METIS ericbavier
@ 2015-06-28  3:45 ` ericbavier
  2015-06-28 20:12   ` Ludovic Courtès
  2015-06-28  3:45 ` [PATCH 11/14] gnu: petsc: Upgrade to 3.6.0 ericbavier
                   ` (3 subsequent siblings)
  13 siblings, 1 reply; 36+ messages in thread
From: ericbavier @ 2015-06-28  3:45 UTC (permalink / raw)
  To: guix-devel; +Cc: Eric Bavier

From: Eric Bavier <bavier@member.fsf.org>

* gnu/packages/maths.scm (mumps, mumps-metis, mumps-openmpi)
  (mumps-metis-openmpi): New variables.
* gnu/packages/patches/mumps-build-parallelism.patch: New patch.
* gnu-system.am (dist_patch_DATA): Add it.
---
 gnu-system.am                                      |   1 +
 gnu/packages/maths.scm                             | 165 +++++++++++++++++++++
 gnu/packages/patches/mumps-build-parallelism.patch |  13 ++
 3 files changed, 179 insertions(+)
 create mode 100644 gnu/packages/patches/mumps-build-parallelism.patch

diff --git a/gnu-system.am b/gnu-system.am
index 0c9a2eb..af2c0eb 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -518,6 +518,7 @@ dist_patch_DATA =						\
   gnu/packages/patches/mpc123-initialize-ao.patch		\
   gnu/packages/patches/mplayer2-theora-fix.patch		\
   gnu/packages/patches/module-init-tools-moduledir.patch	\
+  gnu/packages/patches/mumps-build-parallelism.patch		\
   gnu/packages/patches/mupdf-buildsystem-fix.patch		\
   gnu/packages/patches/mutt-CVE-2014-9116.patch			\
   gnu/packages/patches/net-tools-bitrot.patch			\
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index bc13fd5..369457d 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -32,6 +32,7 @@
   #:use-module (guix download)
   #:use-module (guix svn-download)
   #:use-module (guix utils)
+  #:use-module (guix build utils)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages algebra)
@@ -628,6 +629,170 @@ 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 mumps
+  (package
+    (name "mumps")
+    (version "5.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://mumps.enseeiht.fr/MUMPS_"
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "0690yp73sqk8zn2jnrzdr5swnjdyd7j0774s4xamjjwcxarw87hr"))
+       (patches (list (search-patch "mumps-build-parallelism.patch")))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("fortran" ,gfortran)
+       ;; These are required for linking against mumps, but we let the user
+       ;; declare the dependency.
+       ("blas" ,openblas)
+       ("metis" ,metis)
+       ("scotch" ,scotch)))
+    (arguments
+     `(#:modules ((ice-9 match)
+                  (guix build gnu-build-system)
+                  (guix build utils))
+       #:phases
+       (modify-phases %standard-phases
+         (replace
+          'configure
+          (lambda* (#:key inputs #:allow-other-keys)
+            (call-with-output-file "Makefile.inc"
+              (lambda (port)
+                (format port "
+PLAT         =
+LIBEXT       = .a
+OUTC         = -o
+OUTF         = -o
+RM           = rm -f~:[
+CC           = gcc
+FC           = gfortran
+FL           = gfortran
+INCSEQ       = -I$(topdir)/libseq
+LIBSEQ       = -L$(topdir)/libseq -lmpiseq
+LIBSEQNEEDED = libseqneeded~;
+CC           = mpicc
+FC           = mpifort
+FL           = mpifort~]
+AR           = ar vr # rules require trailing space, ugh...
+RANLIB       = ranlib
+LIBBLAS      = -L~a -lopenblas~@[
+SCALAP       = -L~a -lscalapack~]
+LIBOTHERS    = -pthread
+CDEFS        = -DAdd_
+PIC          = -fPIC
+OPTF         = -O2 -DALLOW_NON_INIT $(PIC)
+OPTL         = -O2 $(PIC)
+OPTC         = -O2 $(PIC)
+INCS         = $(INCSEQ)
+LIBS         = $(SCALAP) $(LIBSEQ)
+LPORDDIR     = $(topdir)/PORD/lib
+IPORD        = -I$(topdir)/PORD/include
+LPORD        = -L$(LPORDDIR) -lpord
+ORDERINGSF   = -Dpord~@[
+METISDIR     = ~a
+IMETIS       = -I$(METISDIR)/include
+LMETIS       = -L$(METISDIR)/lib -lmetis
+ORDERINGSF  += -Dmetis~]~@[~:{
+SCOTCHDIR    = ~a
+ISCOTCH      = -I$(SCOTCHDIR)/include
+LSCOTCH      = -L$(SCOTCHDIR)/lib ~a-lesmumps -lscotch -lscotcherr
+ORDERINGSF  += ~a~}~]
+ORDERINGSC   = $(ORDERINGSF)
+LORDERINGS   = $(LPORD) $(LMETIS) $(LSCOTCH)
+IORDERINGSF  = $(ISCOTCH)
+IORDERINGSC  = $(IPORD) $(IMETIS) $(ISCOTCH)"
+                        (assoc-ref inputs "mpi")
+                        (assoc-ref inputs "blas")
+                        (assoc-ref inputs "scalapack")
+                        (assoc-ref inputs "metis")
+                        (match (list (assoc-ref inputs "pt-scotch")
+                                     (assoc-ref inputs "scotch"))
+                          ((#f #f)
+                           #f)
+                          ((#f scotch)
+                           `((,scotch "" "-Dscotch")))
+                          ((ptscotch _)
+                           `((,ptscotch
+                              "-lptesmumps -lptscotch -lptscotcherr "
+                              "-Dptscotch")))))))))
+         (replace
+          'build
+          ;; By default only the d-precision library is built.  Make with "all"
+          ;; target so that all precision libraries and examples are built.
+          (lambda _
+            (zero? (system* "make" "all"
+                            (format #f "-j~a" (current-processor-count))))))
+         (replace
+          'check
+          (lambda* (#:key (exec-prefix '()) #:allow-other-keys)
+            (with-directory-excursion "examples"
+              (use-modules (srfi srfi-1))
+              (every
+               (lambda (prec type)
+                 (use-modules (ice-9 popen))
+                 (let ((tester (apply open-pipe*
+                                      `(,OPEN_WRITE
+                                        ,@exec-prefix
+                                        ,(string-append "./" prec
+                                                        "simpletest"))))
+                       (input  (open-input-file
+                                (string-append "input_simpletest_" type))))
+                   (begin
+                     (dump-port input tester)
+                     (close-port input)
+                     (zero? (close-pipe tester)))))
+               '("s" "d" "c" "z")
+               '("real" "real" "cmplx" "cmplx")))))
+         (replace
+          'install
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let ((out (assoc-ref outputs "out")))
+              (copy-recursively "lib" (string-append out "/lib"))
+              (copy-recursively "include" (string-append out "/include"))
+              (when (file-exists? "libseq/libmpiseq.a")
+                (copy-file "libseq/libmpiseq.a"
+                           (string-append out "/lib/libmpiseq.a")))))))))
+    (home-page "http://mumps.enseeiht.fr")
+    (synopsis "Multifrontal sparse direct solver")
+    (description
+     "MUMPS (MUltifrontal Massively Parallel sparse direct Solver) solves a
+sparse system of linear equations A x = b using Guassian elimination.")
+    (license license:public-domain)))
+
+(define-public mumps-metis
+  (package (inherit mumps)
+    (name "mumps-metis")
+    (inputs
+     (alist-delete "scotch" (package-inputs mumps)))))
+
+(define-public mumps-openmpi
+  (package (inherit mumps)
+    (name "mumps-openmpi")
+    (inputs
+     `(("mpi" ,openmpi)
+       ("scalapack" ,scalapack)
+       ("pt-scotch" ,pt-scotch)
+       ,@(alist-delete "scotch" (package-inputs mumps))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments mumps)
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (replace
+            'check
+            (lambda _
+              ((assoc-ref ,phases 'check)
+               #:exec-prefix '("mpirun" "-n" "2"))))))))
+    (synopsis "Multifrontal sparse direct solver (with MPI)")))
+
+(define-public mumps-metis-openmpi
+  (package (inherit mumps-openmpi)
+    (name "mumps-metis-openmpi")
+    (inputs
+     (alist-delete "pt-scotch" (package-inputs mumps-openmpi)))))
+
 (define-public superlu
   (package
     (name "superlu")
diff --git a/gnu/packages/patches/mumps-build-parallelism.patch b/gnu/packages/patches/mumps-build-parallelism.patch
new file mode 100644
index 0000000..26dd330
--- /dev/null
+++ b/gnu/packages/patches/mumps-build-parallelism.patch
@@ -0,0 +1,13 @@
+Building sublibraries in parallel can lead to race conditions on the libseq
+and lipord targets.
+
+--- MUMPS_5.0.0/Makefile.orig	2015-06-15 10:08:54.523146562 -0500
++++ MUMPS_5.0.0/Makefile	2015-06-15 10:19:44.074367512 -0500
+@@ -11,6 +11,7 @@
+ 	sexamples dexamples cexamples zexamples \
+ 	mumps_lib requiredobj libseqneeded clean
+ 
++.NOTPARALLEL:
+ alllib:		c z s d
+ all:		cexamples zexamples sexamples dexamples
+ 
-- 
2.2.1

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

* [PATCH 11/14] gnu: petsc: Upgrade to 3.6.0.
  2015-06-28  3:45 [PATCH 00/14] Add deal.II and some dependencies ericbavier
                   ` (9 preceding siblings ...)
  2015-06-28  3:45 ` [PATCH 10/14] gnu: Add MUMPS ericbavier
@ 2015-06-28  3:45 ` ericbavier
  2015-06-28 20:13   ` Ludovic Courtès
  2015-06-28  3:45 ` [PATCH 12/14] gnu: Add arpack-ng-openmpi ericbavier
                   ` (2 subsequent siblings)
  13 siblings, 1 reply; 36+ messages in thread
From: ericbavier @ 2015-06-28  3:45 UTC (permalink / raw)
  To: guix-devel; +Cc: Eric Bavier

From: Eric Bavier <bavier@member.fsf.org>

* gnu/packages/maths.scm (petsc): Upgrade to 3.6.0.
* gnu/packages/patches/petsc-fix-threadcomm.patch: Delete patch.
* gnu-system.am (dist_patch_DATA): Remove it.
---
 gnu-system.am                                   |  1 -
 gnu/packages/maths.scm                          | 26 ++++++++++---------------
 gnu/packages/patches/petsc-fix-threadcomm.patch | 15 --------------
 3 files changed, 10 insertions(+), 32 deletions(-)
 delete mode 100644 gnu/packages/patches/petsc-fix-threadcomm.patch

diff --git a/gnu-system.am b/gnu-system.am
index af2c0eb..16b71e9 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -544,7 +544,6 @@ dist_patch_DATA =						\
   gnu/packages/patches/perl-net-ssleay-disable-ede-test.patch	\
   gnu/packages/patches/perl-no-sys-dirs.patch			\
   gnu/packages/patches/perl-tk-x11-discover.patch		\
-  gnu/packages/patches/petsc-fix-threadcomm.patch		\
   gnu/packages/patches/pingus-sdl-libs-config.patch		\
   gnu/packages/patches/plotutils-libpng-jmpbuf.patch		\
   gnu/packages/patches/polkit-drop-test.patch			\
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 369457d..a6c4bba 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -501,7 +501,7 @@ ASCII text files using Gmsh's own scripting language.")
 (define-public petsc
   (package
     (name "petsc")
-    (version "3.4.4")
+    (version "3.6.0")
     (source
      (origin
       (method url-fetch)
@@ -509,9 +509,7 @@ ASCII text files using Gmsh's own scripting language.")
       (uri (string-append "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/"
                           "petsc-lite-" version ".tar.gz"))
       (sha256
-       (base32 "0v5dg6dhdjpi5ianvd4mm6hsvxzv1bsxwnh9f9myag0a0d9xk9iv"))
-      (patches
-       (list (search-patch "petsc-fix-threadcomm.patch")))))
+       (base32 "0lzhk1flgszks1wlhz2b92rnlx5np7bgad8vqy9fcqziz5b4pr26"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("python" ,python-2)
@@ -525,7 +523,7 @@ ASCII text files using Gmsh's own scripting language.")
        ))
     (arguments
      `(#:test-target "test"
-       #:parallel-build? #f
+       #:parallel-build? #f             ;build is parallel by default
        #:configure-flags
        `("--with-mpi=0"
          "--with-openmp=1"
@@ -561,26 +559,22 @@ ASCII text files using Gmsh's own scripting language.")
             (let ((out     (assoc-ref outputs "out"))
                   (fortran (assoc-ref inputs  "gfortran")))
               (substitute* (map (lambda (file)
-                                  (string-append out "/" file))
-                                '("conf/petscvariables"
-                                  "conf/PETScConfig.cmake"))
+                                  (string-append out "/lib/petsc/conf/" file))
+                                '("petscvariables" "PETScConfig.cmake"))
                 (((getcwd)) out))
               ;; Make compiler references point to the store
-              (substitute* (string-append out "/conf/petscvariables")
+              (substitute* (string-append out "/lib/petsc/conf/petscvariables")
                 (("= g(cc|\\+\\+|fortran)" _ suffix)
                  (string-append "= " fortran "/bin/g" suffix)))
               ;; PETSc installs some build logs, which aren't necessary.
               (for-each (lambda (file)
-                          (let ((f (string-append out "/" file)))
+                          (let ((f (string-append out "/lib/petsc/conf/" file)))
                             (when (file-exists? f)
                               (delete-file f))))
-                        '("conf/configure.log"
-                          "conf/make.log"
-                          "conf/test.log"
-                          "conf/error.log"
-                          "conf/RDict.db"
+                        '("configure.log" "make.log" "gmake.log"
+                          "test.log" "error.log" "RDict.db"
                           ;; Once installed, should uninstall with Guix
-                          "conf/uninstall.py"))))
+                          "uninstall.py"))))
           %standard-phases)))))
     (home-page "http://www.mcs.anl.gov/petsc")
     (synopsis "Library to solve PDEs")
diff --git a/gnu/packages/patches/petsc-fix-threadcomm.patch b/gnu/packages/patches/petsc-fix-threadcomm.patch
deleted file mode 100644
index 3ef4f2d..0000000
--- a/gnu/packages/patches/petsc-fix-threadcomm.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Fix "error: unknown type name 'cpu_set_t'".  Patch submitted upstream
-http://lists.mcs.anl.gov/pipermail/petsc-dev/2014-May/015345.html
-
---- a/src/sys/threadcomm/impls/openmp/tcopenmp.c	2014-03-13 21:47:22.000000000 -0500
-+++ b/src/sys/threadcomm/impls/openmp/tcopenmp.c	2014-04-02 14:44:57.185170151 -0500
-@@ -1,6 +1,9 @@
- #define PETSC_DESIRE_FEATURE_TEST_MACROS
- #include <../src/sys/threadcomm/impls/openmp/tcopenmpimpl.h>
- #include <omp.h>
-+#if defined(PETSC_HAVE_SCHED_CPU_SET_T)
-+#include <sched.h>
-+#endif
- 
- PetscErrorCode PetscThreadCommGetRank_OpenMP(PetscInt *trank)
- {
-- 
2.2.1

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

* [PATCH 12/14] gnu: Add arpack-ng-openmpi.
  2015-06-28  3:45 [PATCH 00/14] Add deal.II and some dependencies ericbavier
                   ` (10 preceding siblings ...)
  2015-06-28  3:45 ` [PATCH 11/14] gnu: petsc: Upgrade to 3.6.0 ericbavier
@ 2015-06-28  3:45 ` ericbavier
  2015-06-28 20:13   ` Ludovic Courtès
  2015-06-28  3:45 ` [PATCH 13/14] gnu: Add SLEPc ericbavier
  2015-06-28  3:45 ` [PATCH 14/14] gnu: Add deal.II ericbavier
  13 siblings, 1 reply; 36+ messages in thread
From: ericbavier @ 2015-06-28  3:45 UTC (permalink / raw)
  To: guix-devel; +Cc: Eric Bavier

From: Eric Bavier <bavier@member.fsf.org>

* gnu/packages/maths.scm (arpack-ng-openmpi): New variable.
---
 gnu/packages/maths.scm | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index a6c4bba..343b56c 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -274,6 +274,15 @@ large scale eigenvalue problems.")
     (license (license:non-copyleft "file://COPYING"
                                 "See COPYING in the distribution."))))
 
+(define-public arpack-ng-openmpi
+  (package (inherit arpack-ng)
+    (name "arpack-ng-openmpi")
+    (inputs
+     `(("mpi" ,openmpi)
+       ,@(package-inputs arpack-ng)))
+    (arguments `(#:configure-flags '("--enable-mpi")))
+    (synopsis "Fortran subroutines for solving eigenvalue problems with MPI")))
+
 (define-public lapack
   (package
     (name "lapack")
-- 
2.2.1

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

* [PATCH 13/14] gnu: Add SLEPc.
  2015-06-28  3:45 [PATCH 00/14] Add deal.II and some dependencies ericbavier
                   ` (11 preceding siblings ...)
  2015-06-28  3:45 ` [PATCH 12/14] gnu: Add arpack-ng-openmpi ericbavier
@ 2015-06-28  3:45 ` ericbavier
  2015-06-28 20:18   ` Ludovic Courtès
  2015-06-28  3:45 ` [PATCH 14/14] gnu: Add deal.II ericbavier
  13 siblings, 1 reply; 36+ messages in thread
From: ericbavier @ 2015-06-28  3:45 UTC (permalink / raw)
  To: guix-devel; +Cc: Eric Bavier

From: Eric Bavier <bavier@member.fsf.org>

* gnu/packages/maths.scm (slepc, slepc-complex, slepc-openmpi)
  (slepc-complex-openmpi): New variables.
---
 gnu/packages/maths.scm | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 98 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 343b56c..ff3a048 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -632,6 +632,104 @@ 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 slepc
+  (package
+    (name "slepc")
+    (version "3.6.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://slepc.upv.es/download/download.php?"
+                           "filename=slepc-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1ij8w864spzk4cq2mmkssqyj0mbckkkvxm0wpw9gywy2jgbj07jr"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("python" ,python-2)))
+    (inputs
+     `(("arpack" ,arpack-ng)
+       ("gfortran" ,gfortran)))
+    (propagated-inputs
+     `(("petsc" ,petsc)))
+    (arguments
+     `(#:parallel-build? #f             ;build is parallel by default
+       #:configure-flags
+       `(,(string-append "--with-arpack-dir="
+                         (assoc-ref %build-inputs "arpack")))
+       #:phases
+       (modify-phases %standard-phases
+         (replace
+          'configure
+          ;; configure is a python script, so we can't run it with bash.
+          (lambda* (#:key inputs outputs (configure-flags '())
+                    #:allow-other-keys)
+            (let* ((prefix (assoc-ref outputs "out"))
+                   (flags `(,(string-append "--prefix=" prefix)
+                            ,@configure-flags)))
+              (format #t "build directory: ~s~%" (getcwd))
+              (format #t "configure flags: ~s~%" flags)
+              (setenv "SLEPC_DIR" (getcwd))
+              (setenv "PETSC_DIR" (assoc-ref %build-inputs "petsc"))
+              (zero? (apply system* "./configure" flags)))))
+         (add-after
+          'install 'delete-doc
+          ;; SLEPc installs polluting HTML documentation alongside headers in
+          ;; $out/include.  Delete these, as users can browse them online.
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let* ((out (assoc-ref outputs "out")))
+              (for-each delete-file (find-files out "\\.html$")))))
+         (add-after
+          'install 'clean-install
+          ;; Clean up unnecessary build logs from installation.
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let ((out (assoc-ref outputs "out")))
+              (for-each (lambda (file)
+                          (let ((f (string-append out "/lib/slepc/conf/" file)))
+                            (when (file-exists? f)
+                              (delete-file f))))
+                        '("configure.log" "make.log" "gmake.log"
+                          "test.log" "error.log" "RDict.db"
+                          "uninstall.py"))))))))
+    (home-page "http://slepc.upv.es")
+    (synopsis "Scalable library for eigenproblems")
+    (description "SLEPc is a software library for the solution of large sparse
+eigenproblems on parallel computers.  It can be used for the solution of
+linear eigenvalue problems formulated in either standard or generalized form,
+as well as other related problems such as the singular value decomposition.
+The emphasis of the software is on methods and techniques appropriate for
+problems in which the associated matrices are sparse, for example, those
+arising after the discretization of partial differential equations.")
+    (license license:lgpl3)))
+
+(define-public slepc-complex
+  (package (inherit slepc)
+    (name "slepc-complex")
+    (propagated-inputs
+     `(("petsc" ,petsc-complex)
+       ,@(alist-delete "petsc" (package-propagated-inputs slepc))))
+    (synopsis "Scalable library for eigenproblems (with complex scalars)")))
+
+(define-public slepc-openmpi
+  (package (inherit slepc)
+    (name "slepc-openmpi")
+    (inputs
+     `(("mpi" ,openmpi)
+       ("arpack" ,arpack-ng-openmpi)
+       ,@(alist-delete "arpack" (package-inputs slepc))))
+    (propagated-inputs
+     `(("petsc" ,petsc-openmpi)
+       ,@(alist-delete "petsc" (package-propagated-inputs slepc))))
+    (synopsis "Scalable library for eigenproblems (with MPI support)")))
+
+(define-public slepc-complex-openmpi
+  (package (inherit slepc-openmpi)
+    (name "slepc-complex-openmpi")
+    (propagated-inputs
+     `(("petsc" ,petsc-complex-openmpi)
+       ,@(alist-delete "petsc" (package-propagated-inputs slepc-openmpi))))
+    (synopsis "Scalable library for eigenproblems (with complex scalars and MPI support)")))
+
 (define-public mumps
   (package
     (name "mumps")
-- 
2.2.1

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

* [PATCH 14/14] gnu: Add deal.II.
  2015-06-28  3:45 [PATCH 00/14] Add deal.II and some dependencies ericbavier
                   ` (12 preceding siblings ...)
  2015-06-28  3:45 ` [PATCH 13/14] gnu: Add SLEPc ericbavier
@ 2015-06-28  3:45 ` ericbavier
  2015-06-28 20:22   ` Ludovic Courtès
  13 siblings, 1 reply; 36+ messages in thread
From: ericbavier @ 2015-06-28  3:45 UTC (permalink / raw)
  To: guix-devel; +Cc: Eric Bavier

From: Eric Bavier <bavier@member.fsf.org>

* gnu/packages/maths.scm (deal.II, deal.II-openmpi): New variables.
* gnu/packages/patches/deal.II-p4est-interface.patch: New patch.
* gnu-system.am (dist_patch_DATA): Add it.
---
 gnu-system.am                                      |  1 +
 gnu/packages/maths.scm                             | 84 +++++++++++++++++++++-
 gnu/packages/patches/deal.II-p4est-interface.patch | 62 ++++++++++++++++
 3 files changed, 146 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/deal.II-p4est-interface.patch

diff --git a/gnu-system.am b/gnu-system.am
index 16b71e9..3eb9f54 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -412,6 +412,7 @@ dist_patch_DATA =						\
   gnu/packages/patches/clucene-contribs-lib.patch               \
   gnu/packages/patches/cursynth-wave-rand.patch			\
   gnu/packages/patches/dbus-localstatedir.patch			\
+  gnu/packages/patches/deal.II-p4est-interface.patch		\
   gnu/packages/patches/diffutils-gets-undeclared.patch		\
   gnu/packages/patches/dfu-programmer-fix-libusb.patch		\
   gnu/packages/patches/doxygen-test.patch			\
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index ff3a048..e2c7d89 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -37,6 +37,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages algebra)
   #:use-module (gnu packages bison)
+  #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
   #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
@@ -72,7 +73,8 @@
   #:use-module (gnu packages texlive)
   #:use-module (gnu packages wxwidgets)
   #:use-module (gnu packages xml)
-  #:use-module (gnu packages zip))
+  #:use-module (gnu packages zip)
+  #:use-module (srfi srfi-1))
 
 (define-public units
   (package
@@ -1842,3 +1844,83 @@ specifications.")
      "lp_solve is a mixed integer linear programming solver based on the
 revised simplex and the branch-and-bound methods.")
     (license license:lgpl2.1+)))
+
+(define-public deal.II
+  (package
+    (name "deal.II")
+    (version "8.2.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/dealii/dealii/releases/"
+                           "download/v" version "/dealii-" version ".tar.gz"))
+       (sha256
+        (base32
+         "185jych0gdnpkjwxni7pd0dda149492zwq2457xdjg76bzj78mnp"))
+       (patches (list (search-patch "deal.II-p4est-interface.patch")))
+       (modules '((guix build utils)))
+       (snippet
+        ;; Remove bundled sources: UMFPACK, TBB, muParser, and boost
+        '(delete-file-recursively "bundled"))))
+    (build-system cmake-build-system)
+    (inputs
+     `(("tbb" ,tbb)
+       ("zlib" ,zlib)
+       ("boost" ,boost)
+       ("p4est" ,p4est)
+       ("blas" ,openblas)
+       ("lapack" ,lapack)
+       ("arpack" ,arpack-ng)
+       ("muparser" ,muparser)
+       ("gfortran" ,gfortran)
+       ("suitesparse" ,suitesparse)))   ;for UMFPACK
+    (arguments
+     `(#:build-type "DebugRelease" ;only supports Release, Debug, or DebugRelease
+       #:configure-flags '("-DCOMPAT_FILES=OFF") ;Follow new directory structure
+       #:phases (modify-phases %standard-phases
+                  (add-after
+                   'install 'hint-example-prefix
+                   ;; Set Cmake hints in examples so that they can find this
+                   ;; deal.II when configuring.
+                   (lambda* (#:key outputs #:allow-other-keys)
+                     (let* ((out (assoc-ref %outputs "out"))
+                            (exmpl (string-append out "/share/doc"
+                                                  "/deal.II/examples")))
+                       (substitute* (find-files exmpl "CMakeLists.txt")
+                         (("([[:space:]]*HINTS.*)\n" _ line)
+                          (string-append line " $ENV{HOME}/.guix-profile "
+                                         out "\n")))
+                       #t))))))
+    (home-page "https://www.dealii.org")
+    (synopsis "Finite element library")
+    (description
+     "Deal.II is a C++ program library targeted at the computational solution
+of partial differential equations using adaptive finite elements.  The main
+aim of deal.II is to enable rapid development of modern finite element codes,
+using among other aspects adaptive meshes and a wide array of tools often used
+in finite element programs.")
+    (license license:lgpl2.1+)))
+
+(define-public deal.II-openmpi
+  (package (inherit deal.II)
+    (name "deal.II-openmpi")
+    (inputs
+     `(("mpi" ,openmpi)
+       ;;Supported only with MPI:
+       ("p4est" ,p4est-openmpi)
+       ("petsc" ,petsc-openmpi)
+       ("slepc" ,slepc-openmpi)
+       ("metis" ,metis)               ;for MUMPS
+       ("scalapack" ,scalapack)       ;for MUMPS
+       ("mumps" ,mumps-metis-openmpi) ;configure supports only metis orderings
+       ("arpack" ,arpack-ng-openmpi)
+       ,@(fold alist-delete (package-inputs deal.II)
+               '("p4est" "arpack"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments deal.II)
+       ((#:configure-flags cf)
+        ``("-DMPI_C_COMPILER=mpicc"
+           "-DMPI_CXX_COMPILER=mpicxx"
+           "-DMPI_Fortran_COMPILER=mpifort"
+           ,@,cf))))
+    (synopsis "Finite element library (with MPI support)")))
diff --git a/gnu/packages/patches/deal.II-p4est-interface.patch b/gnu/packages/patches/deal.II-p4est-interface.patch
new file mode 100644
index 0000000..4c4125d
--- /dev/null
+++ b/gnu/packages/patches/deal.II-p4est-interface.patch
@@ -0,0 +1,62 @@
+From upstream commit f764598c.
+
+The p4est_connectivity_load function used to take an unsigned long as argument,
+but this has been changed to size_t in p4est 1.0. This makes no difference on
+64 bit systems, but leads to compiler errors on 32 bit systems. Fix this.
+
+--- a/source/distributed/tria.cc
++++ b/source/distributed/tria.cc
+@@ -204,7 +204,11 @@ namespace internal
+       static
+       int (&connectivity_is_valid) (types<2>::connectivity *connectivity);
+ 
+-#if DEAL_II_P4EST_VERSION_GTE(0,3,4,3)
++#if DEAL_II_P4EST_VERSION_GTE(1,0,0,0)
++      static
++      types<2>::connectivity *(&connectivity_load) (const char *filename,
++                                                    size_t *length);
++#elif DEAL_II_P4EST_VERSION_GTE(0,3,4,3)
+       static
+       types<2>::connectivity *(&connectivity_load) (const char *filename,
+                                                     long unsigned *length);
+@@ -384,7 +388,12 @@ namespace internal
+                                                 *connectivity)
+       = p4est_connectivity_is_valid;
+ 
+-#if DEAL_II_P4EST_VERSION_GTE(0,3,4,3)
++#if DEAL_II_P4EST_VERSION_GTE(1,0,0,0)
++    types<2>::connectivity *
++    (&functions<2>::connectivity_load) (const char *filename,
++                                        size_t *length)
++      = p4est_connectivity_load;
++#elif DEAL_II_P4EST_VERSION_GTE(0,3,4,3)
+     types<2>::connectivity *
+     (&functions<2>::connectivity_load) (const char *filename,
+                                         long unsigned *length)
+@@ -564,7 +573,11 @@ namespace internal
+       static
+       int (&connectivity_is_valid) (types<3>::connectivity *connectivity);
+ 
+-#if DEAL_II_P4EST_VERSION_GTE(0,3,4,3)
++#if DEAL_II_P4EST_VERSION_GTE(1,0,0,0)
++      static
++      types<3>::connectivity *(&connectivity_load) (const char *filename,
++                                                    size_t *length);
++#elif DEAL_II_P4EST_VERSION_GTE(0,3,4,3)
+       static
+       types<3>::connectivity *(&connectivity_load) (const char *filename,
+                                                     long unsigned *length);
+@@ -747,7 +760,12 @@ namespace internal
+                                                 *connectivity)
+       = p8est_connectivity_is_valid;
+ 
+-#if DEAL_II_P4EST_VERSION_GTE(0,3,4,3)
++#if DEAL_II_P4EST_VERSION_GTE(1,0,0,0)
++    types<3>::connectivity *
++    (&functions<3>::connectivity_load) (const char *filename,
++                                        size_t *length)
++      = p8est_connectivity_load;
++#elif DEAL_II_P4EST_VERSION_GTE(0,3,4,3)
+     types<3>::connectivity *
+     (&functions<3>::connectivity_load) (const char *filename,
+                                         long unsigned *length)
-- 
2.2.1

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

* Re: [PATCH 01/14] gnu: hwloc: Upgrade to 1.10.1.
  2015-06-28  3:45 ` [PATCH 01/14] gnu: hwloc: Upgrade to 1.10.1 ericbavier
@ 2015-06-28  9:08   ` Ludovic Courtès
  0 siblings, 0 replies; 36+ messages in thread
From: Ludovic Courtès @ 2015-06-28  9:08 UTC (permalink / raw)
  To: ericbavier; +Cc: guix-devel, Eric Bavier

ericbavier@openmailbox.org skribis:

> From: Eric Bavier <bavier@member.fsf.org>
>
> * gnu/packages/patches/hwloc-gather-topology-lstopo.patch: New patch.
> * gnu/packages/mpi.scm (hwloc): Upgrade to 1.10.1.
>   [source]: Use patch.
>   [propagated-inputs]: Remove libpci.
>   [inputs]: Add libpciaccess.
> * gnu-system.am (dist_patch_DATA): Add patch.

LGTM!

Thanks,
Ludo'.

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

* Re: [PATCH 02/14] gnu: hwloc: Move numactl to inputs.
  2015-06-28  3:45 ` [PATCH 02/14] gnu: hwloc: Move numactl to inputs ericbavier
@ 2015-06-28  9:09   ` Ludovic Courtès
  0 siblings, 0 replies; 36+ messages in thread
From: Ludovic Courtès @ 2015-06-28  9:09 UTC (permalink / raw)
  To: ericbavier; +Cc: guix-devel, Eric Bavier

ericbavier@openmailbox.org skribis:

> From: Eric Bavier <bavier@member.fsf.org>
>
> * gnu/packages/mpi.scm (hwloc)[propagated-inputs]: Move numactl from here...
>   [inputs]: ...to here.
>   [arguments]: New 'refine-libnuma' phase.

Good idea, LGTM.

Ludo’.

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

* Re: [PATCH 03/14] gnu: openmpi: Upgrade to 1.8.5.
  2015-06-28  3:45 ` [PATCH 03/14] gnu: openmpi: Upgrade to 1.8.5 ericbavier
@ 2015-06-28  9:10   ` Ludovic Courtès
  0 siblings, 0 replies; 36+ messages in thread
From: Ludovic Courtès @ 2015-06-28  9:10 UTC (permalink / raw)
  To: ericbavier; +Cc: guix-devel, Eric Bavier

ericbavier@openmailbox.org skribis:

> From: Eric Bavier <bavier@member.fsf.org>
>
> * gnu/packages/mpi.scm (openmpi): Upgrade to 1.8.5.
>   [native-inputs]: Add perl.
>   [arguments]: Add configure flags for thread support.

LGTM.

BTW, make sure to check the output of ‘guix size’ or ‘guix gc
--references’ for any discrepancies (e.g., is Perl retained here?).

Thanks,
Ludo’.

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

* Re: [PATCH 04/14] gnu: Update scotch to 6.0.4.
  2015-06-28  3:45 ` [PATCH 04/14] gnu: Update scotch to 6.0.4 ericbavier
@ 2015-06-28  9:12   ` Ludovic Courtès
  0 siblings, 0 replies; 36+ messages in thread
From: Ludovic Courtès @ 2015-06-28  9:12 UTC (permalink / raw)
  To: ericbavier; +Cc: guix-devel, Eric Bavier

ericbavier@openmailbox.org skribis:

> From: Eric Bavier <bavier@member.fsf.org>
>
> * gnu/packages/maths.scm (scotch): Update to 6.0.4.
>   [arguments]: Add -fPIC to CFLAGS.
> * gnu/packages/patches/scotch-test-threading.patch: Adjust patch for a
>   new set of test fixes.
> * gnu/packages/patches/pt-scotch-build-parallelism.patch: New patch.
> * gnu-system.am (dist_patch_DATA): Add it.

LGTM.

It would be good to state the upstream status in the .patch files.

Ludo’.

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

* Re: [PATCH 07/14] gnu: Add ScaLAPACK.
  2015-06-28  3:45 ` [PATCH 07/14] gnu: Add ScaLAPACK ericbavier
@ 2015-06-28  9:12   ` Ludovic Courtès
  0 siblings, 0 replies; 36+ messages in thread
From: Ludovic Courtès @ 2015-06-28  9:12 UTC (permalink / raw)
  To: ericbavier; +Cc: guix-devel, Eric Bavier

ericbavier@openmailbox.org skribis:

> From: Eric Bavier <bavier@member.fsf.org>
>
> * gnu/packages/maths.scm (scalapack): New variable.

LGTM!

Ludo'.

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

* Re: [PATCH 06/14] gnu: scotch, pt-scotch: Build esmumps libraries.
  2015-06-28  3:45 ` [PATCH 06/14] gnu: scotch, pt-scotch: Build esmumps libraries ericbavier
@ 2015-06-28  9:14   ` Ludovic Courtès
  0 siblings, 0 replies; 36+ messages in thread
From: Ludovic Courtès @ 2015-06-28  9:14 UTC (permalink / raw)
  To: ericbavier; +Cc: guix-devel, Eric Bavier

ericbavier@openmailbox.org skribis:

> From: Eric Bavier <bavier@member.fsf.org>
>
> * gnu/packages/maths.scm (scotch)[arguments]: Add 'build-esmumps
>   phase.  Install esmumps libraries and headers in 'install phase.
>   (pt-scotch)[arguments]: Build ptesmumps in 'build phase.  Add
>   make parallelism.

[...]

> +            (zero? (system* "make"
> +                            (format #f "-j~a" (current-processor-count))

Use ‘parallel-job-count’ instead.

> +               (zero? (system* "make"
> +                               (format #f "-j~a" (current-processor-count))

Ditto.

OK with this change.

Ludo’.

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

* Re: [PATCH 05/14] gnu: scotch, pt-scotch: Use modify-phases.
  2015-06-28  3:45 ` [PATCH 05/14] gnu: scotch, pt-scotch: Use modify-phases ericbavier
@ 2015-06-28  9:15   ` Ludovic Courtès
  0 siblings, 0 replies; 36+ messages in thread
From: Ludovic Courtès @ 2015-06-28  9:15 UTC (permalink / raw)
  To: ericbavier; +Cc: guix-devel, Eric Bavier

ericbavier@openmailbox.org skribis:

> * gnu/packages/maths.scm (scotch, pt-scotch)[arguments]: Use modify-phases.

OK!

Ludo’.

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

* Re: [PATCH 10/14] gnu: Add MUMPS.
  2015-06-28 20:12   ` Ludovic Courtès
@ 2015-06-28 15:59     ` Eric Bavier
  0 siblings, 0 replies; 36+ messages in thread
From: Eric Bavier @ 2015-06-28 15:59 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel, Eric Bavier

On Sun, 28 Jun 2015 22:12:40 +0200
ludo@gnu.org (Ludovic Courtès) wrote:

> ericbavier@openmailbox.org skribis:
> 
> > From: Eric Bavier <bavier@member.fsf.org>
> >
> > * gnu/packages/maths.scm (mumps, mumps-metis, mumps-openmpi)
> >   (mumps-metis-openmpi): New variables.
> > * gnu/packages/patches/mumps-build-parallelism.patch: New patch.
> > * gnu-system.am (dist_patch_DATA): Add it.
> 
> ISTR that some time ago MUMPS included obfuscated code; I assume this
> is no longer the case?

Indeed, the 5.0.0 release no longer contains obfuscated code.  I had
not realized this; thanks for bringing it my attention! ;)

> 
> > +            (zero? (system* "make" "all"
> > +                            (format #f
> > "-j~a" (current-processor-count))))))
> 
> Rather ‘parallel-job-count’.

OK

> 
> > +          (lambda* (#:key (exec-prefix '()) #:allow-other-keys)
> > +            (with-directory-excursion "examples"
> > +              (use-modules (srfi srfi-1))
> > +              (every
> > +               (lambda (prec type)
> > +                 (use-modules (ice-9 popen))
> 
> Local ‘use-modules’ forms are not very nice (it’s not documented.)
> Rather use:
> 
>   #:modules ((srfi srfi-1)
>              (ice-9 popen)
>              ,@%gnu-build-system-modules)

Much nicer, yes.

> 
> > +                 (let ((tester (apply open-pipe*
> > +                                      `(,OPEN_WRITE
> > +                                        ,@exec-prefix
> > +                                        ,(string-append "./" prec
> > +
> > "simpletest"))))
> > +                       (input  (open-input-file
> > +                                (string-append "input_simpletest_"
> > type))))
> > +                   (begin
> > +                     (dump-port input tester)
> > +                     (close-port input)
> > +                     (zero? (close-pipe tester)))))
> > +               '("s" "d" "c" "z")
> > +               '("real" "real" "cmplx" "cmplx")))))
> 
> Please add a comment saying that this does, to appease the
> reader.  ;-)

Sure thing.

> 
> > +    (license license:public-domain)))
> 
> I think it’s CeCILL-C, see
> <http://mumps.enseeiht.fr/index.php?page=dwnld>.

Good catch.  Yes, this is also new in the 5.0.0 release.  I believe I
orginally started writing this recipe for 4.10.0.  

Thanks for the review,
`~Eric

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

* Re: [PATCH 14/14] gnu: Add deal.II.
  2015-06-28 20:22   ` Ludovic Courtès
@ 2015-06-28 16:05     ` Eric Bavier
  2015-06-28 21:09       ` Andreas Enge
  0 siblings, 1 reply; 36+ messages in thread
From: Eric Bavier @ 2015-06-28 16:05 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel, Eric Bavier

On Sun, 28 Jun 2015 22:22:36 +0200
ludo@gnu.org (Ludovic Courtès) wrote:

> ericbavier@openmailbox.org skribis:
> 
> > From: Eric Bavier <bavier@member.fsf.org>
> >
> > * gnu/packages/maths.scm (deal.II, deal.II-openmpi): New variables.
> > * gnu/packages/patches/deal.II-p4est-interface.patch: New patch.
> > * gnu-system.am (dist_patch_DATA): Add it.
> 
> [...]
> 
> > +(define-public deal.II
> > +  (package
> > +    (name "deal.II")
> 
> What about ‘deal-ii’ for both, or even ‘dealii’ (like the domain
> name)?

I would prefer to keep "deal.II" for the name at least, because that it
the software's declared name, despite the domain and tarball being
"dealii".  Are there arguments against it?

> 
> Otherwise LGTM.

Thanks,
`~Eric

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

* Re: [PATCH 08/14] gnu: Add p4est.
  2015-06-28  3:45 ` [PATCH 08/14] gnu: Add p4est ericbavier
@ 2015-06-28 20:03   ` Ludovic Courtès
  0 siblings, 0 replies; 36+ messages in thread
From: Ludovic Courtès @ 2015-06-28 20:03 UTC (permalink / raw)
  To: ericbavier; +Cc: guix-devel, Eric Bavier

ericbavier@openmailbox.org skribis:

> From: Eric Bavier <bavier@member.fsf.org>
>
> * gnu/packages/maths.scm (p4est, p4est-openmpi): New variables.

[...]

> +    (home-page "http://www.p4est.org")
> +    (synopsis "AMR on Forests of Octrees")

Rather: “Adaptive mesh refinement on forests of octrees.”

> +    (synopsis "Parallel AMR on Forests of Octrees")))

Likewise.

OK with this change.

Ludo’.

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

* Re: [PATCH 09/14] gnu: Add METIS.
  2015-06-28  3:45 ` [PATCH 09/14] gnu: Add METIS ericbavier
@ 2015-06-28 20:03   ` Ludovic Courtès
  0 siblings, 0 replies; 36+ messages in thread
From: Ludovic Courtès @ 2015-06-28 20:03 UTC (permalink / raw)
  To: ericbavier; +Cc: guix-devel, Eric Bavier

ericbavier@openmailbox.org skribis:

> From: Eric Bavier <bavier@member.fsf.org>
>
> * gnu/packages/maths.scm (metis): New variable.

OK!

Ludo'.

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

* Re: [PATCH 10/14] gnu: Add MUMPS.
  2015-06-28  3:45 ` [PATCH 10/14] gnu: Add MUMPS ericbavier
@ 2015-06-28 20:12   ` Ludovic Courtès
  2015-06-28 15:59     ` Eric Bavier
  0 siblings, 1 reply; 36+ messages in thread
From: Ludovic Courtès @ 2015-06-28 20:12 UTC (permalink / raw)
  To: ericbavier; +Cc: guix-devel, Eric Bavier

ericbavier@openmailbox.org skribis:

> From: Eric Bavier <bavier@member.fsf.org>
>
> * gnu/packages/maths.scm (mumps, mumps-metis, mumps-openmpi)
>   (mumps-metis-openmpi): New variables.
> * gnu/packages/patches/mumps-build-parallelism.patch: New patch.
> * gnu-system.am (dist_patch_DATA): Add it.

ISTR that some time ago MUMPS included obfuscated code; I assume this is
no longer the case?

> +            (zero? (system* "make" "all"
> +                            (format #f "-j~a" (current-processor-count))))))

Rather ‘parallel-job-count’.

> +          (lambda* (#:key (exec-prefix '()) #:allow-other-keys)
> +            (with-directory-excursion "examples"
> +              (use-modules (srfi srfi-1))
> +              (every
> +               (lambda (prec type)
> +                 (use-modules (ice-9 popen))

Local ‘use-modules’ forms are not very nice (it’s not documented.)
Rather use:

  #:modules ((srfi srfi-1)
             (ice-9 popen)
             ,@%gnu-build-system-modules)

> +                 (let ((tester (apply open-pipe*
> +                                      `(,OPEN_WRITE
> +                                        ,@exec-prefix
> +                                        ,(string-append "./" prec
> +                                                        "simpletest"))))
> +                       (input  (open-input-file
> +                                (string-append "input_simpletest_" type))))
> +                   (begin
> +                     (dump-port input tester)
> +                     (close-port input)
> +                     (zero? (close-pipe tester)))))
> +               '("s" "d" "c" "z")
> +               '("real" "real" "cmplx" "cmplx")))))

Please add a comment saying that this does, to appease the reader.  ;-)

> +    (license license:public-domain)))

I think it’s CeCILL-C, see
<http://mumps.enseeiht.fr/index.php?page=dwnld>.

OK with these changes!

Thanks,
Ludo’.

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

* Re: [PATCH 11/14] gnu: petsc: Upgrade to 3.6.0.
  2015-06-28  3:45 ` [PATCH 11/14] gnu: petsc: Upgrade to 3.6.0 ericbavier
@ 2015-06-28 20:13   ` Ludovic Courtès
  0 siblings, 0 replies; 36+ messages in thread
From: Ludovic Courtès @ 2015-06-28 20:13 UTC (permalink / raw)
  To: ericbavier; +Cc: guix-devel, Eric Bavier

ericbavier@openmailbox.org skribis:

> From: Eric Bavier <bavier@member.fsf.org>
>
> * gnu/packages/maths.scm (petsc): Upgrade to 3.6.0.
> * gnu/packages/patches/petsc-fix-threadcomm.patch: Delete patch.
> * gnu-system.am (dist_patch_DATA): Remove it.

OK!

Ludo’.

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

* Re: [PATCH 12/14] gnu: Add arpack-ng-openmpi.
  2015-06-28  3:45 ` [PATCH 12/14] gnu: Add arpack-ng-openmpi ericbavier
@ 2015-06-28 20:13   ` Ludovic Courtès
  0 siblings, 0 replies; 36+ messages in thread
From: Ludovic Courtès @ 2015-06-28 20:13 UTC (permalink / raw)
  To: ericbavier; +Cc: guix-devel, Eric Bavier

ericbavier@openmailbox.org skribis:

> From: Eric Bavier <bavier@member.fsf.org>
>
> * gnu/packages/maths.scm (arpack-ng-openmpi): New variable.

OK.

Ludo'.

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

* Re: [PATCH 13/14] gnu: Add SLEPc.
  2015-06-28  3:45 ` [PATCH 13/14] gnu: Add SLEPc ericbavier
@ 2015-06-28 20:18   ` Ludovic Courtès
  0 siblings, 0 replies; 36+ messages in thread
From: Ludovic Courtès @ 2015-06-28 20:18 UTC (permalink / raw)
  To: ericbavier; +Cc: guix-devel, Eric Bavier

ericbavier@openmailbox.org skribis:

> From: Eric Bavier <bavier@member.fsf.org>
>
> * gnu/packages/maths.scm (slepc, slepc-complex, slepc-openmpi)
>   (slepc-complex-openmpi): New variables.

[...]

> +          'install 'delete-doc
> +          ;; SLEPc installs polluting HTML documentation alongside headers in
> +          ;; $out/include.  Delete these, as users can browse them online.

It would be best to move them to a “doc” output, so that users can have
them handy and be sure it’s the documentation that correspond to the
version they’re using.

OK with this change.

> +(define-public slepc-complex
> +  (package (inherit slepc)
> +    (name "slepc-complex")
> +    (propagated-inputs
> +     `(("petsc" ,petsc-complex)
> +       ,@(alist-delete "petsc" (package-propagated-inputs slepc))))
> +    (synopsis "Scalable library for eigenproblems (with complex scalars)")))
> +
> +(define-public slepc-openmpi
> +  (package (inherit slepc)
> +    (name "slepc-openmpi")
> +    (inputs
> +     `(("mpi" ,openmpi)
> +       ("arpack" ,arpack-ng-openmpi)
> +       ,@(alist-delete "arpack" (package-inputs slepc))))
> +    (propagated-inputs
> +     `(("petsc" ,petsc-openmpi)
> +       ,@(alist-delete "petsc" (package-propagated-inputs slepc))))
> +    (synopsis "Scalable library for eigenproblems (with MPI support)")))
> +
> +(define-public slepc-complex-openmpi
> +  (package (inherit slepc-openmpi)
> +    (name "slepc-complex-openmpi")
> +    (propagated-inputs
> +     `(("petsc" ,petsc-complex-openmpi)
> +       ,@(alist-delete "petsc" (package-propagated-inputs slepc-openmpi))))
> +    (synopsis "Scalable library for eigenproblems (with complex scalars and MPI support)")))

That may call for a better system to override dependencies and build
options à la Spack.

OTOH, we do want common variants to be available explicitly as packages
so that they get built on Hydra and so on.

Food for thought...

Ludo’.

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

* Re: [PATCH 14/14] gnu: Add deal.II.
  2015-06-28  3:45 ` [PATCH 14/14] gnu: Add deal.II ericbavier
@ 2015-06-28 20:22   ` Ludovic Courtès
  2015-06-28 16:05     ` Eric Bavier
  0 siblings, 1 reply; 36+ messages in thread
From: Ludovic Courtès @ 2015-06-28 20:22 UTC (permalink / raw)
  To: ericbavier; +Cc: guix-devel, Eric Bavier

ericbavier@openmailbox.org skribis:

> From: Eric Bavier <bavier@member.fsf.org>
>
> * gnu/packages/maths.scm (deal.II, deal.II-openmpi): New variables.
> * gnu/packages/patches/deal.II-p4est-interface.patch: New patch.
> * gnu-system.am (dist_patch_DATA): Add it.

[...]

> +(define-public deal.II
> +  (package
> +    (name "deal.II")

What about ‘deal-ii’ for both, or even ‘dealii’ (like the domain name)?

Otherwise LGTM.

Thanks,
Ludo’.

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

* Re: [PATCH 14/14] gnu: Add deal.II.
  2015-06-28 16:05     ` Eric Bavier
@ 2015-06-28 21:09       ` Andreas Enge
  2015-06-29  8:39         ` Ludovic Courtès
  0 siblings, 1 reply; 36+ messages in thread
From: Andreas Enge @ 2015-06-28 21:09 UTC (permalink / raw)
  To: Eric Bavier; +Cc: guix-devel, Eric Bavier

On Sun, Jun 28, 2015 at 11:05:35AM -0500, Eric Bavier wrote:
> I would prefer to keep "deal.II" for the name at least, because that it
> the software's declared name, despite the domain and tarball being
> "dealii".  Are there arguments against it?

The package naming conventions. We always transform to lowercase, and replace
special characters by "-". So both "dealii" (as the tarball name) and
"deal-ii" (transformation of the project name) would be fine.

Andreas

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

* Re: [PATCH 14/14] gnu: Add deal.II.
  2015-06-28 21:09       ` Andreas Enge
@ 2015-06-29  8:39         ` Ludovic Courtès
  2015-06-30 19:55           ` Eric Bavier
  0 siblings, 1 reply; 36+ messages in thread
From: Ludovic Courtès @ 2015-06-29  8:39 UTC (permalink / raw)
  To: Andreas Enge; +Cc: guix-devel, Eric Bavier

Andreas Enge <andreas@enge.fr> skribis:

> On Sun, Jun 28, 2015 at 11:05:35AM -0500, Eric Bavier wrote:
>> I would prefer to keep "deal.II" for the name at least, because that it
>> the software's declared name, despite the domain and tarball being
>> "dealii".  Are there arguments against it?
>
> The package naming conventions. We always transform to lowercase, and replace
> special characters by "-". So both "dealii" (as the tarball name) and
> "deal-ii" (transformation of the project name) would be fine.

+1

Ludo’.

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

* Re: [PATCH 14/14] gnu: Add deal.II.
  2015-06-29  8:39         ` Ludovic Courtès
@ 2015-06-30 19:55           ` Eric Bavier
  2015-07-04  7:40             ` Mark H Weaver
  0 siblings, 1 reply; 36+ messages in thread
From: Eric Bavier @ 2015-06-30 19:55 UTC (permalink / raw)
  To: ludo; +Cc: guix-devel, Eric Bavier

On 2015-06-29 03:39, ludo@gnu.org wrote:
> Andreas Enge <andreas@enge.fr> skribis:
> 
>> On Sun, Jun 28, 2015 at 11:05:35AM -0500, Eric Bavier wrote:
>>> I would prefer to keep "deal.II" for the name at least, because that 
>>> it
>>> the software's declared name, despite the domain and tarball being
>>> "dealii".  Are there arguments against it?
>> 
>> The package naming conventions. We always transform to lowercase, and 
>> replace
>> special characters by "-". So both "dealii" (as the tarball name) and
>> "deal-ii" (transformation of the project name) would be fine.
> 
> +1
> 
> Ludo’.

Thanks for the clarification.  I ended up pushing with the "dealii" 
name.

-- 
`~Eric

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

* Re: [PATCH 14/14] gnu: Add deal.II.
  2015-06-30 19:55           ` Eric Bavier
@ 2015-07-04  7:40             ` Mark H Weaver
  2015-07-05 10:20               ` Ludovic Courtès
  0 siblings, 1 reply; 36+ messages in thread
From: Mark H Weaver @ 2015-07-04  7:40 UTC (permalink / raw)
  To: Eric Bavier; +Cc: guix-devel, Eric Bavier

Eric Bavier <ericbavier@openmailbox.org> writes:
> I ended up pushing with the "dealii" name.

In the build logs, I see many occurrences of the following warning:

  Assembler messages:
  Warning: cannot compress debug sections (zlib not installed)

presumably because of the -Wa,--compress-debug-sections option passed to
the compiler.  How about adding zlib to native-inputs?

      Mark

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

* Re: [PATCH 14/14] gnu: Add deal.II.
  2015-07-04  7:40             ` Mark H Weaver
@ 2015-07-05 10:20               ` Ludovic Courtès
  0 siblings, 0 replies; 36+ messages in thread
From: Ludovic Courtès @ 2015-07-05 10:20 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel, Eric Bavier

Mark H Weaver <mhw@netris.org> skribis:

> Eric Bavier <ericbavier@openmailbox.org> writes:
>> I ended up pushing with the "dealii" name.
>
> In the build logs, I see many occurrences of the following warning:
>
>   Assembler messages:
>   Warning: cannot compress debug sections (zlib not installed)
>
> presumably because of the -Wa,--compress-debug-sections option passed to
> the compiler.  How about adding zlib to native-inputs?

Adding zlib might silence the warnings, but the debugging symbols are
stripped later on anyway (and there’s no “debug” output.)  So either way
is fine, IMO.

(In the future it would be nice to systematically compress debugging
sections that go to “debug” outputs.)

Ludo’.

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

end of thread, other threads:[~2015-07-05 10:20 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-28  3:45 [PATCH 00/14] Add deal.II and some dependencies ericbavier
2015-06-28  3:45 ` [PATCH 01/14] gnu: hwloc: Upgrade to 1.10.1 ericbavier
2015-06-28  9:08   ` Ludovic Courtès
2015-06-28  3:45 ` [PATCH 02/14] gnu: hwloc: Move numactl to inputs ericbavier
2015-06-28  9:09   ` Ludovic Courtès
2015-06-28  3:45 ` [PATCH 03/14] gnu: openmpi: Upgrade to 1.8.5 ericbavier
2015-06-28  9:10   ` Ludovic Courtès
2015-06-28  3:45 ` [PATCH 04/14] gnu: Update scotch to 6.0.4 ericbavier
2015-06-28  9:12   ` Ludovic Courtès
2015-06-28  3:45 ` [PATCH 05/14] gnu: scotch, pt-scotch: Use modify-phases ericbavier
2015-06-28  9:15   ` Ludovic Courtès
2015-06-28  3:45 ` [PATCH 06/14] gnu: scotch, pt-scotch: Build esmumps libraries ericbavier
2015-06-28  9:14   ` Ludovic Courtès
2015-06-28  3:45 ` [PATCH 07/14] gnu: Add ScaLAPACK ericbavier
2015-06-28  9:12   ` Ludovic Courtès
2015-06-28  3:45 ` [PATCH 08/14] gnu: Add p4est ericbavier
2015-06-28 20:03   ` Ludovic Courtès
2015-06-28  3:45 ` [PATCH 09/14] gnu: Add METIS ericbavier
2015-06-28 20:03   ` Ludovic Courtès
2015-06-28  3:45 ` [PATCH 10/14] gnu: Add MUMPS ericbavier
2015-06-28 20:12   ` Ludovic Courtès
2015-06-28 15:59     ` Eric Bavier
2015-06-28  3:45 ` [PATCH 11/14] gnu: petsc: Upgrade to 3.6.0 ericbavier
2015-06-28 20:13   ` Ludovic Courtès
2015-06-28  3:45 ` [PATCH 12/14] gnu: Add arpack-ng-openmpi ericbavier
2015-06-28 20:13   ` Ludovic Courtès
2015-06-28  3:45 ` [PATCH 13/14] gnu: Add SLEPc ericbavier
2015-06-28 20:18   ` Ludovic Courtès
2015-06-28  3:45 ` [PATCH 14/14] gnu: Add deal.II ericbavier
2015-06-28 20:22   ` Ludovic Courtès
2015-06-28 16:05     ` Eric Bavier
2015-06-28 21:09       ` Andreas Enge
2015-06-29  8:39         ` Ludovic Courtès
2015-06-30 19:55           ` Eric Bavier
2015-07-04  7:40             ` Mark H Weaver
2015-07-05 10:20               ` Ludovic Courtès

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