unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / Atom feed
* [bug#47619] [PATCH] add pt-scotch-shared/scotch-shared
@ 2021-04-06 11:22 Franck Pérignon
  2021-04-06 17:54 ` bug#47619: " Leo Famulari
  2021-04-08  7:21 ` [bug#47619] " Ludovic Courtès
  0 siblings, 2 replies; 5+ messages in thread
From: Franck Pérignon @ 2021-04-06 11:22 UTC (permalink / raw)
  To: 47619

[-- Attachment #1: Type: text/plain, Size: 120 bytes --]

Hello, 

the attached file add packages for scotch and pt-scotch that install shared libraries for both of them.



[-- Attachment #2: 0001-PATCH-Add-scotch-pt-scotch-with-shared-libraries.patch --]
[-- Type: application/octet-stream, Size: 4308 bytes --]

From e35d1d37df7419609dc5b25ee7b36163f45fcb98 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Franck=20P=C3=A9rignon?=
 <Franck.Perignon@univ-grenoble-alpes.fr>
Date: Tue, 6 Apr 2021 11:20:00 +0000
Subject: [PATCH] =?UTF-8?q?[PATCH]=C2=A0Add=20scotch/pt-scotch=20with=20sh?=
 =?UTF-8?q?ared=20libraries?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 gnu/packages/maths.scm | 81 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 81 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 5cd11ec435..ee249a4e81 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -43,6 +43,7 @@
 ;;; Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
 ;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
 ;;; Copyright © 2021 Gerd Heber <gerd.heber@gmail.com>
+;;; Copyright © 2021 Franck Pérignon <franck.perignon@univ-grenoble-alpes.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3246,6 +3247,63 @@ YACC = bison -pscotchyy -y -b y
     (synopsis
      "Programs and libraries for graph algorithms (32-bit integers)")))
 
+(define-public scotch-shared
+  (package (inherit scotch)
+    (name "scotch-shared")
+    (native-inputs
+     `(("gcc" ,gcc)
+       ("flex" ,flex)
+       ("bison" ,bison)))
+    (arguments
+     (substitute-keyword-arguments (package-arguments scotch)
+       ((#:phases scotch-shared-phases)
+        `(modify-phases ,scotch-shared-phases
+           (replace
+            'configure
+           (lambda _
+             ;; Otherwise, the RUNPATH will lack the final path component.
+             (setenv "RPATHFLAGS" (string-append "-Wl,-rpath="
+                                              (assoc-ref %outputs "out") "/lib"))
+            (call-with-output-file "Makefile.inc"
+              (lambda (port)
+                (format port "
+EXE =
+LIB = .so
+OBJ = .o
+MAKE = make
+AR = gcc
+ARFLAGS = -shared -o
+CAT = cat
+CCS = gcc
+CCP = mpicc
+CCD = gcc
+CPPFLAGS =~{ -D~a~}
+CFLAGS = -O2 -g -fPIC $(CPPFLAGS) $(RPATHFLAGS)
+CLIBFLAGS = -shared -fPIC
+LDFLAGS = -lz -lm -lrt -lpthread -Xlinker --no-as-needed
+CP = cp
+LEX = flex -Pscotchyy -olex.yy.c
+LN = ln
+MKDIR = mkdir
+MV = mv
+RANLIB = echo
+YACC = bison -pscotchyy -y -b y
+"
+                        '("COMMON_FILE_COMPRESS_GZ"
+                          "COMMON_PTHREAD"
+                          "COMMON_RANDOM_FIXED_SEED"
+                          "INTSIZE64"             ;use 'int64_t'
+                          ;; Prevents symbolc clashes with libesmumps
+                          "SCOTCH_RENAME"
+                          ;; XXX: Causes invalid frees in superlu-dist tests
+                          ;; "SCOTCH_PTHREAD"
+                          ;; "SCOTCH_PTHREAD_NUMBER=2"
+                          "restrict=__restrict"
+                          ))))#t))
+           (delete 'check)))))
+     (synopsis
+      "Programs and libraries for graph algorithms (shared libraries version)")))
+
 (define-public pt-scotch
   (package (inherit scotch)
     (name "pt-scotch")
@@ -3293,6 +3351,29 @@ YACC = bison -pscotchyy -y -b y
     (synopsis
      "Programs and libraries for graph algorithms (with MPI and 32-bit integers)")))
 
+(define-public pt-scotch-shared
+  (package (inherit scotch-shared)
+    (name "pt-scotch-shared")
+    (propagated-inputs
+     `(("openmpi" ,openmpi)))           ;Headers include MPI headers
+    (arguments
+     (substitute-keyword-arguments (package-arguments scotch-shared)
+       ((#:phases scotch-shared-phases)
+        `(modify-phases ,scotch-shared-phases
+           (replace
+            'build
+            (lambda _
+              (invoke "make" (format #f "-j~a" (parallel-job-count))
+                      "ptscotch" "ptesmumps")
+
+              ;; Install the serial metis compatibility library
+              (invoke "make" "-C" "libscotchmetis" "install")))
+           (add-before 'check 'mpi-setup
+             ,%openmpi-setup)))))
+    (synopsis "Programs and libraries for graph algorithms
+               (shared libraries version, with MPI)")))
+
+
 (define-public metis
   (package
     (name "metis")
-- 
2.25.1


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

* bug#47619: [PATCH] add pt-scotch-shared/scotch-shared
  2021-04-06 11:22 [bug#47619] [PATCH] add pt-scotch-shared/scotch-shared Franck Pérignon
@ 2021-04-06 17:54 ` Leo Famulari
  2021-04-08  7:21 ` [bug#47619] " Ludovic Courtès
  1 sibling, 0 replies; 5+ messages in thread
From: Leo Famulari @ 2021-04-06 17:54 UTC (permalink / raw)
  To: Franck Pérignon; +Cc: 47619-done

On Tue, Apr 06, 2021 at 01:22:37PM +0200, Franck Pérignon wrote:
> Hello, 
> 
> the attached file add packages for scotch and pt-scotch that install shared libraries for both of them.

Thanks! I shortened the synopsis of pt-scotch-shared, to satisfy `guix
lint`, and pushed as 5fd046cbfd73ac178c02c503f3d8e2104a929e52.




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

* [bug#47619] [PATCH] add pt-scotch-shared/scotch-shared
  2021-04-06 11:22 [bug#47619] [PATCH] add pt-scotch-shared/scotch-shared Franck Pérignon
  2021-04-06 17:54 ` bug#47619: " Leo Famulari
@ 2021-04-08  7:21 ` Ludovic Courtès
  2021-04-10  3:24   ` Eric Bavier
  1 sibling, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2021-04-08  7:21 UTC (permalink / raw)
  To: Franck Pérignon; +Cc: 47619, Eric Bavier, Leo Famulari

Hello,

Franck Pérignon <Franck.Perignon@univ-grenoble-alpes.fr> skribis:

> +(define-public scotch-shared
> +  (package (inherit scotch)
> +    (name "scotch-shared")
> +    (native-inputs
> +     `(("gcc" ,gcc)
> +       ("flex" ,flex)
> +       ("bison" ,bison)))
> +    (arguments
> +     (substitute-keyword-arguments (package-arguments scotch)
> +       ((#:phases scotch-shared-phases)
> +        `(modify-phases ,scotch-shared-phases

Thanks for the packages, Franck!

I was wondering whether we should provide exclusively shared libraries,
as we do for other packages, instead of keeping ‘scotch’ and
‘scotch-shared’.  Thoughts?

(If we do keep both, the naming convention so far is the opposite: ‘foo’
and ‘foo-static’.)

Thanks,
Ludo’.




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

* [bug#47619] [PATCH] add pt-scotch-shared/scotch-shared
  2021-04-08  7:21 ` [bug#47619] " Ludovic Courtès
@ 2021-04-10  3:24   ` Eric Bavier
  2021-04-10  9:59     ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Bavier @ 2021-04-10  3:24 UTC (permalink / raw)
  To: Ludovic Courtès, Franck Pérignon
  Cc: 47619, Eric Bavier, Leo Famulari

On Thu, 2021-04-08 at 09:21 +0200, Ludovic Courtès wrote:
> Hello,
> I was wondering whether we should provide exclusively shared libraries,
> as we do for other packages, instead of keeping ‘scotch’ and
> ‘scotch-shared’.  Thoughts?

I know in the past many in the HPC realm have wanted to have static
libraries available, to avoid the costs associated with start-up
linking and global function table indirection.

Some current developments, such as some HPC system vendors moving to
support only shared libraries on future systems, suggests that this
preference might be waning.

my 2-cents,
`~Eric





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

* [bug#47619] [PATCH] add pt-scotch-shared/scotch-shared
  2021-04-10  3:24   ` Eric Bavier
@ 2021-04-10  9:59     ` Ludovic Courtès
  0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2021-04-10  9:59 UTC (permalink / raw)
  To: Eric Bavier; +Cc: Franck Pérignon, Eric Bavier, 47619, Leo Famulari

Hi,

Eric Bavier <bavier@posteo.net> skribis:

> On Thu, 2021-04-08 at 09:21 +0200, Ludovic Courtès wrote:
>> Hello,
>> I was wondering whether we should provide exclusively shared libraries,
>> as we do for other packages, instead of keeping ‘scotch’ and
>> ‘scotch-shared’.  Thoughts?
>
> I know in the past many in the HPC realm have wanted to have static
> libraries available, to avoid the costs associated with start-up
> linking and global function table indirection.
>
> Some current developments, such as some HPC system vendors moving to
> support only shared libraries on future systems, suggests that this
> preference might be waning.

Yeah, I doubt this preference is justified, I feel it’s more one of
these cultural things.  But yeah, let’s keep both for now.

Would it make sense to rename “scotch” to “scotch-static” and
“scotch-shared” to “scotch”, for consistency?

Ludo’.




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

end of thread, other threads:[~2021-04-10 10:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-06 11:22 [bug#47619] [PATCH] add pt-scotch-shared/scotch-shared Franck Pérignon
2021-04-06 17:54 ` bug#47619: " Leo Famulari
2021-04-08  7:21 ` [bug#47619] " Ludovic Courtès
2021-04-10  3:24   ` Eric Bavier
2021-04-10  9:59     ` Ludovic Courtès

unofficial mirror of guix-patches@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-patches/1 guix-patches/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-patches guix-patches/ https://yhetil.org/guix-patches \
		guix-patches@gnu.org
	public-inbox-index guix-patches

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.patches


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git