SHA256
1
0
forked from pool/mpich

23 Commits

Author SHA256 Message Date
Nicolas Morey
2f71a10b62 Fix FFLAGS
Signed-off-by: Nicolas Morey <nmorey@suse.com>
2025-11-09 01:15:10 +01:00
Nicolas Morey
83fcab613e Fix random configure failure on aarch64
Signed-off-by: Nicolas Morey <nmorey@suse.com>
2025-11-09 01:15:10 +01:00
Nicolas Morey
0064fc5d6c Speed up testsuite by not rebuilding mpich completely
Signed-off-by: Nicolas Morey <nmorey@suse.com>
2025-11-09 01:15:10 +01:00
Nicolas Morey
43f9f20607 Fix a datatype issue on s390x
Signed-off-by: Nicolas Morey <nmorey@suse.com>
2025-11-09 00:13:13 +01:00
Nicolas Morey
15f2f50e9f disable CMA in make check
CMA does not work in OBS with recent kernels as it requires special user capabilities

Signed-off-by: Nicolas Morey <nmorey@suse.com>
2025-11-08 20:07:38 +01:00
Nicolas Morey
2bb6e745cc use autoreconf
This is much much faster than rerunning fully autogen.sh

Signed-off-by: Nicolas Morey <nmorey@suse.com>
2025-11-08 20:03:11 +01:00
Nicolas Morey
323ae90257 Rename standard multibuild flavor to ucx for more clarity
Signed-off-by: Nicolas Morey <nmorey@suse.com>
2025-11-04 19:03:23 +01:00
Nicolas Morey
caf2d5c876 Use external hwloc
Signed-off-by: Nicolas Morey <nmorey@suse.com>
2025-11-04 19:03:00 +01:00
Nicolas Morey
a1cbdd8dee Update to 4.3.2
Signed-off-by: Nicolas Morey <nmorey@suse.com>
2025-10-28 23:11:24 +01:00
38adbe3a04 Add Gitea build results 2025-10-27 17:35:26 +01:00
05ef4fee82 Accepting request 1310010 from science:HPC
OBS-URL: https://build.opensuse.org/request/show/1310010
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mpich?expand=0&rev=38
2025-10-10 15:09:12 +00:00
5c58781524 - Remove romio-disable-tests.patch to reenable tests in OBS.
- Add romio-test-fix-bad-snprintf-arguments.patch to fix a test
  issue when building with FORTIFY_SOURCE
- Fix dependency from '*testsuite' packages to BuildRequires '*-devel'

OBS-URL: https://build.opensuse.org/package/show/science:HPC/mpich?expand=0&rev=83
2025-10-09 13:41:40 +00:00
46ac03da29 Accepting request 1288728 from science:HPC
OBS-URL: https://build.opensuse.org/request/show/1288728
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mpich?expand=0&rev=37
2025-06-27 21:01:21 +00:00
7c33e07c1e - Update to 4.3.1
- Fix initialization in GPU-aware builds when no devices are present
  - Fix internal pmix.h header conflict when building with an external
    PMIx library.
  - Fix build issue with Slurm by removing dependency on libslurm and
    always using internal logic for parsing the Slurm hostfile.
  - Fix potential stale GPU IPC handle usage resulting in data corruption
    or crashes
  - Update XPMEM thresholds to avoid excessive buffer mapping overhead
  - Fix potential hang in ROMIO when setting info hints on certain files
  - Improved detection of incompatible PMI[x] client/server configuration
  - Fix use of PMIX_PREFIX attribute for certain versions of OpenPMIx
  - Fix Intel GPU output with MPIR_CVAR_DEBUG_SUMMARY
  - Fix F08 binding compilation with nvfortran
  - Fix line continuation Hydra's --configfile option
  - Fix valgrind uninitialized read warnings in ch3
  - Fix missing mpixxx_opts.conf file with help text for mpicc and friends
  - Fixes for several compiler warnings

OBS-URL: https://build.opensuse.org/package/show/science:HPC/mpich?expand=0&rev=81
2025-06-26 16:15:31 +00:00
c1b988e46d Accepting request 1265556 from science:HPC
- Remove support for gnu-hpc build flavours

- Disable gnu-hpc build flavours (bsc#1239982)

OBS-URL: https://build.opensuse.org/request/show/1265556
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mpich?expand=0&rev=36
2025-04-03 14:46:44 +00:00
6f9d3a62db - Remove support for gnu-hpc build flavours
OBS-URL: https://build.opensuse.org/package/show/science:HPC/mpich?expand=0&rev=79
2025-03-30 15:33:43 +00:00
8f6201a385 - Disable gnu-hpc build flavours (bsc#1239982)
OBS-URL: https://build.opensuse.org/package/show/science:HPC/mpich?expand=0&rev=78
2025-03-24 16:00:26 +00:00
2516dcdb76 Accepting request 1247233 from science:HPC
OBS-URL: https://build.opensuse.org/request/show/1247233
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mpich?expand=0&rev=35
2025-02-20 15:40:16 +00:00
d2b9e60117 Accepting request 1247232 from home:NMorey:branches:science:HPC
- Update to 4.3.0
  - Support MPI memory allocation kinds side document.
  - Support MPI ABI Proposal. Configure with --enable-mpi-abi and build with
    mpicc_abi. By default, mpicc still builds and links with MPICH ABI.
  - Added benchmark tests test/mpi/bench/p2p_{latency,bw}. 
  - Added CMA support in CH4 IPC.
  - Added IPC read algorithm for intranode Allgather and Allgatherv.
  - Added CVAR MPIR_CVAR_CH4_SHM_POSIX_TOPO_ENABLE to enable non-temporal memcpy
    for inter-numa shm communication.
  - Added CVAR MPIR_CVAR_DEBUG_PROGRESS_TIMEOUT for debugging MPI deadlock issues.  
  - ch4:ucx now supports dynamic processes. MPI_Comm_spawn{_multiple} will work.
    MPI_Open_port will fail due to ucx port name exceeds current MPI_MAX_PORT_NAME
    of 256. One can work around by use an info hint "port_name_size" and use a
    larger port name buffer.
  - PMI-1 defines PMI_MAX_PORT_NAME, which may be different from MPI_MAX_PORT_NAME.
    This is used by "PMI_Lookup_name". Consequently, MPI_Lookup_name accepts info
    hint "port_name_size" that may be larger than MPI_MAX_PORT_NAME. If the port
    name does not fit in "port_name_size", it will return a truncation error.
  - Autogen default to use -yaksa-depth=2.
  - Default MPIR_CVAR_CH4_ROOTS_ONLY_PMI to on.
  - Added ch4 netmod API am_tag_send and am_tag_recv.
  - Added MPIR_CVAR_CH4_OFI_EAGER_THRESHOLD to force RNDV send mode.
  - Make check target will run ROMIO tests.
  - Add back handle conversion macros (f2c/c2f) to preserve ABI
    compatibility with older MPICH libraries
  - Fix compilation issue with g++ in -std=gnu++20 mode
  - Fix bug in MPI_ANY_SOURCE handling observed using the libfabric CXI
    provider
  - Add NIC information to error messages in ch4:ofi netmod
- Add romio-disable-tests.patch to disable romio tests

OBS-URL: https://build.opensuse.org/request/show/1247232
OBS-URL: https://build.opensuse.org/package/show/science:HPC/mpich?expand=0&rev=76
2025-02-19 20:17:01 +00:00
6ec8e73b8e Accepting request 1193491 from science:HPC
OBS-URL: https://build.opensuse.org/request/show/1193491
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mpich?expand=0&rev=34
2024-08-13 11:24:22 +00:00
045130142e Accepting request 1193409 from home:NMorey:branches:science:HPC
- Update to 4.2.2
  -  Update embedded libfabric to v1.20.1 and fix compilation with GCC 14.
  -  Fix dataloop support for MPIX_Type_iov routines
  -  Fix crash in Hydra when system has many local ip addresses
  -  Fix RMA fallback check in ch4:ofi netmod
  -  Fix MPI_UNDEFINED handling in mpi_f08 module
  -  Fix Slurm environment variable inheritance in Hydra
  -  Fix multiple issues with large count support in ROMIO
  -  Fix potential hang in init using PMIx client and nonstandard keys
  -  Fix crash if PMIx client cannot get appnum from server during init
  -  Fix other build errors and warnings
  -  Disable flat_namespace to build libmpifort on macOS by default
  -  Prefix warning messages with "MPICH"
  -  Add --disable-doc configure option
  -  Fix support for building MPICH Fortran support with Xcode 15 on macOS
  -  Fix bug in MPI_WIN_SHARED_QUERY when window is not shared
  -  Fix bug in ch4/ofi gpu pipelining
  -  Fixes for Intel GPU support
  -  Fix memory leak in ch4/shm collectives
  -  Fix bug in MPI_COMM_SPLIT with intercommunicators and non-zero root
  -  Fix bug in DAOS ROMIO driver
  -  Fix bug in cycling error code array
  -  Return an error if there is failure to create a datatype in mpi_f08
     module for noncontiguous user data
  -  Return an error when shared memory segment creation fails
  -  Complete support MPI 4.1 specification
  -  Experimental thread communicator feature (e.g. MPIX_Threadcomm_init).
     See paper "Frustrated With MPI+Threads? Try MPIxThreads!",
     https://doi.org/10.1145/3615318.3615320.
  -  Experimental datatype functions MPIX_Type_iov_len and MPIX_Type_Iov

OBS-URL: https://build.opensuse.org/request/show/1193409
OBS-URL: https://build.opensuse.org/package/show/science:HPC/mpich?expand=0&rev=74
2024-08-12 16:29:03 +00:00
5b6ee6c81a Accepting request 1183208 from science:HPC
OBS-URL: https://build.opensuse.org/request/show/1183208
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mpich?expand=0&rev=33
2024-06-25 21:09:34 +00:00
27f10865e7 Accepting request 1183200 from home:NMorey:branches:science:HPC
- Remove unneeded sysfsutil dependency
- Do no build hpc flavours on 32b systems

OBS-URL: https://build.opensuse.org/request/show/1183200
OBS-URL: https://build.opensuse.org/package/show/science:HPC/mpich?expand=0&rev=72
2024-06-25 14:27:35 +00:00
9 changed files with 351 additions and 338 deletions

12
README.md Normal file
View File

@@ -0,0 +1,12 @@
## Build Results
Current state of mpich in openSUSE:Factory is
![Factory build results](https://br.opensuse.org/status/openSUSE:Factory/mpich/standard)
The current state of mpich in the devel project build (science:HPC)
![Devel project build results](https://br.opensuse.org/status/science:HPC/mpich)

View File

@@ -1,10 +1,6 @@
<multibuild>
<package>standard</package>
<package>testsuite</package>
<package>ucx</package>
<package>ucx-testsuite</package>
<package>ofi</package>
<package>ofi-testsuite</package>
<package>gnu-hpc</package>
<package>gnu-hpc-testsuite</package>
<package>gnu-hpc-ofi</package>
<package>gnu-hpc-ofi-testsuite</package>
</multibuild>

View File

@@ -0,0 +1,47 @@
commit 564c0affae6a79b3c99fce5717c402182d74daa1
Author: Nicolas Morey <nmorey@suse.com>
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 <nmorey@suse.com>
diff --git src/mpid/ch4/shm/posix/release_gather/release_gather.h src/mpid/ch4/shm/posix/release_gather/release_gather.h
index ac966cb9772e..ff1308830d00 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,

View File

@@ -1,20 +0,0 @@
#
# mpich
#
%hpc_mpich_init(V:) \
%{-V: %define _mf_ver %{-V*}} \
%{expand: %%global hpc_mpich_dep_version %%{?_mf_ver}} \
%{expand: %%global hpc_mpich_dir mpich%{hpc_mpich_dep_version}} \
%global hpc_mpich_pack_version %{hpc_mpich_dep_version} \
%{expand: %%global _hpc_mpich_modules mpich}
# We may have to add a version here.
%hpc_setup_mpich \
module load mpich
%hpc_mpich_requires \
Requires: mpich%{hpc_mpich_dep_version}-%{hpc_compiler_family}%{hpc_cf_pack_version}-hpc
%hpc_mpich_requires_devel \
Requires: mpich%{hpc_mpich_dep_version}-%{hpc_compiler_family}%{hpc_cf_pack_version}-hpc-devel

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:883f5bb3aeabf627cb8492ca02a03b191d09836bbe0f599d8508351179781d41
size 40241352

BIN
mpich-4.3.2.tar.gz LFS Normal file

Binary file not shown.

View File

@@ -1,3 +1,121 @@
-------------------------------------------------------------------
Tue Nov 4 17:54:18 UTC 2025 - Nicolas Morey <nicolas.morey@suse.com>
- Use external hwloc
- Rename standard multibuild flavor to ucx for more clarity
- 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 mpich completely
- Fix random configure failure on aarch64
- Fix FFLAGS
-------------------------------------------------------------------
Tue Oct 28 17:54:04 UTC 2025 - Nicolas Morey <nicolas.morey@suse.com>
- Update to 4.3.2
- Improve libfabric provider selection when available providers have
negative internal score
- Improve error messages when Level Zero failures are detected
- Improve localhost detection in Hydra
- Update libfabric usage to silence deprecation warnings
- Update yaksa for improved reproducibility in code generation
- Add compatibility with CUDA 13
- Fix missing const in nondestructive request test and status query
functions
- Fix HCOLL support
- Fix crash with GPU-aware build when running on systems with no GPUs
- Fix HIP device query
- Fix singleton init with Hydra
- Fix thread safety for Level Zero memcpy functions
- Fix potential crash when release gather collective initialization fails
- Fix ch3 connect/accept protocol handling when a discard event arrives
after a connection is already established
- Fix inlining for posix eager modules in ch4/shm
- Fix weak attribute usage in MPI ABI build
- Fix potential use-after-free bug in Hydra during spawn operations
- Fix bug in persistent bcast algorithm
- Fix bug in fabric coordinate retrieval with PMIx
- Fix integer overflow and signed/unsigned bugs in ROMIO
- Fix Quobtye ROMIO driver build error
- Fix broken string conversion in mpi_f08 module
- Fix compilation issue with mpi_f08 and NAG compiler
- Fixes for various test program bugs
-------------------------------------------------------------------
Thu Sep 25 06:59:00 UTC 2025 - Nicolas Morey <nicolas.morey@suse.com>
- Remove romio-disable-tests.patch to reenable tests in OBS.
- Add romio-test-fix-bad-snprintf-arguments.patch to fix a test
issue when building with FORTIFY_SOURCE
- Fix dependency from '*testsuite' packages to BuildRequires '*-devel'
-------------------------------------------------------------------
Sun Jun 22 17:39:27 UTC 2025 - Nicolas Morey <nicolas.morey@suse.com>
- Update to 4.3.1
- Fix initialization in GPU-aware builds when no devices are present
- Fix internal pmix.h header conflict when building with an external
PMIx library.
- Fix build issue with Slurm by removing dependency on libslurm and
always using internal logic for parsing the Slurm hostfile.
- Fix potential stale GPU IPC handle usage resulting in data corruption
or crashes
- Update XPMEM thresholds to avoid excessive buffer mapping overhead
- Fix potential hang in ROMIO when setting info hints on certain files
- Improved detection of incompatible PMI[x] client/server configuration
- Fix use of PMIX_PREFIX attribute for certain versions of OpenPMIx
- Fix Intel GPU output with MPIR_CVAR_DEBUG_SUMMARY
- Fix F08 binding compilation with nvfortran
- Fix line continuation Hydra's --configfile option
- Fix valgrind uninitialized read warnings in ch3
- Fix missing mpixxx_opts.conf file with help text for mpicc and friends
- Fixes for several compiler warnings
-------------------------------------------------------------------
Sat Mar 29 14:25:11 UTC 2025 - Nicolas Morey <nicolas.morey@suse.com>
- Remove support for gnu-hpc build flavours
-------------------------------------------------------------------
Mon Mar 24 12:49:48 UTC 2025 - Nicolas Morey <nicolas.morey@suse.com>
- Disable gnu-hpc build flavours (bsc#1239982)
-------------------------------------------------------------------
Wed Feb 19 15:24:58 UTC 2025 - Nicolas Morey <nicolas.morey@suse.com>
- Update to 4.3.0
- Support MPI memory allocation kinds side document.
- Support MPI ABI Proposal. Configure with --enable-mpi-abi and build with
mpicc_abi. By default, mpicc still builds and links with MPICH ABI.
- Added benchmark tests test/mpi/bench/p2p_{latency,bw}.
- Added CMA support in CH4 IPC.
- Added IPC read algorithm for intranode Allgather and Allgatherv.
- Added CVAR MPIR_CVAR_CH4_SHM_POSIX_TOPO_ENABLE to enable non-temporal memcpy
for inter-numa shm communication.
- Added CVAR MPIR_CVAR_DEBUG_PROGRESS_TIMEOUT for debugging MPI deadlock issues.
- ch4:ucx now supports dynamic processes. MPI_Comm_spawn{_multiple} will work.
MPI_Open_port will fail due to ucx port name exceeds current MPI_MAX_PORT_NAME
of 256. One can work around by use an info hint "port_name_size" and use a
larger port name buffer.
- PMI-1 defines PMI_MAX_PORT_NAME, which may be different from MPI_MAX_PORT_NAME.
This is used by "PMI_Lookup_name". Consequently, MPI_Lookup_name accepts info
hint "port_name_size" that may be larger than MPI_MAX_PORT_NAME. If the port
name does not fit in "port_name_size", it will return a truncation error.
- Autogen default to use -yaksa-depth=2.
- Default MPIR_CVAR_CH4_ROOTS_ONLY_PMI to on.
- Added ch4 netmod API am_tag_send and am_tag_recv.
- Added MPIR_CVAR_CH4_OFI_EAGER_THRESHOLD to force RNDV send mode.
- Make check target will run ROMIO tests.
- Add back handle conversion macros (f2c/c2f) to preserve ABI
compatibility with older MPICH libraries
- Fix compilation issue with g++ in -std=gnu++20 mode
- Fix bug in MPI_ANY_SOURCE handling observed using the libfabric CXI
provider
- Add NIC information to error messages in ch4:ofi netmod
- Add romio-disable-tests.patch to disable romio tests
as they cannot be ran within %check
-------------------------------------------------------------------
Mon Aug 12 10:30:53 UTC 2024 - Nicolas Morey <nicolas.morey@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file
# spec file for package mpich
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,185 +24,25 @@
# % define build_static_devel 1
%define pname mpich
%define vers 4.2.2
%define _vers 4_2_2
%if "%{flavor}" == ""
ExclusiveArch: do_not_build
%{bcond_with hpc}
%endif
%if "%{flavor}" == "standard"
%if "%{flavor}" == "ucx"
%define build_flavor ucx
%{bcond_with hpc}
%endif
%if "%{flavor}" == "testsuite"
%if "%{flavor}" == "ucx-testsuite"
%define build_flavor ucx
%define testsuite 1
%{bcond_with hpc}
%endif
%if "%{flavor}" == "ofi"
%define build_flavor ofi
%{bcond_with hpc}
%endif
%if "%{flavor}" == "ofi-testsuite"
%define build_flavor ofi
%define testsuite 1
%{bcond_with hpc}
%endif
%if "%flavor" == "gnu-hpc"
%define compiler_family gnu
%undefine c_f_ver
%define build_flavor ucx
%define build_static_devel 1
%{bcond_without hpc}
%endif
%if "%flavor" == "gnu-hpc-testsuite"
%define compiler_family gnu
%undefine c_f_ver
%define testsuite 1
%define build_flavor ucx
%{bcond_without hpc}
%endif
%if "%flavor" == "gnu-hpc-ofi"
%define compiler_family gnu
%undefine c_f_ver
%define build_flavor ofi
%define build_static_devel 1
%{bcond_without hpc}
%endif
%if "%flavor" == "gnu-hpc-ofi-testsuite"
%define compiler_family gnu
%undefine c_f_ver
%define testsuite 1
%define build_flavor ofi
%{bcond_without hpc}
%endif
%if "%flavor" == "gnu7-hpc"
%define compiler_family gnu
%define c_f_ver 7
%define build_flavor ucx
%define build_static_devel 1
%{bcond_without hpc}
%endif
%if "%flavor" == "gnu7-hpc-testsuite"
%define compiler_family gnu
%define c_f_ver 7
%define testsuite 1
%define build_flavor ucx
%{bcond_without hpc}
%endif
%if "%flavor" == "gnu7-hpc-ofi"
%define compiler_family gnu
%define c_f_ver 7
%define build_flavor ofi
%define build_static_devel 1
%{bcond_without hpc}
%endif
%if "%flavor" == "gnu7-hpc-ofi-testsuite"
%define compiler_family gnu
%define c_f_ver 7
%define testsuite 1
%define build_flavor ofi
%{bcond_without hpc}
%endif
%if "%flavor" == "gnu8-hpc"
%define compiler_family gnu
%define c_f_ver 8
%define build_flavor ucx
%define build_static_devel 1
%{bcond_without hpc}
%endif
%if "%flavor" == "gnu8-hpc-testsuite"
%define compiler_family gnu
%define c_f_ver 8
%define testsuite 1
%define build_flavor ucx
%{bcond_without hpc}
%endif
%if "%flavor" == "gnu8-hpc-ofi"
%define compiler_family gnu
%define c_f_ver 8
%define build_flavor ofi
%define build_static_devel 1
%{bcond_without hpc}
%endif
%if "%flavor" == "gnu8-hpc-ofi-testsuite"
%define compiler_family gnu
%define c_f_ver 8
%define testsuite 1
%define build_flavor ofi
%{bcond_without hpc}
%endif
%if "%flavor" == "gnu9-hpc"
%define compiler_family gnu
%define c_f_ver 9
%define build_flavor ucx
%define build_static_devel 1
%{bcond_without hpc}
%endif
%if "%flavor" == "gnu9-hpc-testsuite"
%define compiler_family gnu
%define c_f_ver 9
%define testsuite 1
%define build_flavor ucx
%{bcond_without hpc}
%endif
%if "%flavor" == "gnu9-hpc-ofi"
%define compiler_family gnu
%define c_f_ver 9
%define build_flavor ofi
%define build_static_devel 1
%{bcond_without hpc}
%endif
%if "%flavor" == "gnu9-hpc-ofi-testsuite"
%define compiler_family gnu
%define c_f_ver 9
%define testsuite 1
%define build_flavor ofi
%{bcond_without hpc}
%endif
%if "%flavor" == "gnu10-hpc"
%define compiler_family gnu
%define c_f_ver 10
%define build_flavor ucx
%define build_static_devel 1
%{bcond_without hpc}
%endif
%if "%flavor" == "gnu10-hpc-testsuite"
%define compiler_family gnu
%define c_f_ver 10
%define testsuite 1
%define build_flavor ucx
%{bcond_without hpc}
%endif
%if "%flavor" == "gnu10-hpc-ofi"
%define compiler_family gnu
%define c_f_ver 10
%define build_flavor ofi
%define build_static_devel 1
%{bcond_without hpc}
%endif
%if "%flavor" == "gnu10-hpc-ofi-testsuite"
%define compiler_family gnu
%define c_f_ver 10
%define testsuite 1
%define build_flavor ofi
%{bcond_without hpc}
%endif
%if "%{build_flavor}" != "ucx"
@@ -217,7 +57,6 @@ ExclusiveArch: do_not_build
%endif
%endif
%if %{without hpc}
%define module_name mpich%{?pack_suff}
%define p_prefix /usr/%_lib/mpi/gcc/%{module_name}
%define p_bindir %{p_prefix}/bin
@@ -226,39 +65,26 @@ ExclusiveArch: do_not_build
%define p_mandir %{p_datadir}/man
%define p_libdir %{p_prefix}/%{_lib}
%define p_libexecdir %{p_prefix}/%{_lib}
%define p_sysconfdir %{p_prefix}/%{_sysconfdir}
%define _moduledir /usr/share/modules/gnu-%{module_name}
%define package_name %{pname}%{?pack_suff}
%else
%{hpc_init -M -c %compiler_family %{?c_f_ver:-v %{c_f_ver}} -m mpich %{?pack_suff:-e %{build_flavor}} %{?mpi_f_ver:-V %{mpi_f_ver}}}
%define p_prefix %{hpc_prefix}
%define p_bindir %{hpc_bindir}
%define p_datadir %{hpc_datadir}
%define p_includedir %{hpc_includedir}
%define p_mandir %{hpc_mandir}
%define p_libdir %{hpc_libdir}
%define p_libexecdir %{hpc_libexecdir}
%define package_name %{pname}%{?pack_suff}_%{_vers}-%{compiler_family}%{?c_f_ver}-hpc
%global hpc_mpich_dep_version %(VER=%{?m_f_ver}; echo -n ${VER})
%global hpc_mpich_dir mpich
%global hpc_mpich_pack_version %{hpc_mpich_dep_version}
ExcludeArch: i586 %arm s390
%endif
Name: %{package_name}%{?testsuite:-testsuite}
Version: %{vers}
Version: 4.3.2
Release: 0
Summary: High-performance and widely portable implementation of MPI
License: MIT
Group: Development/Libraries/Parallel
URL: http://www.mpich.org/
Source0: http://www.mpich.org/static/downloads/%{version}/mpich-%{vers}.tar.gz
Source0: http://www.mpich.org/static/downloads/%{version}/mpich-%{version}.tar.gz
Source1: mpivars.sh
Source2: mpivars.csh
Source3: macros.hpc-mpich
Source100: _multibuild
Source101: README.md
Patch1: autogen-only-deal-with-json-yaksa-if-enabled.patch
Patch2: autoconf-pull-dynamic-and-not-static-libs-from-pkg-config.patch
Patch3: romio-test-fix-bad-snprintf-arguments.patch
Patch4: ch4-shm-fix-data-type-for-recv_bytes-in-MPIDI_POSIX_mpi_release_gather_release.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: fdupes
@@ -276,6 +102,7 @@ BuildRequires: libtool
BuildRequires: libtool
BuildRequires: mpi-selector
BuildRequires: python3-devel
BuildRequires: hwloc-devel >= 2.0
%if "%{build_flavor}" == "ofi"
BuildRequires: libfabric-devel
@@ -289,24 +116,16 @@ BuildRequires: libuct-devel >= 1.7.0
# UCX is only available for 64b archs
ExcludeArch: %ix86 %arm
%endif
Provides: mpi
%if %{without hpc}
BuildRequires: Modules
BuildRequires: gcc-c++
BuildRequires: gcc-fortran
BuildRequires: mpi-selector
Requires: mpi-selector
Requires(preun):mpi-selector
%else
BuildRequires: %{compiler_family}%{?c_f_ver}-compilers-hpc-macros-devel
BuildRequires: lua-lmod
BuildRequires: suse-hpc
%hpc_requires
%endif
Requires(preun): mpi-selector
%if 0%{?testsuite}
BuildRequires: %package_name = %{version}
BuildRequires: %package_name-devel = %{version}
%endif
%description
@@ -326,15 +145,11 @@ The goals of MPICH are:
%if 0%{!?testsuite:1}
%package devel
Summary: SDK for MPICH %{?with_hpc:HPC} version %{version}
Summary: SDK for MPICH version %{version}
Group: Development/Libraries/Parallel
Requires: %{name} = %{version}
%if %{without hpc}
Requires: libstdc++-devel
%else
%hpc_requires_devel
%endif
Requires: %{name} = %{version}
Requires: libstdc++-devel
%description devel
MPICH is a freely available, portable implementation of MPI, the
@@ -344,21 +159,9 @@ headers and libraries needed for developing MPI applications.
This RPM contains all the wrappers necessary to compile, link, and run
Open MPI jobs.
%if %{with hpc}
%package macros-devel
Summary: HPC Macros for MPICH version %{version}
Group: Development/Libraries/Parallel
Requires: %{name}-devel = %{version}
Provides: %{pname}-hpc-macros-devel = %{version}
Conflicts: otherproviders(%{pname}-hpc-macros-devel)
%description macros-devel
HPC Macros for building RPM packages for MPICH version %{version}.
%endif
%if 0%{?build_static_devel}
%package devel-static
Summary: Static libraries for MPICH %{?with_hpc:HPC} version %{version}
Summary: Static libraries for MPICH version %{version}
Group: Development/Libraries/Parallel
Requires: %{name}-devel = %{version}
@@ -371,23 +174,10 @@ This RPM contains the static library files, which are packaged separately from
the dynamic library and headers.
%endif
%if %{with hpc}
%{hpc_master_package -L -a}
%{hpc_master_package -a devel}
%{hpc_master_package macros-devel}
%{hpc_master_package -a devel-static}
%endif # ?with_hpc
%endif # ! testsuite
%prep
echo FLAVOR %{flavor}
%if %{with hpc}
echo with HPC
%endif
%if %{without hpc}
echo without HPC
%endif
%autosetup -p0 -n mpich-%{version}%{?rc_ver}
# Make sure prebuilt dependencies are used and not mpich submodules
@@ -397,17 +187,16 @@ rm -R modules/{ucx,libfabric,json-c}
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
# GCC10 needs an extra flag to allow badly passed parameters
%if 0%{?suse_version} > 1500 || 0%{?hpc_gnu_dep_version} >= 10
export FFLAGS="-fallow-argument-mismatch $FFLAGS"
export FCFLAGS="-fallow-argument-mismatch $FCFLAGS"
%if 0%{?suse_version} > 1500
export FFLAGS="-fallow-argument-mismatch %{optflags}"
export FCFLAGS="-fallow-argument-mismatch %{optflags}"
%endif
./autogen.sh --without-ucx --without-ofi --without-json
%{?with_hpc:%hpc_debug}
%if %{with hpc}
%{hpc_setup}
%{hpc_configure} \
%else
%ifarch aarch64
# For some reason, configure has random issue with defining this
# on aarch64 only. Set it to avoid random failure
export CROSS_F77_SIZEOF_INTEGER=4
%endif
autoreconf -fi
%configure \
--prefix=%{p_prefix} \
--exec-prefix=%{p_prefix} \
@@ -417,10 +206,11 @@ export FCFLAGS="-fallow-argument-mismatch $FCFLAGS"
--libdir=%{p_libdir} \
--libexecdir=%{p_libexecdir} \
--mandir=%{p_mandir} \
%endif
--docdir=%{_datadir}/doc/%{name} \
--sysconfdir=%{p_sysconfdir} \
--disable-rpath \
--disable-wrapper-rpath \
--with-hwloc \
%if "%{build_flavor}" == "ofi"
--with-ofi \
--with-device=ch4:ofi \
@@ -434,6 +224,21 @@ export FCFLAGS="-fallow-argument-mismatch $FCFLAGS"
MPICHLIB_CFLAGS="%{optflags}" \
MPICHLIB_CXXFLAGS="%{optflags}"
%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
for dir in src/mpl src/mpi/romio/test; do
(
cd $dir && make check
)
done
%else
make %{?_smp_mflags} VERBOSE=1
%install
@@ -467,17 +272,6 @@ find %{buildroot} -name "*.a" -delete
%fdupes %{buildroot}%{p_datadir}
%fdupes %{buildroot}%{p_libdir}/pkgconfig
%if 0%{?testsuite}
# Remove everything from testsuite package
# It is all contained by mpich packages
rm -rf %{buildroot}/*
%check
make check
%else
%if %{without hpc}
# make and install mpivars files
install -m 0755 -d %{buildroot}%{_bindir}
sed -e 's,prefix,%p_prefix,g' -e 's,libdir,%{p_libdir},g' %{S:1} > %{buildroot}%{p_bindir}/mpivars.sh
@@ -507,47 +301,6 @@ cat << EOF > %{buildroot}%{_moduledir}/.version
set ModulesVersion "%{version}"
EOF
%else # with hpc
install -d -m 755 %{buildroot}%{_rpmmacrodir}
cp %{S:3} %{buildroot}%{_rpmmacrodir}
%hpc_write_modules_files
#%%Module1.0#####################################################################
proc ModulesHelp { } {
puts stderr " "
puts stderr "This module loads the %{pname} library built with the %{compiler_family} toolchain."
puts stderr "\nVersion %{version}\n"
}
module-whatis "Name: %{pname} built with %{compiler_family} toolchain"
module-whatis "Version: %{version}"
module-whatis "Category: runtime library"
module-whatis "Description: %{SUMMARY:0}"
module-whatis "URL: %{url}"
set version %{version}
prepend-path PATH %{hpc_bindir}
prepend-path MANPATH %{hpc_mandir}
prepend-path LD_LIBRARY_PATH %{hpc_libdir}
prepend-path MODULEPATH %{hpc_modulepath}
prepend-path MPI_DIR %{hpc_prefix}
%{hpc_modulefile_add_pkgconfig_path}
family "MPI"
EOF
cat <<EOF > %{buildroot}/%{p_bindir}/mpivars.sh
%hpc_setup_compiler
module load %{hpc_mpi_family}%{?pack_suff}/%{version}
EOF
sed -e "s/export/setenv/" -e "s/=/ /" \
%{buildroot}/%{p_bindir}/mpivars.sh > \
%{buildroot}/%{p_bindir}/mpivars.csh
mkdir -p %{buildroot}%{_sysconfdir}/rpm
%endif # with hpc
find %{buildroot} -type f -name "*.la" -exec rm -f {} ';'
@@ -555,18 +308,15 @@ find %{buildroot} -type f -name "*.la" -exec rm -f {} ';'
%post
/sbin/ldconfig
%if %{without hpc}
# Always register. We might be already registered in the case of an udate
# but mpi-selector handles it fine
/usr/bin/mpi-selector \
--register %{name}%{?pack_suff} \
--source-dir %{p_bindir} \
--yes
%endif
%postun
/sbin/ldconfig
%if %{without hpc}
# Only unregister when uninstalling
if [ "$1" = "0" ]; then
/usr/bin/mpi-selector --unregister %{name}%{?pack_suff} --yes
@@ -575,23 +325,13 @@ if [ "$1" = "0" ]; then
/usr/bin/mpi-selector --system --unset --yes
fi
fi
%else
%hpc_module_delete_if_default
%endif
%files
%defattr(-,root,root)
%doc CHANGES COPYRIGHT README README.envvar RELEASE_NOTES
%if %{without hpc}
%doc CHANGES COPYRIGHT README README.envvar
%dir /usr/%_lib/mpi
%dir /usr/%_lib/mpi/gcc
%dir /usr/share/modules
%dir %{_moduledir}
%{_moduledir}
%else
%hpc_mpi_dirs
%hpc_modules_files
%endif
%doc %{_datadir}/doc/*
%dir %{p_prefix}
%dir %{p_bindir}
@@ -601,9 +341,11 @@ fi
%dir %{p_mandir}/man1
%dir %{p_mandir}/man3
%dir %{p_libdir}
%{_moduledir}
%{p_bindir}/*
%{p_mandir}/man1/*
%{p_libdir}/*.so.*
%{p_sysconfdir}
%files devel
%defattr(-,root,root)
@@ -619,12 +361,6 @@ fi
%{p_libdir}/*.a
%endif
%if %{with hpc}
%files macros-devel
%defattr(-,root,root)
%config %{_rpmmacrodir}/macros.hpc-mpich
%endif # with hpc
%endif # !testsuite
%changelog

View File

@@ -0,0 +1,124 @@
commit 4da63a0032ea22d1530adf4da05a095d841bc969
Author: Nicolas Morey <nmorey@suse.com>
Date: Fri Aug 1 13:24:12 2025 +0200
romio: test: fix bad snprintf arguments
Even though there can not be a buffer overflow as the string is properly
sized, noncontig_coll2 fails when built with -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 :
----
FAIL: noncontig_coll2
=====================
Thread 1 "noncontig_coll2" received signal SIGABRT, Aborted.
0x00007ffff709c5fc in __pthread_kill_implementation () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff709c5fc in __pthread_kill_implementation ()
from /lib64/libc.so.6
#1 0x00007ffff7042106 in raise () from /lib64/libc.so.6
#2 0x00007ffff702938b in abort () from /lib64/libc.so.6
#3 0x00007ffff702a3ab in __libc_message_impl.cold () from /lib64/libc.so.6
#4 0x00007ffff712b4fb in __fortify_fail () from /lib64/libc.so.6
#5 0x00007ffff712adc6 in __chk_fail () from /lib64/libc.so.6
#6 0x00007ffff712c8f5 in __snprintf_chk () from /lib64/libc.so.6
#7 0x000000000040275e in snprintf (__s=0x4aafee "", __n=<optimized out>,
__fmt=0x404077 "%s,") at /usr/include/bits/stdio2.h:68
#8 default_str (mynod=<optimized out>, len=61, array=0x59fca0,
dest=0x4aafd0 "hostname,")
at src/mpi/romio/test/noncontig_coll2.c:189
#9 main (argc=<optimized out>, argv=<optimized out>)
at src/mpi/romio/test/noncontig_coll2.c:330
----
This is due to the len parameter of snprintf not being updated as we
advance in the string.
Fix this issue by introducing a remaining len var that contains the exact amount
of bytes left.
Signed-off-by: Nicolas Morey <nmorey@suse.com>
diff --git src/mpi/romio/test/noncontig_coll2.c src/mpi/romio/test/noncontig_coll2.c
index 2b37d4749fc9..beade70c2388 100644
--- src/mpi/romio/test/noncontig_coll2.c
+++ src/mpi/romio/test/noncontig_coll2.c
@@ -181,12 +181,14 @@ int cb_gather_name_array(MPI_Comm comm, ADIO_cb_name_array * arrayp)
void default_str(int mynod, int len, ADIO_cb_name_array array, char *dest)
{
char *ptr;
- int i, p;
+ int i, p, rlen;
if (!mynod) {
ptr = dest;
+ rlen = len;
for (i = 0; i < array->namect; i++) {
- p = snprintf(ptr, len, "%s,", array->names[i]);
+ p = snprintf(ptr, rlen, "%s,", array->names[i]);
ptr += p;
+ rlen = rlen - p;
}
/* chop off that last comma */
dest[strlen(dest) - 1] = '\0';
@@ -197,12 +199,14 @@ void default_str(int mynod, int len, ADIO_cb_name_array array, char *dest)
void reverse_str(int mynod, int len, ADIO_cb_name_array array, char *dest)
{
char *ptr;
- int i, p;
+ int i, p, rlen;
if (!mynod) {
ptr = dest;
- for (i = (array->namect - 1); i >= 0; i--) {
- p = snprintf(ptr, len, "%s,", array->names[i]);
+ rlen = len;
+ for (i = (array->namect - 1); i >= 0; i--) {
+ p = snprintf(ptr, rlen, "%s,", array->names[i]);
ptr += p;
+ rlen = rlen - p;
}
dest[strlen(dest) - 1] = '\0';
}
@@ -212,18 +216,21 @@ void reverse_str(int mynod, int len, ADIO_cb_name_array array, char *dest)
void reverse_alternating_str(int mynod, int len, ADIO_cb_name_array array, char *dest)
{
char *ptr;
- int i, p;
+ int i, p, rlen;
if (!mynod) {
ptr = dest;
+ rlen = len;
/* evens */
for (i = (array->namect - 1); i >= 0; i -= 2) {
- p = snprintf(ptr, len, "%s,", array->names[i]);
+ p = snprintf(ptr, rlen, "%s,", array->names[i]);
ptr += p;
+ rlen = rlen - p;
}
/* odds */
for (i = (array->namect - 2); i > 0; i -= 2) {
- p = snprintf(ptr, len, "%s,", array->names[i]);
+ p = snprintf(ptr, rlen, "%s,", array->names[i]);
ptr += p;
+ rlen = rlen - p;
}
dest[strlen(dest) - 1] = '\0';
}
@@ -233,16 +240,19 @@ void reverse_alternating_str(int mynod, int len, ADIO_cb_name_array array, char
void simple_shuffle_str(int mynod, int len, ADIO_cb_name_array array, char *dest)
{
char *ptr;
- int i, p;
+ int i, p, rlen;
if (!mynod) {
ptr = dest;
+ rlen = len;
for (i = (array->namect / 2); i < array->namect; i++) {
- p = snprintf(ptr, len, "%s,", array->names[i]);
+ p = snprintf(ptr, rlen, "%s,", array->names[i]);
ptr += p;
+ rlen = rlen - p;
}
for (i = 0; i < (array->namect / 2); i++) {
- p = snprintf(ptr, len, "%s,", array->names[i]);
+ p = snprintf(ptr, rlen, "%s,", array->names[i]);
ptr += p;
+ rlen = rlen - p;
}
dest[strlen(dest) - 1] = '\0';
}