SHA256
6
0
forked from pool/openucx

s390x fixes #1

Manually merged
HPC merged 3 commits from NMorey/openucx:main into main 2025-11-08 09:47:21 +01:00
5 changed files with 65 additions and 11 deletions

View File

@@ -0,0 +1,21 @@
commit 2d79ffee423fd4570599258e00689cc745e8785e
Author: Nicolas Morey <nmorey@suse.com>
Date: Fri Nov 7 17:19:54 2025 +0100
UCP/CORE: Fix config type for dynamic_tl_progress_factor
Signed-off-by: Nicolas Morey <nmorey@suse.com>
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"

View File

@@ -0,0 +1,23 @@
commit 9655ec674b1d6278a80705eeb1e5bf0a36d7a211
Author: Nicolas Morey <nmorey@suse.com>
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 <nmorey@suse.com>
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}
};

View File

@@ -1,4 +1,4 @@
commit ba1d7048df80ee535e01335992f70568e2f88c80
commit e5fd9ff24191cfd99b5759bdaf291cc36aaa6346
Author: Nicolas Morey <nmorey@suse.com>
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 <ucs/sys/compiler_def.h>
+
@@ -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 */

View File

@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Wed Nov 5 16:48:53 UTC 2025 - Nicolas Morey <nicolas.morey@suse.com>
- Minor fixes to openucx-s390x-support.patch
- 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 <nicolas.morey@suse.com>

View File

@@ -33,6 +33,8 @@ 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
Patch4: UCT-SELF-Fix-config-type-for-num_devices.patch
BuildRequires: autoconf >= 2.63
BuildRequires: automake >= 1.10
BuildRequires: binutils-devel