summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorTheofilos Manitaras <manitaras@cscs.ch>2022-04-15 14:42:26 +0200
committerGitHub <noreply@github.com>2022-04-15 06:42:26 -0600
commitfdc9a29a9b9c15d68de4ef7f784e68393c62256b (patch)
tree068dec8bae04bd551b8a974a99cb8db9cb4781d6 /var
parent0e0c438dd6e5e06b5d8339bd9001f3373fcf9be8 (diff)
downloadspack-fdc9a29a9b9c15d68de4ef7f784e68393c62256b.tar.gz
spack-fdc9a29a9b9c15d68de4ef7f784e68393c62256b.tar.bz2
spack-fdc9a29a9b9c15d68de4ef7f784e68393c62256b.tar.xz
spack-fdc9a29a9b9c15d68de4ef7f784e68393c62256b.zip
Patch libfabric for the Nvidia compilers (#30090)
* Patch libfabric@1.6.0:1.14.0 for the Nvidia compilers Signed-off-by: Theofilos Manitaras <manitaras@cscs.ch>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/libfabric/nvhpc-symver.patch32
-rw-r--r--var/spack/repos/builtin/packages/libfabric/package.py4
2 files changed, 36 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/libfabric/nvhpc-symver.patch b/var/spack/repos/builtin/packages/libfabric/nvhpc-symver.patch
new file mode 100644
index 0000000000..47c7d0251d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libfabric/nvhpc-symver.patch
@@ -0,0 +1,32 @@
+From 3249a5497e1a5db6bbc750bba8b8b90a0ace30ad Mon Sep 17 00:00:00 2001
+From: Theofilos Manitaras <manitaras@cscs.ch>
+Date: Mon, 11 Apr 2022 13:28:58 +0200
+Subject: [PATCH] Fix inline assembly for the Nvidia HPC compilers
+
+Fixes a problem with the Nvidia compiler, which does not emit
+separate lines for multiple `asm` inline assembly declarations.
+
+Signed-off-by: Theofilos Manitaras <manitaras@cscs.ch>
+---
+ include/ofi_abi.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/include/ofi_abi.h b/include/ofi_abi.h
+index b9008f544f..87576b5f41 100644
+--- a/include/ofi_abi.h
++++ b/include/ofi_abi.h
+@@ -123,11 +123,11 @@ extern "C" {
+ #if HAVE_SYMVER_SUPPORT
+
+ #define COMPAT_SYMVER(name, api, ver) \
+- asm(".symver " #name "," #api "@" #ver)
++ asm(".symver " #name "," #api "@" #ver "\n")
+ #define DEFAULT_SYMVER(name, api, ver) \
+- asm(".symver " #name "," #api "@@" #ver)
++ asm(".symver " #name "," #api "@@" #ver "\n")
+ #define CURRENT_SYMVER(name, api) \
+- asm(".symver " #name "," #api "@@" CURRENT_ABI)
++ asm(".symver " #name "," #api "@@" CURRENT_ABI "\n")
+
+ #else
+
diff --git a/var/spack/repos/builtin/packages/libfabric/package.py b/var/spack/repos/builtin/packages/libfabric/package.py
index f41a98aee7..14a2fdf7a7 100644
--- a/var/spack/repos/builtin/packages/libfabric/package.py
+++ b/var/spack/repos/builtin/packages/libfabric/package.py
@@ -79,6 +79,10 @@ class Libfabric(AutotoolsPackage):
sha256='456693e28bb1fc41a0bbb94b97ae054e7d28f81ca94795d7f294243da58c6376',
when='@1.9.0')
+ # Fix for the inline assembly problem for the Nvidia compilers
+ # https://github.com/ofiwg/libfabric/pull/7665
+ patch('nvhpc-symver.patch', when='@1.6.0:1.14.0 %nvhpc')
+
depends_on('rdma-core', when='fabrics=verbs')
depends_on('opa-psm2', when='fabrics=psm2')
depends_on('psm', when='fabrics=psm')