all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH 3/4] gnu: Add pt-scotch package.
@ 2014-05-17  5:57 Eric Bavier
  2014-05-17 10:43 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Bavier @ 2014-05-17  5:57 UTC (permalink / raw)
  To: guix-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0003-gnu-Add-pt-scotch-package.patch --]
[-- Type: text/x-diff, Size: 2808 bytes --]

From 936d49e8b0651a0e3b4674fcd34308c1d396de72 Mon Sep 17 00:00:00 2001
From: Eric Bavier <bavier@member.fsf.org>
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


[-- Attachment #2: Type: text/plain, Size: 133 bytes --]


-- 
Eric Bavier

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 3/4] gnu: Add pt-scotch package.
  2014-05-17  5:57 [PATCH 3/4] gnu: Add pt-scotch package Eric Bavier
@ 2014-05-17 10:43 ` Ludovic Courtès
  2014-05-18  0:18   ` Eric Bavier
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2014-05-17 10:43 UTC (permalink / raw)
  To: Eric Bavier; +Cc: guix-devel

Eric Bavier <ericbavier@gmail.com> skribis:

> From 936d49e8b0651a0e3b4674fcd34308c1d396de72 Mon Sep 17 00:00:00 2001
> From: Eric Bavier <bavier@member.fsf.org>
> 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.

Looks good to me.  One question:

> +           (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")))))

Could this be factorized with Scotch?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 3/4] gnu: Add pt-scotch package.
  2014-05-17 10:43 ` Ludovic Courtès
@ 2014-05-18  0:18   ` Eric Bavier
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Bavier @ 2014-05-18  0:18 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel


Ludovic Courtès writes:

> Eric Bavier <ericbavier@gmail.com> skribis:
>
>> From 936d49e8b0651a0e3b4674fcd34308c1d396de72 Mon Sep 17 00:00:00 2001
>> From: Eric Bavier <bavier@member.fsf.org>
>> 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.
>
> Looks good to me.  One question:
>
>> +           (call-with-output-file "Makefile.inc"
>> +             (lambda (port)
>> +               (format port "
[...]
>
> Could this be factorized with Scotch?

I probably could be.  I will look at it some more.

-- 
Eric Bavier

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-18  0:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-17  5:57 [PATCH 3/4] gnu: Add pt-scotch package Eric Bavier
2014-05-17 10:43 ` Ludovic Courtès
2014-05-18  0:18   ` Eric Bavier

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.