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>
This commit is contained in:
Theofilos Manitaras 2022-04-15 14:42:26 +02:00 committed by GitHub
parent 0e0c438dd6
commit fdc9a29a9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 0 deletions

View File

@ -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

View File

@ -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')