From mboxrd@z Thu Jan 1 00:00:00 1970 From: ericbavier@openmailbox.org Subject: [PATCH 06/14] gnu: scotch, pt-scotch: Build esmumps libraries. Date: Sat, 27 Jun 2015 22:45:43 -0500 Message-ID: <1435463151-32099-7-git-send-email-ericbavier@openmailbox.org> References: <1435463151-32099-1-git-send-email-ericbavier@openmailbox.org> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z93Wd-00014W-7o for guix-devel@gnu.org; Sat, 27 Jun 2015 23:45:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z93WY-0003f6-O3 for guix-devel@gnu.org; Sat, 27 Jun 2015 23:44:59 -0400 Received: from smtp26.openmailbox.org ([62.4.1.60]:33441) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z93WY-0003eZ-IO for guix-devel@gnu.org; Sat, 27 Jun 2015 23:44:54 -0400 In-Reply-To: <1435463151-32099-1-git-send-email-ericbavier@openmailbox.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org Cc: Eric Bavier From: Eric Bavier * 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