diff --git a/_multibuild b/_multibuild index 09a9804..a8e6772 100644 --- a/_multibuild +++ b/_multibuild @@ -1,4 +1,6 @@ ucx ucx-testsuite + ofi + ofi-testsuite 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 38aab75..fef9de1 100644 --- a/mvapich4.changes +++ b/mvapich4.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +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 +- 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 d476267..7b5df8e 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 @@ -172,10 +172,10 @@ 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 -./autogen.sh --without-ucx --without-ofi --without-json +autoreconf -fi %configure \ --prefix=%{p_prefix} \ --exec-prefix=%{p_prefix} \ @@ -203,21 +203,26 @@ export FFLAGS="$FFLAGS -fallow-argument-mismatch $FFLAGS" --with-device=ch4:ucx \ %endif --without-mpe -make %{?_smp_mflags} V=1 %if 0%{?testsuite} +%install +rm -rf %{buildroot}/* + %check -make V=1 check -%endif +# Disable CMA. Modern kernels require specific ptrace capabilities +# that are not available in OBS +export MPIR_CVAR_CH4_CMA_ENABLE=0 +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 \