all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ericbavier@openmailbox.org
To: guix-devel@gnu.org
Cc: Eric Bavier <bavier@member.fsf.org>
Subject: [PATCH 04/14] gnu: Update scotch to 6.0.4.
Date: Sat, 27 Jun 2015 22:45:41 -0500	[thread overview]
Message-ID: <1435463151-32099-5-git-send-email-ericbavier@openmailbox.org> (raw)
In-Reply-To: <1435463151-32099-1-git-send-email-ericbavier@openmailbox.org>

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

  parent reply	other threads:[~2015-06-28  3:44 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` ericbavier [this message]
2015-06-28  9:12   ` [PATCH 04/14] gnu: Update scotch to 6.0.4 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1435463151-32099-5-git-send-email-ericbavier@openmailbox.org \
    --to=ericbavier@openmailbox.org \
    --cc=bavier@member.fsf.org \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.