Sync from SUSE:SLFO:Main openmpi4 revision 7dc595a1565b4d55ec46517f8cb29115

This commit is contained in:
Adrian Schröter 2024-10-11 10:05:51 +02:00
parent 9fea8fc8af
commit c241856083
4 changed files with 205 additions and 4 deletions

96
openmpi4-C99.diff Normal file
View File

@ -0,0 +1,96 @@
--- ./opal/mca/pmix/pmix3x/pmix/src/hwloc/hwloc.c~ 2023-09-25 20:20:09.000000000 +0000
+++ ./opal/mca/pmix/pmix3x/pmix/src/hwloc/hwloc.c 2024-07-29 16:12:38.161908410 +0000
@@ -48,7 +48,7 @@
#if HWLOC_API_VERSION >= 0x20000
static size_t shmemsize = 0;
-static size_t shmemaddr;
+static uintptr_t shmemaddr;
static char *shmemfile = NULL;
static int shmemfd = -1;
@@ -58,10 +58,10 @@
pmix_hwloc_vm_map_kind_t *kindp);
static int use_hole(unsigned long holebegin,
unsigned long holesize,
- unsigned long *addrp,
+ uintptr_t *addrp,
unsigned long size);
static int find_hole(pmix_hwloc_vm_hole_kind_t hkind,
- size_t *addrp,
+ uintptr_t *addrp,
size_t size);
static int enough_space(const char *filename,
size_t space_req,
@@ -584,7 +584,7 @@
static int use_hole(unsigned long holebegin,
unsigned long holesize,
- unsigned long *addrp,
+ uintptr_t *addrp,
unsigned long size)
{
unsigned long aligned;
@@ -615,7 +615,7 @@
}
static int find_hole(pmix_hwloc_vm_hole_kind_t hkind,
- size_t *addrp, size_t size)
+ uintptr_t *addrp, size_t size)
{
unsigned long biggestbegin = 0;
unsigned long biggestsize = 0;
--- ./orte/mca/rtc/hwloc/rtc_hwloc.c~ 2023-09-25 20:20:09.000000000 +0000
+++ ./orte/mca/rtc/hwloc/rtc_hwloc.c 2024-07-26 16:29:16.763923042 +0000
@@ -67,7 +67,7 @@
#if HWLOC_API_VERSION >= 0x20000
static size_t shmemsize = 0;
-static size_t shmemaddr;
+static uintptr_t shmemaddr;
static char *shmemfile = NULL;
static int shmemfd = -1;
@@ -77,10 +77,10 @@
orte_rtc_hwloc_vm_map_kind_t *kindp);
static int use_hole(unsigned long holebegin,
unsigned long holesize,
- unsigned long *addrp,
+ uintptr_t *addrp,
unsigned long size);
static int find_hole(orte_rtc_hwloc_vm_hole_kind_t hkind,
- size_t *addrp,
+ uintptr_t *addrp,
size_t size);
static int enough_space(const char *filename,
size_t space_req,
@@ -524,7 +524,7 @@
static int use_hole(unsigned long holebegin,
unsigned long holesize,
- unsigned long *addrp,
+ uintptr_t *addrp,
unsigned long size)
{
unsigned long aligned;
@@ -576,7 +576,7 @@
}
static int find_hole(orte_rtc_hwloc_vm_hole_kind_t hkind,
- size_t *addrp, size_t size)
+ uintptr_t *addrp, size_t size)
{
unsigned long biggestbegin = 0;
unsigned long biggestsize = 0;
--- ./ompi/mca/io/romio321/romio/adio/include/adio.h~ 2023-09-25 20:20:09.000000000 +0000
+++ ./ompi/mca/io/romio321/romio/adio/include/adio.h 2024-07-29 15:40:10.597565427 +0000
@@ -97,6 +97,9 @@
#ifdef MPI_OFFSET_IS_INT
typedef int ADIO_Offset;
# define ADIO_OFFSET MPI_INT
+#elif __SIZEOF_SIZE_T__ == 4
+ typedef long ADIO_Offset;
+# define ADIO_OFFSET MPI_LONG
#elif defined(HAVE_LONG_LONG_64)
typedef long long ADIO_Offset;
# ifdef HAVE_MPI_LONG_LONG_INT

View File

@ -1,3 +1,27 @@
-------------------------------------------------------------------
Thu Sep 5 06:58:41 UTC 2024 - Nicolas Morey <nicolas.morey@suse.com>
- Add test-datatype-partial.c-fix-compiler-warnings.patch to fix
testuite compilation with GCC >= 14
-------------------------------------------------------------------
Mon Jul 29 16:40:16 UTC 2024 - Martin Jambor <mjambor@suse.com>
- Add openmpi4-C99.diff to fix the most egregious type violations that
not only prevent building the standard flavor with GCC 14 opn i586
but that are just bugs too.
-------------------------------------------------------------------
Tue Jun 25 13:24:03 UTC 2024 - Nicolas Morey <nicolas.morey@suse.com>
- Disable 32b builds of hpc flavours
-------------------------------------------------------------------
Mon Feb 26 12:47:01 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Use %autosetup macro. Allows to eliminate the usage of deprecated
PatchN.
-------------------------------------------------------------------
Tue Oct 10 09:44:40 UTC 2023 - Nicolas Morey <nicolas.morey@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
@ -118,6 +118,7 @@ ExclusiveArch: do_not_build
%global hpc_openmpi_pack_version %{hpc_openmpi_dep_version}
%{bcond_without pmix}
%{bcond_without hwloc}
ExcludeArch: i586 %arm s390
%else
%{bcond_with pmix}
%{bcond_with hwloc}
@ -145,6 +146,8 @@ Source4: mpivars.sh
Source5: mpivars.csh
Patch1: orted-mpir-add-version-to-shared-library.patch
Patch2: btl-openib-Add-VF-support-for-ConnectX-4-5-and-6.patch
Patch3: openmpi4-C99.diff
Patch4: test-datatype-partial.c-fix-compiler-warnings.patch
Provides: mpi
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf
@ -412,9 +415,7 @@ echo with HPC
%if %{without hpc}
echo without HPC
%endif
%setup -q -n openmpi-%{version}%{git_ver}
%patch1
%patch2
%autosetup -p0 -n openmpi-%{version}%{git_ver}
%if %{without hpc}
cat > %{_sourcedir}/baselibs.conf <<EOF

View File

@ -0,0 +1,80 @@
commit e74008f6c67c104f1eb59c488e2c22c0302c87e0
Author: Jeff Squyres <jsquyres@cisco.com>
Date: Fri Nov 18 06:50:24 2022 -0500
test/datatype/partial.c: fix compiler warnings
There are a bunch of other warnings in tests, but I was recently
working with a user in this specific test, and the warnings annoyed
me. So I fixed them in this test (but not other tests).
Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
(cherry picked from commit 98abc08a6e2a0a4181a823c1b81a238964710240)
diff --git test/datatype/partial.c test/datatype/partial.c
index c064db7193dd..15ea0cad7800 100644
--- test/datatype/partial.c
+++ test/datatype/partial.c
@@ -5,6 +5,7 @@
* reserved.
* Copyright (c) 2018 Triad National Security, LLC. All rights
* reserved.
+ * Copyright (c) 2022 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@@ -52,7 +53,7 @@ static void show_neighborhood(double* ptr, int how_many, bool show_hex)
printf("\n : ");
for( i = -how_many; i < how_many; i++ ) {
if( 0 == i ) printf(" <");
- for( int j = 0; j < sizeof(double); j++ ) {
+ for( size_t j = 0; j < sizeof(double); j++ ) {
printf("%02x", cptr[i * sizeof(double)+j]);
}
if( 0 == i ) printf("> ");
@@ -71,7 +72,7 @@ static void show_neighborhood(double* ptr, int how_many, bool show_hex)
int main( int argc, char* argv[] )
{
- opal_datatype_t* vector;
+ ompi_datatype_t* vector;
ompi_datatype_t* base;
uint32_t iov_count;
size_t max_data, size, length;
@@ -88,13 +89,13 @@ int main( int argc, char* argv[] )
ompi_datatype_create_vector(TYPE_COUNT, TYPE_BLEN, TYPE_STRIDE, MPI_DOUBLE, &base);
ompi_datatype_create_contiguous(CONT_COUNT, base, &vector);
- opal_datatype_commit( vector );
+ opal_datatype_commit(&vector->super);
ompi_datatype_dump(vector);
- opal_datatype_type_size(vector, &size);
- opal_datatype_type_extent(vector, &extent);
- opal_datatype_type_extent(base, &base_extent);
+ opal_datatype_type_size(&vector->super, &size);
+ opal_datatype_type_extent(&vector->super, &extent);
+ opal_datatype_type_extent(&base->super, &base_extent);
array = (double*)malloc( extent * COUNT );
packed = (double*)malloc( size * COUNT );
@@ -113,7 +114,7 @@ int main( int argc, char* argv[] )
* of the buffered operation.
*/
convertor = opal_convertor_create( opal_local_arch, 0 );
- opal_convertor_prepare_for_recv( convertor, vector, COUNT, array );
+ opal_convertor_prepare_for_recv(convertor, &vector->super, COUNT, array);
for( length = 0; length < (size * COUNT); ) {
iov[0].iov_base = bpacked + length;
@@ -124,7 +125,8 @@ int main( int argc, char* argv[] )
opal_convertor_unpack( convertor, iov, &iov_count, &max_data );
length += max_data;
- int idx = 0, checked = 0;
+ int idx = 0;
+ size_t checked = 0;
for( int m = 0; m < COUNT; m++ ) {
char* mptr = (char*)array + m * extent;
for( int k = 0; k < CONT_COUNT; k++ ) {