Accepting request 1199353 from science:HPC

OBS-URL: https://build.opensuse.org/request/show/1199353
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mpiP?expand=0&rev=19
This commit is contained in:
Ana Guerrero 2024-09-09 12:44:02 +00:00 committed by Git OBS Bridge
commit e44f717d15
7 changed files with 304 additions and 32 deletions

View File

@ -1,18 +1,13 @@
From: Egbert Eich <eich@suse.com>
Date: Sun Nov 29 20:38:47 2020 +0100
Subject: Add return value to non-void function
Patch-mainline: Not yet
Git-commit: 98cc1a7453a2f55dfe2477d62e8ce3f049e0ed1f
References:
commit 6130c8260cce49846feafc490f84e9ccf299ac15
Author: Nicolas Morey <nmorey@suse.com>
Date: Thu Sep 5 14:58:20 2024 +0200
Signed-off-by: Egbert Eich <eich@suse.com>
---
testing/mt/mt_common.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/testing/mt/mt_common.c b/testing/mt/mt_common.c
index ff92d9e..bda59c3 100644
--- a/testing/mt/mt_common.c
+++ b/testing/mt/mt_common.c
Add return value to non void function
diff --git testing/mt/mt_common.c testing/mt/mt_common.c
index ff92d9ef8100..bda59c3aab73 100644
--- testing/mt/mt_common.c
+++ testing/mt/mt_common.c
@@ -310,6 +310,7 @@ void* _mt_common_proxy_thread(void *id_ptr)
{
test_thr_data_t *tdata = (test_thr_data_t*)id_ptr;

View File

@ -0,0 +1,170 @@
commit 38967f5106f8c9b813311a24dda42b8d69a07bda
Author: Nicolas Morey <nmorey@suse.com>
Date: Thu Sep 5 15:49:05 2024 +0200
arch: add generic arch using GCC builtins
Signed-off-by: Nicolas Morey <nmorey@suse.com>
diff --git arch/arch.h arch/arch.h
index 54312d483416..eab352557158 100644
--- arch/arch.h
+++ arch/arch.h
@@ -19,6 +19,8 @@
#include "arch/arch_ppc.h"
#elif __aarch64__
#include "arch/arch_arm64.h"
+#else
+#include "arch/arch_generic.h"
#endif
#endif // ARCH_ATOMICS_H
diff --git arch/arch_generic.h arch/arch_generic.h
new file mode 100644
index 000000000000..9b46200b7ee5
--- /dev/null
+++ arch/arch_generic.h
@@ -0,0 +1,143 @@
+#ifndef ARCH_GENERIC_H
+#define ARCH_GENERIC_H
+
+#include <stdint.h>
+#include "mpiPconfig.h"
+
+
+static inline void mpiP_atomic_wmb(void)
+{
+ __atomic_thread_fence (__ATOMIC_RELEASE);
+}
+
+static inline void mpiP_atomic_isync(void)
+{
+}
+
+#if (SIZEOF_VOIDP == 8)
+static inline void *mpiP_atomic_swap(void **_addr, void *_newval)
+{
+ int64_t *addr = (int64_t *)_addr;
+ int64_t newval = (int64_t)_newval;
+ int64_t oldval;
+
+ __atomic_exchange (addr, &newval, &oldval, __ATOMIC_RELAXED);
+ return (void*)oldval;
+}
+
+static inline int mpiP_atomic_cas(void **_addr, void **_oldval, void *_newval)
+{
+ int64_t *addr = (int64_t*)_addr;
+ int64_t *oldval = (int64_t*)_oldval;
+ int64_t newval = (int64_t)_newval;
+
+ return __atomic_compare_exchange_n (addr, oldval, newval, 0, __ATOMIC_ACQUIRE, __ATOMIC_RELAXED);
+}
+
+#else
+
+static inline void *mpiP_atomic_swap(void **_addr, void *_newval)
+{
+ int32_t *addr= (int32_t *)_addr;
+ int32_t newval = (int32_t)_newval;
+ int32_t oldval;
+
+ __atomic_exchange (addr, &newval, &oldval, __ATOMIC_RELAXED);
+ return (void*)oldval;
+}
+
+
+static inline int mpiP_atomic_cas(void **_addr, void **_oldval, void *_newval)
+{
+ int32_t *addr = (int32_t*)_addr;
+ int32_t *oldval = (int32_t*)_oldval;
+ int32_t newval = (int32_t)_newval;
+
+ return __atomic_compare_exchange_n (addr, oldval, newval, 0, __ATOMIC_ACQUIRE, __ATOMIC_RELAXED);
+}
+#endif
+
+#endif
+
+
+/*
+
+<license>
+
+This code was derived from Open MPI OPAL layer.
+
+Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
+ University Research and Technology
+ Corporation. All rights reserved.
+Copyright (c) 2004-2010 The University of Tennessee and The University
+ of Tennessee Research Foundation. All rights
+ reserved.
+Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
+ University of Stuttgart. All rights reserved.
+Copyright (c) 2004-2005 The Regents of the University of California.
+ All rights reserved.
+Copyright (c) 2007 Sun Microsystems, Inc. All rights reserverd.
+Copyright (c) 2012-2018 Los Alamos National Security, LLC. All rights
+ reserved.
+Copyright (c) 2016-2017 Research Organization for Information Science
+ and Technology (RIST). All rights reserved.
+Copyright (c) 2019 Mellanox Technologies Ltd. All rights reserved.
+
+This file is part of mpiP. For details, see http://llnl.github.io/mpiP.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+* Redistributions of source code must retain the above copyright
+notice, this list of conditions and the disclaimer below.
+
+* Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the disclaimer (as noted below) in
+the documentation and/or other materials provided with the
+distribution.
+
+* Neither the name of the UC/LLNL nor the names of its contributors
+may be used to endorse or promote products derived from this software
+without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF
+THE UNIVERSITY OF CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+Additional BSD Notice
+
+1. This notice is required to be provided under our contract with the
+U.S. Department of Energy (DOE). This work was produced at the
+University of California, Lawrence Livermore National Laboratory under
+Contract No. W-7405-ENG-48 with the DOE.
+
+2. Neither the United States Government nor the University of
+California nor any of their employees, makes any warranty, express or
+implied, or assumes any liability or responsibility for the accuracy,
+completeness, or usefulness of any information, apparatus, product, or
+process disclosed, or represents that its use would not infringe
+privately-owned rights.
+
+3. Also, reference herein to any specific commercial products,
+process, or services by trade name, trademark, manufacturer or
+otherwise does not necessarily constitute or imply its endorsement,
+recommendation, or favoring by the United States Government or the
+University of California. The views and opinions of authors expressed
+herein do not necessarily state or reflect those of the United States
+Government or the University of California, and shall not be used for
+advertising or product endorsement purposes.
+
+</license>
+
+*/

View File

@ -0,0 +1,83 @@
commit fc27164f950ff572b9b86cd6c9df701e08a363ad
Author: Nicolas Morey <nmorey@suse.com>
Date: Thu Sep 5 14:54:19 2024 +0200
configure: fix compilation error for GCC >= 14
Signed-off-by: Nicolas Morey <nmorey@suse.com>
diff --git configure configure
index 240487dae777..25352125f048 100755
--- configure
+++ configure
@@ -6210,28 +6210,28 @@ $as_echo "Failed to compile fortran test object. Example error follows:" >&6; }
$as_echo "$as_me: $F77_OBJ_OUT" >&6;}
as_fn_error $? "giving up" "$LINENO" 5
fi
- echo "main(){ FF(); return 0; }" > flink.c
- if $CC -o flink -DFF=f_fun flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
+ echo "int main(){ FF(); return 0; }" > flink.c
+ if $CC -o flink -DFF=f_fun -Wno-implicit-function-declaration flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: same as C" >&5
$as_echo "same as C" >&6; }
F77_SYMBOLS=symbol
- elif $CC -o flink -DFF=f_fun_ flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
+ elif $CC -o flink -DFF=f_fun_ -Wno-implicit-function-declaration flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: lowercase with underscore" >&5
$as_echo "lowercase with underscore" >&6; }
F77_SYMBOLS=symbol_
- elif $CC -o flink -DFF=f_fun__ flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
+ elif $CC -o flink -DFF=f_fun__ -Wno-implicit-function-declaration flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: lowercase with 2 underscores" >&5
$as_echo "lowercase with 2 underscores" >&6; }
F77_SYMBOLS=symbol__
- elif $CC -o flink -DFF=F_FUN flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
+ elif $CC -o flink -DFF=F_FUN -Wno-implicit-function-declaration flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: uppercase" >&5
$as_echo "uppercase" >&6; }
F77_SYMBOLS=SYMBOL
- elif $CC -o flink -DFF=F_FUN_ flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
+ elif $CC -o flink -DFF=F_FUN_ -Wno-implicit-function-declaration flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: uppercase with underscore" >&5
$as_echo "uppercase with underscore" >&6; }
F77_SYMBOLS=SYMBOL_
- elif $CC -o flink -DFF=F_FUN_ flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
+ elif $CC -o flink -DFF=F_FUN_ -Wno-implicit-function-declaration flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: uppercase with 2 underscores" >&5
$as_echo "uppercase with 2 underscores" >&6; }
F77_SYMBOLS=SYMBOL__
diff --git configure.ac configure.ac
index 359b31a119d4..ed6cdbb3c18e 100644
--- configure.ac
+++ configure.ac
@@ -702,23 +702,23 @@ if test -n "$F77" -a "$F77" != no ; then
AC_MSG_NOTICE($F77_OBJ_OUT)
AC_MSG_ERROR([giving up])
fi
- echo "main(){ FF(); return 0; }" > flink.c
- if $CC -o flink -DFF=f_fun flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
+ echo "int main(){ FF(); return 0; }" > flink.c
+ if $CC -o flink -DFF=f_fun -Wno-implicit-function-declaration flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
AC_MSG_RESULT(same as C)
F77_SYMBOLS=symbol
- elif $CC -o flink -DFF=f_fun_ flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
+ elif $CC -o flink -DFF=f_fun_ -Wno-implicit-function-declaration flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
AC_MSG_RESULT(lowercase with underscore)
F77_SYMBOLS=symbol_
- elif $CC -o flink -DFF=f_fun__ flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
+ elif $CC -o flink -DFF=f_fun__ -Wno-implicit-function-declaration flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
AC_MSG_RESULT(lowercase with 2 underscores)
F77_SYMBOLS=symbol__
- elif $CC -o flink -DFF=F_FUN flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
+ elif $CC -o flink -DFF=F_FUN -Wno-implicit-function-declaration flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
AC_MSG_RESULT(uppercase)
F77_SYMBOLS=SYMBOL
- elif $CC -o flink -DFF=F_FUN_ flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
+ elif $CC -o flink -DFF=F_FUN_ -Wno-implicit-function-declaration flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
AC_MSG_RESULT(uppercase with underscore)
F77_SYMBOLS=SYMBOL_
- elif $CC -o flink -DFF=F_FUN_ flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
+ elif $CC -o flink -DFF=F_FUN_ -Wno-implicit-function-declaration flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
AC_MSG_RESULT(uppercase with 2 underscores)
F77_SYMBOLS=SYMBOL__
else

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Thu Sep 5 13:11:56 UTC 2024 - Nicolas Morey <nicolas.morey@suse.com>
- Refresh patched to git format
- mpip.unwinder.patch
- Add-return-value-to-non-void-function.patch
- pc_lookup-replace-PTR-with-void.patch
- Add configure-fix-compilation-error-for-GCC-14.patch to
fix compilation with GCC >= 14
- Add arch-add-generic-arch-using-GCC-builtins.patch to fix compilation
on s390.
-------------------------------------------------------------------
Tue Jun 25 13:17:50 UTC 2024 - Nicolas Morey <nicolas.morey@suse.com>

View File

@ -186,6 +186,8 @@ Source0: https://github.com/LLNL/mpiP/releases/download/%{version}/mpip-%
Patch1: mpip.unwinder.patch
Patch2: Add-return-value-to-non-void-function.patch
Patch3: pc_lookup-replace-PTR-with-void.patch
Patch4: configure-fix-compilation-error-for-GCC-14.patch
Patch5: arch-add-generic-arch-using-GCC-builtins.patch
BuildRequires: %{compiler_family}%{?c_f_ver}-compilers-hpc-macros-devel
BuildRequires: %{mpi_family}%{?mpi_ver}-%{compiler_family}%{?c_f_ver}-hpc-macros-devel
BuildRequires: binutils-devel
@ -246,7 +248,7 @@ This contains the documentation.
%prep
%setup -q -n %{pname}-%{version}
%autopatch -p1
%autopatch -p0
sed -i -e "/-shared -o \$@/s#\(\${LDFLAGS}\)#\1 -Wl,-soname,\$@#" Makefile.in
%build

View File

@ -1,7 +1,16 @@
diff -ruN mpiP-3.4.1.old/Defs.mak.in mpiP-3.4.1/Defs.mak.in
--- mpiP-3.4.1.old/Defs.mak.in 2014-03-13 19:46:07.000000000 +0000
+++ mpiP-3.4.1/Defs.mak.in 2017-01-10 07:51:53.771837043 +0000
@@ -63,6 +63,9 @@
commit ca14b75af545536ca04cc5a1fb19b77b3e213fe4
Author: Nicolas Morey <nmorey@suse.com>
Date: Thu Sep 5 14:57:46 2024 +0200
mpip.unwinder
Aarch64 support
diff --git Defs.mak.in Defs.mak.in
index 7406eb610d7f..c3b231798d5f 100644
--- Defs.mak.in
+++ Defs.mak.in
@@ -64,6 +64,9 @@ ifeq ($(OS),OSF1)
endif
ifeq ($(OS),Linux)
@ -11,10 +20,11 @@ diff -ruN mpiP-3.4.1.old/Defs.mak.in mpiP-3.4.1/Defs.mak.in
ifeq ($(ARCH),i686)
CPPFLAGS += -DIA32
endif
diff -ruN mpiP-3.4.1.old/mpiPi.h.in mpiP-3.4.1/mpiPi.h.in
--- mpiP-3.4.1.old/mpiPi.h 2014-03-13 19:46:07.000000000 +0000
+++ mpiP-3.4.1/mpiPi.h 2017-01-10 07:52:48.783447707 +0000
@@ -276,6 +276,12 @@
diff --git mpiPi.h mpiPi.h
index 56ce5bd338eb..0b602e31c813 100644
--- mpiPi.h
+++ mpiPi.h
@@ -231,6 +231,12 @@ extern void *MPIR_ToPointer (int idx);
#define FramePC(fp) ((void *) *(long *) (((long) fp) + (2 * sizeof (void *))))
#define NextFP(fp) ((void *) *(long *) fp)

View File

@ -1,17 +1,17 @@
commit 168e28672992f4c725046b91fda0ffada6ccf842
Author: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
Date: Mon Oct 17 09:59:01 2022 +0200
commit 21d336356fcf152e832a17dfe4204699faf39013
Author: Nicolas Morey <nmorey@suse.com>
Date: Thu Sep 5 14:58:58 2024 +0200
pc_lookup: replace PTR with void*
pc_lookup: replace PTR with void
PTR is not available in newer glibc versions
Fixes compilation issues with newer glibc
Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
Signed-off-by: Nicolas Morey <nmorey@suse.com>
diff --git a/pc_lookup.c b/pc_lookup.c
diff --git pc_lookup.c pc_lookup.c
index 4c595645813a..4c2a1a30e693 100644
--- a/pc_lookup.c
+++ b/pc_lookup.c
--- pc_lookup.c
+++ pc_lookup.c
@@ -115,7 +115,7 @@ static void
find_address_in_section (abfd, section, data)
bfd *abfd;