forked from pool/openmpi4
Accepting request 1198895 from science:HPC
OBS-URL: https://build.opensuse.org/request/show/1198895 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/openmpi4?expand=0&rev=16
This commit is contained in:
commit
8089a64423
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
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>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file for package openmpi4
|
||||
# spec file
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
@ -147,6 +147,7 @@ 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
|
||||
@ -183,7 +184,7 @@ BuildRequires: gcc-c++
|
||||
BuildRequires: gcc-fortran
|
||||
BuildRequires: mpi-selector
|
||||
Requires: mpi-selector
|
||||
Requires(preun): mpi-selector
|
||||
Requires(preun):mpi-selector
|
||||
Requires: %{package_name}-libs = %{version}
|
||||
%else
|
||||
BuildRequires: %{compiler_family}%{?c_f_ver}-compilers-hpc-macros-devel
|
||||
|
80
test-datatype-partial.c-fix-compiler-warnings.patch
Normal file
80
test-datatype-partial.c-fix-compiler-warnings.patch
Normal 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++ ) {
|
Loading…
Reference in New Issue
Block a user