scotch: Upgrade to 6.0.6.

* gnu/packages/maths.scm (scotch): Upgrade to 6.0.6.
[source]: Remove patches that have been fixed upstream.
[arguments]: Add 'install-metis' phase.
[outputs]: New field.
(pt-scotch, pt-scotch32)[arguments]: Add 'mpi-setup' phase.  Use 'invoke'.
* gnu/packages/patches/scotch-graph-diam-64.patch,
gnu/packages/patches/scotch-graph-induce-type-64.patch,
gnu/packages/patches/scotch-test-threading.patch: Delete files.
* gnu/packages/patches/scotch-integer-declarations.patch: New file.
* gnu/local.mk (dist_patch_DATA): Adjust as necessary.
This commit is contained in:
Eric Bavier 2018-10-24 12:39:11 -05:00 committed by Eric Bavier
parent a6b9ebc2fc
commit fd3733432b
No known key found for this signature in database
GPG key ID: FD73CAC719D32566
6 changed files with 61 additions and 95 deletions

View file

@ -1219,10 +1219,8 @@ dist_patch_DATA = \
%D%/packages/patches/rust-reproducible-builds.patch \ %D%/packages/patches/rust-reproducible-builds.patch \
%D%/packages/patches/rxvt-unicode-escape-sequences.patch \ %D%/packages/patches/rxvt-unicode-escape-sequences.patch \
%D%/packages/patches/scheme48-tests.patch \ %D%/packages/patches/scheme48-tests.patch \
%D%/packages/patches/scotch-test-threading.patch \
%D%/packages/patches/scotch-build-parallelism.patch \ %D%/packages/patches/scotch-build-parallelism.patch \
%D%/packages/patches/scotch-graph-diam-64.patch \ %D%/packages/patches/scotch-integer-declarations.patch \
%D%/packages/patches/scotch-graph-induce-type-64.patch \
%D%/packages/patches/scribus-poppler.patch \ %D%/packages/patches/scribus-poppler.patch \
%D%/packages/patches/sdl-libx11-1.6.patch \ %D%/packages/patches/sdl-libx11-1.6.patch \
%D%/packages/patches/seq24-rename-mutex.patch \ %D%/packages/patches/seq24-rename-mutex.patch \

View file

@ -2424,25 +2424,25 @@ (define-public superlu-dist
(define-public scotch (define-public scotch
(package (package
(name "scotch") (name "scotch")
(version "6.0.5a") (version "6.0.6")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "https://gforge.inria.fr/frs/download.php/" (uri (string-append "https://gforge.inria.fr/frs/download.php/"
"latestfile/298/scotch_" version ".tar.gz")) "latestfile/298/scotch_" version ".tar.gz"))
(sha256 (sha256
(base32 "0vsmgjz8qv80di3ljmc7hbdsizxxxwy2b9rgd2fl1mdc6dgbj8av")) (base32 "1ky4k9r6jvajhqaqnnx6h8fkmds2yxgp70dpr1qzwcyhi2nhqvv8"))
(patches (search-patches "scotch-test-threading.patch" (patches (search-patches "scotch-build-parallelism.patch"
"scotch-build-parallelism.patch" "scotch-integer-declarations.patch"))))
"scotch-graph-induce-type-64.patch"
"scotch-graph-diam-64.patch"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(inputs (inputs
`(("zlib" ,zlib) `(("zlib" ,zlib)
("flex" ,flex) ("flex" ,flex)
("bison" ,bison))) ("bison" ,bison)))
(outputs '("out" "metis"))
(arguments (arguments
`(#:phases `(#:make-flags (list (string-append "prefix=" %output))
#:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after (add-after
'unpack 'chdir-to-src 'unpack 'chdir-to-src
@ -2477,7 +2477,7 @@ (define-public scotch
'("COMMON_FILE_COMPRESS_GZ" '("COMMON_FILE_COMPRESS_GZ"
"COMMON_PTHREAD" "COMMON_PTHREAD"
"COMMON_RANDOM_FIXED_SEED" "COMMON_RANDOM_FIXED_SEED"
"INTSIZE64" ;use 'long' instead of 'int' "INTSIZE64" ;use 'int64_t'
;; Prevents symbolc clashes with libesmumps ;; Prevents symbolc clashes with libesmumps
"SCOTCH_RENAME" "SCOTCH_RENAME"
;; XXX: Causes invalid frees in superlu-dist tests ;; XXX: Causes invalid frees in superlu-dist tests
@ -2490,21 +2490,20 @@ (define-public scotch
(invoke "make" (invoke "make"
(format #f "-j~a" (parallel-job-count)) (format #f "-j~a" (parallel-job-count))
"esmumps"))) "esmumps")))
(replace (add-before 'install 'make-install-dirs
'install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))) (mkdir (assoc-ref outputs "out"))))
(add-after 'install 'install-metis
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "metis")))
(mkdir out) (mkdir out)
(invoke "make" ;; metis files are not installed with 'make install'
(string-append "prefix=" out)
"install")
;; esmumps files are not installed with the above
(for-each (lambda (f) (for-each (lambda (f)
(copy-file f (string-append out "/include/" f))) (install-file f (string-append out "/include")))
(find-files "../include" ".*esmumps.h$")) (find-files "../include/" ".*metis\\.h"))
(for-each (lambda (f) (for-each (lambda (f)
(copy-file f (string-append out "/lib/" f))) (install-file f (string-append out "/lib")))
(find-files "../lib" "^lib.*esmumps.*")) (find-files "../lib/" ".*metis\\..*"))
#t)))))) #t))))))
(home-page "http://www.labri.fr/perso/pelegrin/scotch/") (home-page "http://www.labri.fr/perso/pelegrin/scotch/")
(synopsis "Programs and libraries for graph algorithms") (synopsis "Programs and libraries for graph algorithms")

View file

@ -1,27 +0,0 @@
Fixes test_scotch_graph_diam test with -DINTSIZE64.
Reported upstream at
https://gforge.inria.fr/tracker/index.php?func=detail&aid=21650&group_id=248&atid=1081
--- scotch-6.0.5a/src/libscotch/library.h
+++ scotch-6.0.5a/src/libscotch/library.h
@@ -187,6 +187,7 @@ SCOTCH_Num SCOTCH_graphBase (SCOTCH_Graph * const, const SCO
int SCOTCH_graphCheck (const SCOTCH_Graph * const);
void SCOTCH_graphSize (const SCOTCH_Graph * const, SCOTCH_Num * const, SCOTCH_Num * const);
void SCOTCH_graphData (const SCOTCH_Graph * const, SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num ** const, SCOTCH_Num ** const, SCOTCH_Num ** const, SCOTCH_Num ** const, SCOTCH_Num * const, SCOTCH_Num ** const, SCOTCH_Num ** const);
+SCOTCH_Num SCOTCH_graphDiamPV (SCOTCH_Graph * const);
void SCOTCH_graphStat (const SCOTCH_Graph * const, SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const, double * const, double * const, SCOTCH_Num * const, SCOTCH_Num * const, double * const, double * const, SCOTCH_Num * const, SCOTCH_Num * const, SCOTCH_Num * const, double * const, double * const);
int SCOTCH_graphCoarsen (const SCOTCH_Graph * const, const SCOTCH_Num, const double, const SCOTCH_Num, SCOTCH_Graph * const, SCOTCH_Num * const);
int SCOTCH_graphCoarsenMatch (const SCOTCH_Graph * const, SCOTCH_Num * const, const double, const SCOTCH_Num, SCOTCH_Num * const);
--- scotch-6.0.5a/src/libscotch/library_graph_diam.c
+++ scotch-6.0.5a/src/libscotch/library_graph_diam.c
@@ -72,8 +72,7 @@
SCOTCH_Num
SCOTCH_graphDiamPV (
-SCOTCH_Graph * const grafptr,
-const SCOTCH_Num baseval)
+SCOTCH_Graph * const grafptr)
{
return ((SCOTCH_Num) graphDiamPV ((Graph * const) grafptr));
}

View file

@ -1,19 +0,0 @@
Fixes return type of SCOTCH_graphInduceList and SCOTCH_graphInducePart
so that the definition matches with -DINTSIZE64.
Reported upstream at
https://gforge.inria.fr/tracker/index.php?func=detail&aid=21608&group_id=248&atid=1081
--- scotch_6.0.5a/src/libscotch/library.h.orig 2018-02-11 10:52:38.000000000 -0600
+++ scotch_6.0.5a/src/libscotch/library.h 2018-02-23 16:56:41.000000000 -0600
@@ -199,8 +199,8 @@
int SCOTCH_graphGeomSaveChac (const SCOTCH_Graph * const, const SCOTCH_Geom * const, FILE * const, FILE * const, const char * const);
int SCOTCH_graphGeomSaveMmkt (const SCOTCH_Graph * const, const SCOTCH_Geom * const, FILE * const, FILE * const, const char * const);
int SCOTCH_graphGeomSaveScot (const SCOTCH_Graph * const, const SCOTCH_Geom * const, FILE * const, FILE * const, const char * const);
-int SCOTCH_graphInduceList (const SCOTCH_Graph * const, const SCOTCH_Num, const SCOTCH_Num * const, SCOTCH_Graph * const);
-int SCOTCH_graphInducePart (const SCOTCH_Graph * const, const SCOTCH_Num, const SCOTCH_GraphPart2 * const, const SCOTCH_GraphPart2, SCOTCH_Graph * const);
+SCOTCH_Num SCOTCH_graphInduceList (const SCOTCH_Graph * const, const SCOTCH_Num, const SCOTCH_Num * const, SCOTCH_Graph * const);
+SCOTCH_Num SCOTCH_graphInducePart (const SCOTCH_Graph * const, const SCOTCH_Num, const SCOTCH_GraphPart2 * const, const SCOTCH_GraphPart2, SCOTCH_Graph * const);
int SCOTCH_graphMapInit (const SCOTCH_Graph * const, SCOTCH_Mapping * const, const SCOTCH_Arch * const, SCOTCH_Num * const);
void SCOTCH_graphMapExit (const SCOTCH_Graph * const, SCOTCH_Mapping * const);

View file

@ -0,0 +1,37 @@
diff --git a/src/libscotch/library.h b/src/libscotch/library.h
index 1891c19..ecc0533 100644
--- a/src/libscotch/library.h
+++ b/src/libscotch/library.h
@@ -67,6 +67,8 @@
/*+ Integer type. +*/
+#include <stdint.h>
+
typedef DUMMYIDX SCOTCH_Idx;
typedef DUMMYINT SCOTCH_Num;
diff --git a/src/libscotchmetis/library_metis.h b/src/libscotchmetis/library_metis.h
index e6767e1..04e71c3 100644
--- a/src/libscotchmetis/library_metis.h
+++ b/src/libscotchmetis/library_metis.h
@@ -99,6 +99,7 @@ typedef enum {
*/
#ifndef SCOTCH_H /* In case "scotch.h" not included before */
+#include <stdint.h>
typedef DUMMYINT SCOTCH_Num;
#endif /* SCOTCH_H */
diff --git a/src/libscotchmetis/library_parmetis.h b/src/libscotchmetis/library_parmetis.h
index 6d2f0b0..3c803fc 100644
--- a/src/libscotchmetis/library_parmetis.h
+++ b/src/libscotchmetis/library_parmetis.h
@@ -106,6 +106,7 @@ typedef enum {
*/
#ifndef SCOTCH_H /* In case "scotch.h" not included before */
+#include <stdint.h>
typedef DUMMYINT SCOTCH_Num;
#endif /* SCOTCH_H */

View file

@ -1,22 +0,0 @@
Fix this test so that it succeeds when the library is not compiled with
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))
+#if ((defined COMMON_PTHREAD) && (defined SCOTCH_PTHREAD))
TestThread * restrict thrdtab;
int thrdnbr;
#endif /* ((defined COMMON_PTHREAD) || (defined SCOTCH_PTHREAD)) */
SCOTCH_errorProg (argv[0]);
-#if ((defined COMMON_PTHREAD) || (defined SCOTCH_PTHREAD))
+#if ((defined COMMON_PTHREAD) && (defined SCOTCH_PTHREAD))
thrdnbr = SCOTCH_PTHREAD_NUMBER;
groudat.redusum = COMPVAL (thrdnbr);