From 0a85e7ed1f20270ff12d65030b60e7947ee6339b Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Tue, 2 Jul 2024 09:34:49 +0200 Subject: [PATCH] fix implicit function declaration in OpenMPI 4.1.4--dry-run --- .../o/OpenMPI/OpenMPI-4.1.4-GCC-11.3.0.eb | 3 ++ .../o/OpenMPI/OpenMPI-4.1.4-GCC-12.2.0.eb | 3 ++ .../OpenMPI-4.1.4-NVHPC-22.7-CUDA-11.7.0.eb | 3 ++ ...x-implicit-cuda-function-declaration.patch | 31 +++++++++++++++++++ 4 files changed, 40 insertions(+) create mode 100644 easybuild/easyconfigs/o/OpenMPI/OpenMPI-4.1.4_fix-implicit-cuda-function-declaration.patch diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-4.1.4-GCC-11.3.0.eb b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-4.1.4-GCC-11.3.0.eb index 6471a45d999..06b168671f7 100644 --- a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-4.1.4-GCC-11.3.0.eb +++ b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-4.1.4-GCC-11.3.0.eb @@ -11,6 +11,7 @@ sources = [SOURCELOWER_TAR_BZ2] patches = [ 'OpenMPI-4.1.1_build-with-internal-cuda-header.patch', 'OpenMPI-4.1.1_opal-datatype-cuda-performance.patch', + 'OpenMPI-4.1.4_fix-implicit-cuda-function-declaration.patch', 'OpenMPI-4.1.x_add_atomic_wmb.patch', ] checksums = [ @@ -19,6 +20,8 @@ checksums = [ '63eac52736bdf7644c480362440a7f1f0ae7c7cae47b7565f5635c41793f8c83'}, {'OpenMPI-4.1.1_opal-datatype-cuda-performance.patch': 'b767c7166cf0b32906132d58de5439c735193c9fd09ec3c5c11db8d5fa68750e'}, + {'OpenMPI-4.1.4_fix-implicit-cuda-function-declaration.patch': + 'ec1c2f07d03574b86fc5fb462eed96eb6f5658deb8a6412cf37007d687a28673'}, {'OpenMPI-4.1.x_add_atomic_wmb.patch': '9494bbc546d661ba5189e44b4c84a7f8df30a87cdb9d96ce2e73a7c8fecba172'}, ] diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-4.1.4-GCC-12.2.0.eb b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-4.1.4-GCC-12.2.0.eb index fbb50478eec..f4fbe865280 100644 --- a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-4.1.4-GCC-12.2.0.eb +++ b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-4.1.4-GCC-12.2.0.eb @@ -11,6 +11,7 @@ sources = [SOURCELOWER_TAR_BZ2] patches = [ 'OpenMPI-4.1.1_build-with-internal-cuda-header.patch', 'OpenMPI-4.1.1_opal-datatype-cuda-performance.patch', + 'OpenMPI-4.1.4_fix-implicit-cuda-function-declaration.patch', 'OpenMPI-4.1.x_add_atomic_wmb.patch', ] checksums = [ @@ -19,6 +20,8 @@ checksums = [ '63eac52736bdf7644c480362440a7f1f0ae7c7cae47b7565f5635c41793f8c83'}, {'OpenMPI-4.1.1_opal-datatype-cuda-performance.patch': 'b767c7166cf0b32906132d58de5439c735193c9fd09ec3c5c11db8d5fa68750e'}, + {'OpenMPI-4.1.4_fix-implicit-cuda-function-declaration.patch': + 'ec1c2f07d03574b86fc5fb462eed96eb6f5658deb8a6412cf37007d687a28673'}, {'OpenMPI-4.1.x_add_atomic_wmb.patch': '9494bbc546d661ba5189e44b4c84a7f8df30a87cdb9d96ce2e73a7c8fecba172'}, ] diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-4.1.4-NVHPC-22.7-CUDA-11.7.0.eb b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-4.1.4-NVHPC-22.7-CUDA-11.7.0.eb index 9ef5b5d1bb4..a69c1e2b8d4 100644 --- a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-4.1.4-NVHPC-22.7-CUDA-11.7.0.eb +++ b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-4.1.4-NVHPC-22.7-CUDA-11.7.0.eb @@ -11,6 +11,7 @@ sources = [SOURCELOWER_TAR_BZ2] patches = [ 'OpenMPI-4.1.1_build-with-internal-cuda-header.patch', 'OpenMPI-4.1.1_opal-datatype-cuda-performance.patch', + 'OpenMPI-4.1.4_fix-implicit-cuda-function-declaration.patch', 'OpenMPI-4.1.x_add_atomic_wmb.patch', ] checksums = [ @@ -19,6 +20,8 @@ checksums = [ '63eac52736bdf7644c480362440a7f1f0ae7c7cae47b7565f5635c41793f8c83'}, {'OpenMPI-4.1.1_opal-datatype-cuda-performance.patch': 'b767c7166cf0b32906132d58de5439c735193c9fd09ec3c5c11db8d5fa68750e'}, + {'OpenMPI-4.1.4_fix-implicit-cuda-function-declaration.patch': + 'ec1c2f07d03574b86fc5fb462eed96eb6f5658deb8a6412cf37007d687a28673'}, {'OpenMPI-4.1.x_add_atomic_wmb.patch': '9494bbc546d661ba5189e44b4c84a7f8df30a87cdb9d96ce2e73a7c8fecba172'}, ] diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-4.1.4_fix-implicit-cuda-function-declaration.patch b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-4.1.4_fix-implicit-cuda-function-declaration.patch new file mode 100644 index 00000000000..3ccb7d43d82 --- /dev/null +++ b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-4.1.4_fix-implicit-cuda-function-declaration.patch @@ -0,0 +1,31 @@ +Fix a left-over function causing compilation warnings or errors: +mtl_ofi_component.c:298:5: error: implicit declaration of function 'mca_common_cuda_fini'; did you mean 'ompi_comm_cid_init'? [-Werror=implicit-function-declaration] + mca_common_cuda_fini(); + ^~~~~~~~~~~~~~~~~~~~ + +See https://github.com/open-mpi/ompi/issues/11381 + +From 7676618c43d489b145e730d1d7603f0292a031c0 Mon Sep 17 00:00:00 2001 +From: Jingyin Tang +Date: Mon, 6 Feb 2023 13:48:51 -0500 +Subject: [PATCH] Fix compilation issue in OFI with CUDA + +Signed-off-by: Jingyin Tang +--- + ompi/mca/mtl/ofi/mtl_ofi_component.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/ompi/mca/mtl/ofi/mtl_ofi_component.c b/ompi/mca/mtl/ofi/mtl_ofi_component.c +index c1aac6934d0..e36f020b206 100644 +--- a/ompi/mca/mtl/ofi/mtl_ofi_component.c ++++ b/ompi/mca/mtl/ofi/mtl_ofi_component.c +@@ -294,9 +294,6 @@ ompi_mtl_ofi_component_query(mca_base_module_t **module, int *priority) + static int + ompi_mtl_ofi_component_close(void) + { +-#if OPAL_CUDA_SUPPORT +- mca_common_cuda_fini(); +-#endif + return opal_common_ofi_close(); + } +