Skip to content
Snippets Groups Projects
Commit cf0ec6c4 authored by Eric Bavier's avatar Eric Bavier
Browse files

gnu: scotch, pt-scotch: Build esmumps libraries.

* 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.
parent d6602ee9
No related branches found
No related tags found
No related merge requests found
...@@ -818,6 +818,7 @@ (define-public scotch ...@@ -818,6 +818,7 @@ (define-public scotch
MAKE = make MAKE = make
AR = ar AR = ar
ARFLAGS = -ruv ARFLAGS = -ruv
CAT = cat
CCS = gcc CCS = gcc
CCP = mpicc CCP = mpicc
CCD = gcc CCD = gcc
...@@ -835,10 +836,18 @@ (define-public scotch ...@@ -835,10 +836,18 @@ (define-public scotch
'("COMMON_FILE_COMPRESS_GZ" '("COMMON_FILE_COMPRESS_GZ"
"COMMON_PTHREAD" "COMMON_PTHREAD"
"COMMON_RANDOM_FIXED_SEED" "COMMON_RANDOM_FIXED_SEED"
;; Prevents symbolc clashes with libesmumps
"SCOTCH_RENAME"
;; XXX: Causes invalid frees in superlu-dist tests ;; XXX: Causes invalid frees in superlu-dist tests
;; "SCOTCH_PTHREAD" ;; "SCOTCH_PTHREAD"
;; "SCOTCH_PTHREAD_NUMBER=2" ;; "SCOTCH_PTHREAD_NUMBER=2"
"restrict=__restrict")))))) "restrict=__restrict"))))))
(add-after
'build 'build-esmumps
(lambda _
(zero? (system* "make"
(format #f "-j~a" (parallel-job-count))
"esmumps"))))
(replace (replace
'install 'install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
...@@ -846,7 +855,14 @@ (define-public scotch ...@@ -846,7 +855,14 @@ (define-public scotch
(mkdir out) (mkdir out)
(zero? (system* "make" (zero? (system* "make"
(string-append "prefix=" out) (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/") (home-page "http://www.labri.fr/perso/pelegrin/scotch/")
(synopsis "Programs and libraries for graph algorithms") (synopsis "Programs and libraries for graph algorithms")
(description "SCOTCH is a set of programs and libraries which implement (description "SCOTCH is a set of programs and libraries which implement
...@@ -870,10 +886,11 @@ (define-public pt-scotch ...@@ -870,10 +886,11 @@ (define-public pt-scotch
`(modify-phases ,scotch-phases `(modify-phases ,scotch-phases
(replace (replace
'build 'build
;; TODO: Would like to add parallelism here
(lambda _ (lambda _
(and (and
(zero? (system* "make" "ptscotch")) (zero? (system* "make"
(format #f "-j~a" (parallel-job-count))
"ptscotch" "ptesmumps"))
;; Install the serial metis compatibility library ;; Install the serial metis compatibility library
(zero? (system* "make" "-C" "libscotchmetis" "install"))))) (zero? (system* "make" "-C" "libscotchmetis" "install")))))
(replace (replace
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment