GNU bug report logs - #29172
[PATCH] gnu: Add psm.

Previous Next

Package: guix-patches;

Reported by: Dave Love <fx <at> gnu.org>

Date: Mon, 6 Nov 2017 17:20:02 UTC

Severity: normal

Tags: patch

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 29172 in the body.
You can then email your comments to 29172 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#29172; Package guix-patches. (Mon, 06 Nov 2017 17:20:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dave Love <fx <at> gnu.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 06 Nov 2017 17:20:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dave Love <fx <at> gnu.org>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add psm.
Date: Mon,  6 Nov 2017 17:16:25 +0000
There probably aren't a lot of sites for which this hardware support is
relevant, but it's easy to provide.  Arguably it should go in rdma-core
on the same basis as the OFED support for other hardware.




Information forwarded to guix-patches <at> gnu.org:
bug#29172; Package guix-patches. (Mon, 06 Nov 2017 17:22:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dave Love <fx <at> gnu.org>
To: guix-patches <at> gnu.org
Cc: Dave Love <fx <at> gnu.org>
Subject: [PATCH] gnu: Add psm.
Date: Mon,  6 Nov 2017 17:16:26 +0000
* gnu/packages/linux.scm (psm): New variable.
(libfabric): Use it.
* gnu/packages/mpi.scm (openmpi)[inputs]: Add psm.
* gnu/packages/patches/psm-arch.patch,
gnu/packages/patches/psm-ldflags.patch,
gnu/packages/patches/psm-repro.patch: New files.
* gnu/local.mk (dist_patch_DATA): Add them.
---
 gnu/local.mk                           |  3 +++
 gnu/packages/linux.scm                 | 45 +++++++++++++++++++++++++++++++++-
 gnu/packages/mpi.scm                   |  1 +
 gnu/packages/patches/psm-arch.patch    | 11 +++++++++
 gnu/packages/patches/psm-ldflags.patch | 11 +++++++++
 gnu/packages/patches/psm-repro.patch   | 12 +++++++++
 6 files changed, 82 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/psm-arch.patch
 create mode 100644 gnu/packages/patches/psm-ldflags.patch
 create mode 100644 gnu/packages/patches/psm-repro.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 6b70300ff..d7b162d31 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -957,6 +957,9 @@ dist_patch_DATA =						\
   %D%/packages/patches/procmail-ambiguous-getline-debian.patch  \
   %D%/packages/patches/procmail-CVE-2014-3618.patch		\
   %D%/packages/patches/proot-test-fhs.patch			\
+  %D%/packages/patches/psm-arch.patch				\
+  %D%/packages/patches/psm-ldflags.patch			\
+  %D%/packages/patches/psm-repro.patch				\
   %D%/packages/patches/pt-scotch-build-parallelism.patch	\
   %D%/packages/patches/pulseaudio-fix-mult-test.patch		\
   %D%/packages/patches/pulseaudio-longer-test-timeout.patch	\
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 49665e24d..1a3ffa347 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -4387,7 +4387,7 @@ comparing system environments.")
         (base32 "19l2m1frna1l765z4j7wl8hp4rb9wrh0hy5496685hd183hmy5pv"))))
     (build-system gnu-build-system)
     (inputs `(("rdma-core" ,rdma-core)
-              ;; TODO: add psm, psm(2).
+              ("psm" ,psm)
               ("libnl" ,libnl)))
     (home-page "https://ofiwg.github.io/libfabric/")
     (synopsis "Open Fabric Interfaces")
@@ -4403,3 +4403,46 @@ exports the user-space API of OFI, and is typically the only software that
 applications deal with directly.  It works in conjunction with provider
 libraries, which are often integrated directly into libfabric.")
     (license (list license:bsd-2 license:gpl2)))) ;dual
+
+(define-public psm
+  (package
+    (name "psm")
+    (version "3.3.20170428")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference (url "http://github.com/01org/psm")
+                           (commit "604758e76dc31e68d1de736ccf5ddf16cb22355b")))
+       (file-name (string-append "psm-" version ".tar.gz"))
+       (sha256
+        (base32 "0nsb325dmhn5ia3d2cnksqr0gdvrrx2hmvlylfgvmaqdpq76zm85"))
+       (patches (search-patches
+                 "psm-arch.patch"     ; uname -p returns "unknown" on Debian 9
+                 "psm-ldflags.patch"  ; build shared lib with LDFLAGS
+                 "psm-repro.patch"))))  ; reproducibility
+    (build-system gnu-build-system)
+    (inputs `(("libuuid" ,util-linux)))
+    (arguments
+     '(#:make-flags `("PSM_USE_SYS_UUID=1" "CC=gcc" "WERROR="
+                      ,(string-append "INSTALL_PREFIX=" %output)
+                      ,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
+       #:tests? #f
+       #:phases (modify-phases %standard-phases
+                  (delete 'configure)
+                  (add-after 'unpack 'patch-/usr/include
+                    (lambda _
+                      (substitute* "Makefile"
+                        (("\\$\\{DESTDIR}/usr/include")
+                         (string-append %output "/include")))
+                      (substitute* "Makefile"
+                        (("/lib64") "/lib"))
+                      #t)))))
+    (home-page "https://github.com/01org/psm")
+    (synopsis "Intel Performance Scaled Messaging (PSM) Libraries")
+    (description
+     "The PSM Messaging API, or PSM API, is Intel's low-level
+user-level communications interface for the True Scale
+family of products.  PSM users are enabled with mechanisms
+necessary to implement higher level communications
+interfaces in parallel environments.")
+    (license (list license:bsd-2 license:gpl2)))) ;dual
diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm
index 741d30a8c..9f14d2c18 100644
--- a/gnu/packages/mpi.scm
+++ b/gnu/packages/mpi.scm
@@ -125,6 +125,7 @@ bind processes, and much more.")
     (inputs
      `(("hwloc" ,hwloc "lib")
        ("libfabric" ,libfabric)
+       ("psm" ,psm)
        ("rdma-core" ,rdma-core)
        ("valgrind" ,valgrind)))
     (native-inputs
diff --git a/gnu/packages/patches/psm-arch.patch b/gnu/packages/patches/psm-arch.patch
new file mode 100644
index 000000000..a17d6ac3a
--- /dev/null
+++ b/gnu/packages/patches/psm-arch.patch
@@ -0,0 +1,11 @@
+--- psm-3.3/buildflags.mak~	2014-08-20 21:00:18.000000000 +0100
++++ psm-3.3/buildflags.mak	2017-10-22 12:02:12.855291447 +0100
+@@ -38,7 +38,7 @@
+ endif
+ 
+ export os ?= $(shell uname -s | tr '[A-Z]' '[a-z]')
+-export arch := $(shell uname -p | sed -e 's,\(i[456]86\|athlon$$\),i386,')
++export arch := $(shell uname -m | sed -e 's,\(i[456]86\|athlon$$\),i386,')
+ 
+ CC ?= gcc
+ 
diff --git a/gnu/packages/patches/psm-ldflags.patch b/gnu/packages/patches/psm-ldflags.patch
new file mode 100644
index 000000000..be053c637
--- /dev/null
+++ b/gnu/packages/patches/psm-ldflags.patch
@@ -0,0 +1,11 @@
+--- psm-3.3/ipath/Makefile~	1970-01-01 01:00:00.000000000 +0100
++++ psm-3.3/ipath/Makefile	2017-10-22 15:10:10.269177711 +0100
+@@ -73,7 +73,7 @@
+ ${TARGLIB}.so.${MAJOR}.${MINOR}: ${${TARGLIB}-objs}
+ 	date +'static __attribute__ ((unused)) char __psc_infinipath_revision[] ="$$""Date: %F %R ${rpm_extra_description}InfiniPath $$";' > _revision.c
+ 	$(CC) -c $(BASECFLAGS) $(INCLUDES) _revision.c -o _revision.o
+-	$(CC) -o $@ -Wl,-soname=${TARGLIB}.so.${MAJOR} -shared \
++	$(CC) -o $@ -Wl,-soname=${TARGLIB}.so.${MAJOR} $(LDFLAGS) -shared \
+ 		-Wl,--unique='*fastpath*' \
+ 		${${TARGLIB}-objs} _revision.o $(LDFLAGS) $(if $(MIC:0=),$(SCIF_LINK_FLAGS))
+ 
diff --git a/gnu/packages/patches/psm-repro.patch b/gnu/packages/patches/psm-repro.patch
new file mode 100644
index 000000000..12dab1855
--- /dev/null
+++ b/gnu/packages/patches/psm-repro.patch
@@ -0,0 +1,12 @@
+--- psm-3.3/Makefile~	1970-01-01 01:00:00.000000000 +0100
++++ psm-3.3/Makefile	2017-10-22 15:32:11.736949002 +0100
+@@ -326,7 +326,7 @@
+ # file around.  Generate it such that the ident command can find it
+ # and strings -a | grep InfiniPath does a reasonable job as well.
+ ${TARGLIB}.so.${MAJOR}.${MINOR}: ${${TARGLIB}-objs}
+-	date +'char psmi_infinipath_revision[] ="$$""Date: %F %R ${rpm_extra_description}InfiniPath $$";' > ${lib_build_dir}/_revision.c
++	echo 'char psmi_infinipath_revision[] ="$$""Date: 1970-01-01 00:00 ${rpm_extra_description}InfiniPath $$";' > ${lib_build_dir}/_revision.c
+ 	$(CC) -c $(BASECFLAGS) $(INCLUDES) _revision.c -o _revision.o
+ 	$(CC) $(LDFLAGS) -o $@ -Wl,-soname=${TARGLIB}.so.${MAJOR} -shared -Wl,--unique='*fastpath*' \
+ 		${${TARGLIB}-objs} _revision.o -L$(build_dir)/ipath $(LDLIBS)
+
-- 
2.11.0





Reply sent to ludo <at> gnu.org (Ludovic Courtès):
You have taken responsibility. (Tue, 07 Nov 2017 17:03:02 GMT) Full text and rfc822 format available.

Notification sent to Dave Love <fx <at> gnu.org>:
bug acknowledged by developer. (Tue, 07 Nov 2017 17:03:02 GMT) Full text and rfc822 format available.

Message #13 received at 29172-done <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Dave Love <fx <at> gnu.org>
Cc: 29172-done <at> debbugs.gnu.org
Subject: Re: [bug#29172] [PATCH] gnu: Add psm.
Date: Tue, 07 Nov 2017 18:02:00 +0100
Hi Dave,

Dave Love <fx <at> gnu.org> skribis:

> * gnu/packages/linux.scm (psm): New variable.
> (libfabric): Use it.
> * gnu/packages/mpi.scm (openmpi)[inputs]: Add psm.
> * gnu/packages/patches/psm-arch.patch,
> gnu/packages/patches/psm-ldflags.patch,
> gnu/packages/patches/psm-repro.patch: New files.
> * gnu/local.mk (dist_patch_DATA): Add them.

I split it into 3 separate patches (one two add PSM, one to change
libfabric, and one for openmpi) and committed.

Thanks,
Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 06 Dec 2017 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 254 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.