From bd359e2d7f8bdf9e1af6646402bc9c92e741a016ce7815cb371e3a0fda4f4757 Mon Sep 17 00:00:00 2001 From: Nicolas Morey Date: Tue, 4 Nov 2025 21:33:53 +0100 Subject: [PATCH 1/6] Replace call to autogen.sh with autoreconf Signed-off-by: Nicolas Morey --- mvapich4.changes | 5 +++++ mvapich4.spec | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/mvapich4.changes b/mvapich4.changes index 38aab75..298b2dc 100644 --- a/mvapich4.changes +++ b/mvapich4.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Nov 4 20:31:05 UTC 2025 - Nicolas Morey + +- Replace call to autogen.sh with autoreconf + ------------------------------------------------------------------- Fri Aug 1 11:34:18 UTC 2025 - Nicolas Morey diff --git a/mvapich4.spec b/mvapich4.spec index d476267..15c151e 100644 --- a/mvapich4.spec +++ b/mvapich4.spec @@ -175,7 +175,7 @@ cp /usr/share/automake*/config.* . export FFLAGS="$FFLAGS -fallow-argument-mismatch $FFLAGS" %endif -./autogen.sh --without-ucx --without-ofi --without-json +autoreconf %configure \ --prefix=%{p_prefix} \ --exec-prefix=%{p_prefix} \ -- 2.51.1 From d3aa754106de988d31299b4d8f86392ef90a6cc2c3c48a9bb50c40603513299e Mon Sep 17 00:00:00 2001 From: Nicolas Morey Date: Sat, 8 Nov 2025 09:27:36 +0100 Subject: [PATCH 2/6] Enable ch4:ofi build Signed-off-by: Nicolas Morey --- _multibuild | 2 ++ 1 file changed, 2 insertions(+) diff --git a/_multibuild b/_multibuild index 09a9804..a8e6772 100644 --- a/_multibuild +++ b/_multibuild @@ -1,4 +1,6 @@ ucx ucx-testsuite + ofi + ofi-testsuite -- 2.51.1 From ac6732dff1a6db73aee5781dc0b0a3c1ff846b20cbf1349b3a25c88e65516eb5 Mon Sep 17 00:00:00 2001 From: Nicolas Morey Date: Sat, 8 Nov 2025 20:00:29 +0100 Subject: [PATCH 3/6] Disable CMA in %check as it requires specific user capabilities Signed-off-by: Nicolas Morey --- mvapich4.changes | 1 + mvapich4.spec | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/mvapich4.changes b/mvapich4.changes index 298b2dc..7d93f6a 100644 --- a/mvapich4.changes +++ b/mvapich4.changes @@ -2,6 +2,7 @@ Tue Nov 4 20:31:05 UTC 2025 - Nicolas Morey - Replace call to autogen.sh with autoreconf +- Disable CMA in %check as it requires specific user capabilities ------------------------------------------------------------------- Fri Aug 1 11:34:18 UTC 2025 - Nicolas Morey diff --git a/mvapich4.spec b/mvapich4.spec index 15c151e..cfb01ea 100644 --- a/mvapich4.spec +++ b/mvapich4.spec @@ -175,7 +175,7 @@ cp /usr/share/automake*/config.* . export FFLAGS="$FFLAGS -fallow-argument-mismatch $FFLAGS" %endif -autoreconf +autoreconf -fi %configure \ --prefix=%{p_prefix} \ --exec-prefix=%{p_prefix} \ @@ -207,6 +207,9 @@ make %{?_smp_mflags} V=1 %if 0%{?testsuite} %check +# Disable CMA. Modern kernels require specific ptrace capabilities +# that are not available in OBS +export MPIR_CVAR_CH4_CMA_ENABLE=0 make V=1 check %endif -- 2.51.1 From 59aa580c923bce2d49a80c855a8d18d15b74bb00473cfa1409166f92eaefecf5 Mon Sep 17 00:00:00 2001 From: Nicolas Morey Date: Sun, 9 Nov 2025 00:25:30 +0100 Subject: [PATCH 4/6] Fix a datatype issue on s390x Signed-off-by: Nicolas Morey --- ...IDI_POSIX_mpi_release_gather_release.patch | 47 +++++++++++++++++++ mvapich4.changes | 2 + mvapich4.spec | 2 +- 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 ch4-shm-fix-data-type-for-recv_bytes-in-MPIDI_POSIX_mpi_release_gather_release.patch diff --git a/ch4-shm-fix-data-type-for-recv_bytes-in-MPIDI_POSIX_mpi_release_gather_release.patch b/ch4-shm-fix-data-type-for-recv_bytes-in-MPIDI_POSIX_mpi_release_gather_release.patch new file mode 100644 index 0000000..a847762 --- /dev/null +++ b/ch4-shm-fix-data-type-for-recv_bytes-in-MPIDI_POSIX_mpi_release_gather_release.patch @@ -0,0 +1,47 @@ +commit d04e6cee634ce8be5717912e2c0427bf867a1545 +Author: Nicolas Morey +Date: Sat Nov 8 23:34:58 2025 +0100 + + ch4: shm: fix data type for recv_bytes in MPIDI_POSIX_mpi_release_gather_release + + The number of received bytes in release_gather_release is badly cast between + int and MPI_Aint. On most arch this is not an issue, but for Big-Endian 64b arch (s390x) + it ends up losing the actual value as we only copy the first 4 MSB. + Fix the issue by writing the whole MPI_AInt in the shm_buf instead of just an int. + + Signed-off-by: Nicolas Morey + +diff --git src/mpid/ch4/shm/posix/release_gather/release_gather.h src/mpid/ch4/shm/posix/release_gather/release_gather.h +index ac966cb9772e..656deff1dd06 100644 +--- src/mpid/ch4/shm/posix/release_gather/release_gather.h ++++ src/mpid/ch4/shm/posix/release_gather/release_gather.h +@@ -121,7 +121,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_release_gather_release(void *local_ + datatype, root, MPIR_BCAST_TAG, comm_ptr, &status); + MPIR_ERR_CHECK(mpi_errno); + MPIR_Get_count_impl(&status, MPI_BYTE, &recv_bytes); +- MPIR_Typerep_copy(bcast_data_addr, &recv_bytes, sizeof(int), ++ MPIR_Typerep_copy(bcast_data_addr, &recv_bytes, sizeof(MPI_Aint), + MPIR_TYPEREP_FLAG_NONE); + /* It is necessary to copy the errflag as well to handle the case when non-root + * becomes temporary root as part of compositions (or smp aware colls). These temp +@@ -146,7 +146,7 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_release_gather_release(void *local_ + /* When error checking is enabled, place the datasize in shm_buf first, followed by the + * errflag, followed by the actual data with an offset of (2*cacheline_size) bytes from + * the starting address */ +- MPIR_Typerep_copy(bcast_data_addr, &count, sizeof(int), MPIR_TYPEREP_FLAG_NONE); ++ MPIR_Typerep_copy(bcast_data_addr, &count, sizeof(MPI_Aint), MPIR_TYPEREP_FLAG_NONE); + /* It is necessary to copy the errflag as well to handle the case when non-root + * becomes root as part of compositions (or smp aware colls). These roots might + * expect same data as other ranks but different from the actual root. So only +@@ -218,8 +218,9 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_mpi_release_gather_release(void *local_ + * datasize is copied out from shm_buffer and compared against the count a rank was + * expecting. Also, the errflag is copied out. In case of mismatch mpi_errno is set. + * Actual data starts after (2*cacheline_size) bytes */ +- int recv_bytes, recv_errflag; +- MPIR_Typerep_copy(&recv_bytes, bcast_data_addr, sizeof(int), MPIR_TYPEREP_FLAG_NONE); ++ MPI_Aint recv_bytes; ++ int recv_errflag; ++ MPIR_Typerep_copy(&recv_bytes, bcast_data_addr, sizeof(MPI_Aint), MPIR_TYPEREP_FLAG_NONE); + MPIR_Typerep_copy(&recv_errflag, (char *) bcast_data_addr + MPIDU_SHM_CACHE_LINE_LEN, + sizeof(int), MPIR_TYPEREP_FLAG_NONE); + MPIR_ERR_CHKANDJUMP2(recv_bytes != count, mpi_errno, MPI_ERR_OTHER, diff --git a/mvapich4.changes b/mvapich4.changes index 7d93f6a..6c4bd3a 100644 --- a/mvapich4.changes +++ b/mvapich4.changes @@ -3,6 +3,8 @@ Tue Nov 4 20:31:05 UTC 2025 - Nicolas Morey - Replace call to autogen.sh with autoreconf - Disable CMA in %check as it requires specific user capabilities +- Add ch4-shm-fix-data-type-for-recv_bytes-in-MPIDI_POSIX_mpi_release_gather_release.patch + to fix a datatype issue on s390x ------------------------------------------------------------------- Fri Aug 1 11:34:18 UTC 2025 - Nicolas Morey diff --git a/mvapich4.spec b/mvapich4.spec index cfb01ea..c8146f3 100644 --- a/mvapich4.spec +++ b/mvapich4.spec @@ -75,7 +75,7 @@ Source101: README.md Patch0: autoconf-pull-dynamic-and-not-static-libs-from-pkg-config.patch Patch1: autogen-only-deal-with-json-yaksa-if-enabled.patch Patch2: romio-test-fix-bad-snprintf-arguments.patch - +Patch3: ch4-shm-fix-data-type-for-recv_bytes-in-MPIDI_POSIX_mpi_release_gather_release.patch URL: http://mvapich.cse.ohio-state.edu BuildRoot: %{_tmppath}/%{name}-%{version}-build -- 2.51.1 From da4cec1db4cfe44e59b5977457f15dde1e417e445dfbb23b5d71c838a58f50a8 Mon Sep 17 00:00:00 2001 From: Nicolas Morey Date: Sun, 9 Nov 2025 00:28:22 +0100 Subject: [PATCH 5/6] Speed up testsuite by not rebuilding mvpich4 completely Signed-off-by: Nicolas Morey --- mvapich4.changes | 1 + mvapich4.spec | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/mvapich4.changes b/mvapich4.changes index 6c4bd3a..197ef7d 100644 --- a/mvapich4.changes +++ b/mvapich4.changes @@ -5,6 +5,7 @@ Tue Nov 4 20:31:05 UTC 2025 - Nicolas Morey - Disable CMA in %check as it requires specific user capabilities - Add ch4-shm-fix-data-type-for-recv_bytes-in-MPIDI_POSIX_mpi_release_gather_release.patch to fix a datatype issue on s390x +- Speed up testsuite by not rebuilding mvpich4 completely ------------------------------------------------------------------- Fri Aug 1 11:34:18 UTC 2025 - Nicolas Morey diff --git a/mvapich4.spec b/mvapich4.spec index c8146f3..543fd7a 100644 --- a/mvapich4.spec +++ b/mvapich4.spec @@ -203,24 +203,26 @@ autoreconf -fi --with-device=ch4:ucx \ %endif --without-mpe -make %{?_smp_mflags} V=1 %if 0%{?testsuite} +%install +rm -rf %{buildroot}/* + %check # Disable CMA. Modern kernels require specific ptrace capabilities # that are not available in OBS export MPIR_CVAR_CH4_CMA_ENABLE=0 -make V=1 check -%endif +for dir in src/mpl src/mpi/romio/test; do + ( + cd $dir && make check + ) +done + +%else +make %{?_smp_mflags} V=1 %install -%if 0%{?testsuite} -# Remove everything from testsuite package -# It is all contained by mvapich4 packages -rm -rf %{buildroot}/* - -%else make DESTDIR=%{buildroot} V=1 install rm -f %{buildroot}%{p_libdir}/libfmpich.la \ -- 2.51.1 From 50f7c00254b836b682618461cefcd6fbacfb51169b026addcaf6e2f8664ba812 Mon Sep 17 00:00:00 2001 From: Nicolas Morey Date: Sun, 9 Nov 2025 00:52:44 +0100 Subject: [PATCH 6/6] Fix FFLAGS Signed-off-by: Nicolas Morey --- mvapich4.changes | 1 + mvapich4.spec | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mvapich4.changes b/mvapich4.changes index 197ef7d..fef9de1 100644 --- a/mvapich4.changes +++ b/mvapich4.changes @@ -6,6 +6,7 @@ Tue Nov 4 20:31:05 UTC 2025 - Nicolas Morey - Add ch4-shm-fix-data-type-for-recv_bytes-in-MPIDI_POSIX_mpi_release_gather_release.patch to fix a datatype issue on s390x - Speed up testsuite by not rebuilding mvpich4 completely +- Fix FFLAGS ------------------------------------------------------------------- Fri Aug 1 11:34:18 UTC 2025 - Nicolas Morey diff --git a/mvapich4.spec b/mvapich4.spec index 543fd7a..7b5df8e 100644 --- a/mvapich4.spec +++ b/mvapich4.spec @@ -172,7 +172,7 @@ cp /usr/share/automake*/config.* . # GCC10 needs an extra flag to allow badly passed parameters %if 0%{?gcc_version} >= 10 -export FFLAGS="$FFLAGS -fallow-argument-mismatch $FFLAGS" +export FFLAGS="-fallow-argument-mismatch %{optflags}" %endif autoreconf -fi -- 2.51.1