From fdc9a29a9b9c15d68de4ef7f784e68393c62256b Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Fri, 15 Apr 2022 14:42:26 +0200 Subject: Patch libfabric for the Nvidia compilers (#30090) * Patch libfabric@1.6.0:1.14.0 for the Nvidia compilers Signed-off-by: Theofilos Manitaras --- .../builtin/packages/libfabric/nvhpc-symver.patch | 32 ++++++++++++++++++++++ .../repos/builtin/packages/libfabric/package.py | 4 +++ 2 files changed, 36 insertions(+) create mode 100644 var/spack/repos/builtin/packages/libfabric/nvhpc-symver.patch 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 +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 +--- + 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') -- cgit v1.2.3-70-g09d2