From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Bavier Subject: [PATCH 3/4] gnu: Add pt-scotch package. Date: Sat, 17 May 2014 00:57:17 -0500 Message-ID: <8761l57xs2.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33026) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlXZi-0004Lr-RX for guix-devel@gnu.org; Sat, 17 May 2014 01:54:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WlXZd-0003IN-RP for guix-devel@gnu.org; Sat, 17 May 2014 01:54:26 -0400 Received: from mail-ie0-x236.google.com ([2607:f8b0:4001:c03::236]:47217) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlXZd-0003II-M8 for guix-devel@gnu.org; Sat, 17 May 2014 01:54:21 -0400 Received: by mail-ie0-f182.google.com with SMTP id as1so190661iec.41 for ; Fri, 16 May 2014 22:54:21 -0700 (PDT) Received: from cooper.gmail.com (chippewa-nat.cray.com. [136.162.34.1]) by mx.google.com with ESMTPSA id w4sm3307063igl.7.2014.05.16.22.54.19 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 16 May 2014 22:54:19 -0700 (PDT) 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 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0003-gnu-Add-pt-scotch-package.patch >From 936d49e8b0651a0e3b4674fcd34308c1d396de72 Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Sat, 17 May 2014 00:31:59 -0500 Subject: [PATCH 3/4] gnu: Add pt-scotch package. * gnu/packages/maths.scm (pt-scotch): New variable. --- gnu/packages/maths.scm | 66 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 0366385..d9f846e 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -663,3 +663,69 @@ partitioning, static mapping, and sparse matrix ordering, in application domains ranging from structural mechanics to operating systems or bio-chemistry.") (license (license:fsf-free "file://LICENSE_en.txt")))) + +(define-public pt-scotch + (package (inherit scotch) + (name "pt-scotch") + (inputs + `(("openmpi" ,openmpi) + ,@(package-inputs scotch))) + (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 " +EXE = +LIB = .a +OBJ = .o +MAKE = make +AR = ar +ARFLAGS = -ruv +CCS = gcc +CCP = mpicc +CCD = gcc +CPPFLAGS =~{ -D~a~} +CFLAGS = -O2 -g $(CPPFLAGS) +LDFLAGS = -lz -lm -lrt -lpthread +CP = cp +LEX = flex -Pscotchyy -olex.yy.c +LN = ln +MKDIR = mkdir +MV = mv +RANLIB = ranlib +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 + ;; "SCOTCH_PTHREAD" + ;; "SCOTCH_PTHREAD_NUMBER=2" + "restrict=__restrict"))))) + (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")))) + %standard-phases))))))) + (synopsis "Programs and libraries for graph algorithms (with MPI)"))) -- 1.7.9.5 --=-=-= -- Eric Bavier Please avoid sending me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.html --=-=-=--