From a1035f1e89039b2987e43897192a49d34811a6dba4c5c51e78cb006038cc3252 Mon Sep 17 00:00:00 2001 From: Nicolas Morey Date: Wed, 5 Nov 2025 17:49:32 +0100 Subject: [PATCH 1/3] Minor fixes to openucx-s390x-support.patch Signed-off-by: Nicolas Morey --- openucx-s390x-support.patch | 22 +++++++++++----------- openucx.changes | 5 +++++ 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/openucx-s390x-support.patch b/openucx-s390x-support.patch index c950f7b..8be6e07 100644 --- a/openucx-s390x-support.patch +++ b/openucx-s390x-support.patch @@ -1,4 +1,4 @@ -commit ba1d7048df80ee535e01335992f70568e2f88c80 +commit e5fd9ff24191cfd99b5759bdaf291cc36aaa6346 Author: Nicolas Morey Date: Wed Feb 19 16:46:33 2025 +0100 @@ -91,7 +91,7 @@ index 000000000000..2beb5de54fab + +#endif diff --git src/ucs/Makefile.am src/ucs/Makefile.am -index 86a469a60bcc..6751bad764b8 100644 +index 699a4addcd29..2f20f9945411 100644 --- src/ucs/Makefile.am +++ src/ucs/Makefile.am @@ -24,6 +24,7 @@ nobase_dist_libucs_la_HEADERS = \ @@ -118,7 +118,7 @@ index 86a469a60bcc..6751bad764b8 100644 arch/x86_64/cpu.h \ arch/cpu.h \ config/ucm_opts.h \ -@@ -149,6 +152,7 @@ libucs_la_SOURCES = \ +@@ -150,6 +153,7 @@ libucs_la_SOURCES = \ algorithm/string_distance.c \ arch/aarch64/cpu.c \ arch/aarch64/global_opts.c \ @@ -140,7 +140,7 @@ index 849647902fab..a328c37e2020 100644 # error "Unsupported architecture" #endif diff --git src/ucs/arch/bitops.h src/ucs/arch/bitops.h -index f8e51c45888a..476631d95eb6 100644 +index ae531834451e..d4228b135641 100644 --- src/ucs/arch/bitops.h +++ src/ucs/arch/bitops.h @@ -23,6 +23,8 @@ BEGIN_C_DECLS @@ -235,7 +235,7 @@ index 550d22b8b751..d8e4a7cca694 100644 #endif diff --git src/ucs/arch/s390x/bitops.h src/ucs/arch/s390x/bitops.h new file mode 100644 -index 000000000000..ce48ff1ff451 +index 000000000000..88b74558f333 --- /dev/null +++ src/ucs/arch/s390x/bitops.h @@ -0,0 +1,37 @@ @@ -262,7 +262,7 @@ index 000000000000..ce48ff1ff451 +{ + if (!n) + return 0; -+ return 63 - __builtin_clz(n); ++ return 63 - __builtin_clzll(n); +} + +static UCS_F_ALWAYS_INLINE unsigned ucs_ffs32(uint32_t n) @@ -400,7 +400,7 @@ index 000000000000..4fa0c74034a7 +#endif diff --git src/ucs/arch/s390x/global_opts.h src/ucs/arch/s390x/global_opts.h new file mode 100644 -index 000000000000..225e4e5e896a +index 000000000000..b7c5693266d9 --- /dev/null +++ src/ucs/arch/s390x/global_opts.h @@ -0,0 +1,25 @@ @@ -411,8 +411,8 @@ index 000000000000..225e4e5e896a +*/ + + -+#ifndef UCS_PPC64_GLOBAL_OPTS_H_ -+#define UCS_PPC64_GLOBAL_OPTS_H_ ++#ifndef UCS_S390X_GLOBAL_OPTS_H_ ++#define UCS_S390X_GLOBAL_OPTS_H_ + +#include + @@ -430,10 +430,10 @@ index 000000000000..225e4e5e896a +#endif + diff --git src/ucs/sys/sys.c src/ucs/sys/sys.c -index d0b5effe11a3..ce22a2097f18 100644 +index 7cd875e8f7b2..b8b2d3c026be 100644 --- src/ucs/sys/sys.c +++ src/ucs/sys/sys.c -@@ -1258,8 +1258,19 @@ void *ucs_sys_realloc(void *old_ptr, size_t old_length, size_t new_length) +@@ -1265,8 +1265,19 @@ void *ucs_sys_realloc(void *old_ptr, size_t old_length, size_t new_length) if (old_ptr == NULL) { /* Note: Must pass the 0 offset as "long", otherwise it will be * partially undefined when converted to syscall arguments */ diff --git a/openucx.changes b/openucx.changes index 4f65f82..3934baa 100644 --- a/openucx.changes +++ b/openucx.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Nov 5 16:48:53 UTC 2025 - Nicolas Morey + +- Minor fixes to openucx-s390x-support.patch + ------------------------------------------------------------------- Wed Jun 25 15:49:50 UTC 2025 - Nicolas Morey -- 2.51.1 From 7690a30a01aa7a82a1935ba995bf3b0de33bb56ad72844c1905a2ef02ac48dea Mon Sep 17 00:00:00 2001 From: Nicolas Morey Date: Fri, 7 Nov 2025 17:22:29 +0100 Subject: [PATCH 2/3] Fix a badly initialized value in settings Signed-off-by: Nicolas Morey --- ...-type-for-dynamic_tl_progress_factor.patch | 21 +++++++++++++++++++ openucx.changes | 2 ++ openucx.spec | 1 + 3 files changed, 24 insertions(+) create mode 100644 UCP-CORE-Fix-config-type-for-dynamic_tl_progress_factor.patch diff --git a/UCP-CORE-Fix-config-type-for-dynamic_tl_progress_factor.patch b/UCP-CORE-Fix-config-type-for-dynamic_tl_progress_factor.patch new file mode 100644 index 0000000..979ad0c --- /dev/null +++ b/UCP-CORE-Fix-config-type-for-dynamic_tl_progress_factor.patch @@ -0,0 +1,21 @@ +commit 2d79ffee423fd4570599258e00689cc745e8785e +Author: Nicolas Morey +Date: Fri Nov 7 17:19:54 2025 +0100 + + UCP/CORE: Fix config type for dynamic_tl_progress_factor + + Signed-off-by: Nicolas Morey + +diff --git src/ucp/core/ucp_context.c src/ucp/core/ucp_context.c +index 8b9dbeaca9ea..4cbae096ed93 100644 +--- src/ucp/core/ucp_context.c ++++ src/ucp/core/ucp_context.c +@@ -440,7 +440,7 @@ static ucs_config_field_t ucp_context_config_table[] = { + "Number of usage tracker rounds performed for each progress operation. Must be\n" + "non-zero value.", + ucs_offsetof(ucp_context_config_t, dynamic_tl_progress_factor), +- UCS_CONFIG_TYPE_TIME_UNITS}, ++ UCS_CONFIG_TYPE_UINT}, + + {"RESOLVE_REMOTE_EP_ID", "n", + "Defines whether resolving remote endpoint ID is required or not when\n" diff --git a/openucx.changes b/openucx.changes index 3934baa..b8bd3b3 100644 --- a/openucx.changes +++ b/openucx.changes @@ -2,6 +2,8 @@ Wed Nov 5 16:48:53 UTC 2025 - Nicolas Morey - Minor fixes to openucx-s390x-support.patch +- Add UCP-CORE-Fix-config-type-for-dynamic_tl_progress_factor.patch + to fix a badly initialized value in settings ------------------------------------------------------------------- Wed Jun 25 15:49:50 UTC 2025 - Nicolas Morey diff --git a/openucx.spec b/openucx.spec index 6614357..9592fcf 100644 --- a/openucx.spec +++ b/openucx.spec @@ -33,6 +33,7 @@ Source: https://github.com/openucx/ucx/releases/download/v%version%{?ver Source100: README.md Patch1: openucx-s390x-support.patch Patch2: ucm-fix-UCX_MEM_MALLOC_RELOC.patch +Patch3: UCP-CORE-Fix-config-type-for-dynamic_tl_progress_factor.patch BuildRequires: autoconf >= 2.63 BuildRequires: automake >= 1.10 BuildRequires: binutils-devel -- 2.51.1 From ed9e44370b8ec34557c98d744de2d9661957dfd867fc5909d29a0c00f909e75b Mon Sep 17 00:00:00 2001 From: Nicolas Morey Date: Fri, 7 Nov 2025 17:54:15 +0100 Subject: [PATCH 3/3] Add patches to fix a badly initialized value in settings Signed-off-by: Nicolas Morey --- ...SELF-Fix-config-type-for-num_devices.patch | 23 +++++++++++++++++++ openucx.changes | 5 ++-- openucx.spec | 1 + 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 UCT-SELF-Fix-config-type-for-num_devices.patch diff --git a/UCT-SELF-Fix-config-type-for-num_devices.patch b/UCT-SELF-Fix-config-type-for-num_devices.patch new file mode 100644 index 0000000..e0c5654 --- /dev/null +++ b/UCT-SELF-Fix-config-type-for-num_devices.patch @@ -0,0 +1,23 @@ +commit 9655ec674b1d6278a80705eeb1e5bf0a36d7a211 +Author: Nicolas Morey +Date: Fri Nov 7 17:51:31 2025 +0100 + + UCT/SELF: Fix config type for num_devices + + size_t may be larger than an int. This causes issue on big endian systems + + Signed-off-by: Nicolas Morey + +diff --git src/uct/sm/self/self.c src/uct/sm/self/self.c +index 6e7815c21dfa..1986e9cde290 100644 +--- src/uct/sm/self/self.c ++++ src/uct/sm/self/self.c +@@ -57,7 +57,7 @@ static ucs_config_field_t uct_self_md_config_table[] = { + UCS_CONFIG_TYPE_TABLE(uct_md_config_table)}, + + {"NUM_DEVICES", "1", "Number of \"self\" devices to create", +- ucs_offsetof(uct_self_md_config_t, num_devices), UCS_CONFIG_TYPE_INT}, ++ ucs_offsetof(uct_self_md_config_t, num_devices), UCS_CONFIG_TYPE_ULONG}, + + {NULL} + }; diff --git a/openucx.changes b/openucx.changes index b8bd3b3..c02f42a 100644 --- a/openucx.changes +++ b/openucx.changes @@ -2,8 +2,9 @@ Wed Nov 5 16:48:53 UTC 2025 - Nicolas Morey - Minor fixes to openucx-s390x-support.patch -- Add UCP-CORE-Fix-config-type-for-dynamic_tl_progress_factor.patch - to fix a badly initialized value in settings +- Add patches to fix a badly initialized value in settings + - UCP-CORE-Fix-config-type-for-dynamic_tl_progress_factor.patch + - UCT-SELF-Fix-config-type-for-num_devices.patch ------------------------------------------------------------------- Wed Jun 25 15:49:50 UTC 2025 - Nicolas Morey diff --git a/openucx.spec b/openucx.spec index 9592fcf..b9b80b3 100644 --- a/openucx.spec +++ b/openucx.spec @@ -34,6 +34,7 @@ Source100: README.md Patch1: openucx-s390x-support.patch Patch2: ucm-fix-UCX_MEM_MALLOC_RELOC.patch Patch3: UCP-CORE-Fix-config-type-for-dynamic_tl_progress_factor.patch +Patch4: UCT-SELF-Fix-config-type-for-num_devices.patch BuildRequires: autoconf >= 2.63 BuildRequires: automake >= 1.10 BuildRequires: binutils-devel -- 2.51.1