SHA256
1
0
forked from pool/mpiP

- 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.

OBS-URL: https://build.opensuse.org/package/show/science:HPC/mpiP?expand=0&rev=48
This commit is contained in:
Nicolas Morey 2024-09-07 11:25:34 +00:00 committed by Git OBS Bridge
commit cb3490f2be
11 changed files with 922 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,18 @@
commit 6130c8260cce49846feafc490f84e9ccf299ac15
Author: Nicolas Morey <nmorey@suse.com>
Date: Thu Sep 5 14:58:20 2024 +0200
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;
tdata->fptr(tdata->tid);
+ return NULL;
}
void mt_common_exec(mt_common_thrptr_t *workers)

5
_multibuild Normal file
View File

@ -0,0 +1,5 @@
<multibuild>
<package>gnu-openmpi4-hpc</package>
<package>gnu-mvapich2-hpc</package>
<package>gnu-mpich-hpc</package>
</multibuild>

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

3
mpiP-3.5.tgz Normal file
View File

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

192
mpiP.changes Normal file
View File

@ -0,0 +1,192 @@
-------------------------------------------------------------------
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>
- Do not build on 32b platforms
-------------------------------------------------------------------
Fri Oct 20 10:25:56 UTC 2023 - Nicolas Morey <nicolas.morey@suse.com>
- Drop support for openmpi[123] (jsc#PED-7111)
- Prepare support for openmpi5
-------------------------------------------------------------------
Tue Oct 10 09:40:37 UTC 2023 - Nicolas Morey <nicolas.morey@suse.com>
- Drop %vers macro so that the Version tag can be parsed more easily
-------------------------------------------------------------------
Mon Oct 24 06:45:37 UTC 2022 - Steve Kowalik <steven.kowalik@suse.com>
- Use Python 3 instead of Python 2 to build.
-------------------------------------------------------------------
Mon Oct 17 08:09:09 UTC 2022 - Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
- Added pc_lookup-replace-PTR-with-void.patch to fix compilation
on newer glibc.
-------------------------------------------------------------------
Sat Nov 28 11:49:04 UTC 2020 - Egbert Eich <eich@suse.com>
- Update to mpiP version 3.5
* Update deprecated functions.
* Fix ARM typo and add LSE configure test.
* Correct pt2pt histogram reporting check.
* Address compiler warnings for some mt function return types.
* Correct build behavior for testing multi-threaded support
with Spectrum MPI.
* Missing function argument entry.
* Additional I/O routines
* currBasetype fix
* Update to test suite to include multi-threaded tests
* Followup for renaming wrappers.c to mpiP-wrappers.c
* Include mpiP in wrappers file name for call site reporting
* Clarify stack tracing behavior
* Correct autoheader error with HAVE_BFD_GET_SECTION_MACROS.
Make define behavior consistent.
* Convenience functionality to avoid SMPI libmpiP
* Arch files corrections for gcc and opal code.
* update to work with binutils-2.34
* Fixed report header printing bug with large argument counts.
* fix make-wrappers.py indentation and make python 2 and 3 compatible
* Re-organized sizeof test to avoid CC defaulting to gcc.
Re-organized default compilers.
* Add Multi-Threading (MT) test suite
* Fix FORTRAN Bindings: properly handle strings
* Fix the code accounting the application time
* Fix TLS cleanup code
* Fix MT timings
* Refine statistics reset procedure
* Reduce the number of TLS accesses
* First cut on multi-threading
* Extract callsite code to a separate module
* Move nested call check down the stack
* Introduce additional statistics layer
* First step towards MT support
* Refactor global state: remove unneeded component
* Preliminary step for adding multi-threaded support
* Configury change: introduce mpiP-state.[c|h] files
* Get rid of mpiPi.h.in file as unneeded
* Adding autoconf PACKAGE defines to address current bfd.h
requirement.
* Fix mpi.h includes in some of the tests
* Indentation fixes only. No actual changes.
* Change default stack frame unwinding count.
* Remove functions deprecated since MPI-2.0
* Avoid LD_PRELOAD symbol conflict between srun and libiberty.
* Create README.md
* Corrected type issues resulting in compiler warnings in the
test suite.
* Make PC modification conditional. (Removed for now.)
* Adding additional RMA functions to cover all MPI3.1 RMA
functions. Expanded test coverage.
* Added MPI3 One-sided operation support, from changes by Jeff Hammond.
* Additional github migration.
* Adding README.md
* Added support for non-blocking collectives.
* Provide non-NULL error argument for dwarf calls.
Remove call to elf_end. Ignore compile units with no
function information, rather than abort.
* Reduce unnecessary debugging output.
* Add count column to top time section.
* Adding fortran symbol failure output for debugging configure issues.
- Add build support for gcc10 to HPC build (bsc#1174439).
- Add openmpi4 flavors.
- Add: Add-return-value-to-non-void-function.patch
Preliminary %check stage. A number of checks fail currently.
These need to be looked at.
-------------------------------------------------------------------
Wed May 13 19:38:31 UTC 2020 - Egbert Eich <eich@suse.com>
- Enable openmpi3 build for all SLE versions.
-------------------------------------------------------------------
Fri Nov 29 19:42:39 UTC 2019 - Egbert Eich <eich@suse.com>
- Add missing openmpi2 build for gcc7.
- Add support for gcc8 and gcc9 (jsc#SLE-7766 & jsc#SLE-8604).
- Include mpiP wrapper scripts for mpirun and Slurm srun.
- Package API.
-------------------------------------------------------------------
Thu Nov 28 16:03:47 UTC 2019 - Egbert Eich <eich@suse.com>
- Disable openmpi1 builds for SLE/Leap > 15.1.
- Enable openmpi3 builds for Leap and SLE > 15.1 (jsc#SLE-7773).
-------------------------------------------------------------------
Thu Sep 26 09:40:42 UTC 2019 - Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
- Fix LTO support in archive files
-------------------------------------------------------------------
Fri Mar 2 15:14:08 UTC 2018 - cgoll@suse.com
- created version independent doc package
-------------------------------------------------------------------
Fri Feb 9 19:25:11 UTC 2018 - eich@suse.com
- Add support for openmpi2 for HPC (FATE#325089).
-------------------------------------------------------------------
Fri Feb 9 15:33:26 UTC 2018 - eich@suse.com
- Fix summary in module files (bnc#1080259).
-------------------------------------------------------------------
Fri Jan 12 15:37:28 UTC 2018 - eich@suse.com
- Disable the openmpi3 flavor in some products.
-------------------------------------------------------------------
Fri Jan 5 19:00:01 UTC 2018 - eich@suse.com
- Add gcc7 as additional compiler flavor for HPC on SLES.
- Add support for mpich and openmpi3 for HPC.
-------------------------------------------------------------------
Mon Nov 13 12:43:33 UTC 2017 - eich@suse.com
- Require HPC devel packages.
-------------------------------------------------------------------
Sun Nov 12 12:07:35 UTC 2017 - eich@suse.com
- Fix environment module file.
-------------------------------------------------------------------
Fri Oct 20 07:51:00 UTC 2017 - eich@suse.com
- Enable the openmpi build since the HPC build for openmpi
is now available in Factory.
-------------------------------------------------------------------
Fri Oct 13 11:20:18 UTC 2017 - jengelh@inai.de
- Ensure neutrality of descriptions and trim subpackages.
-------------------------------------------------------------------
Fri Oct 13 10:07:40 UTC 2017 - eich@suse.com
- Fix permissions in the doc and static package.
-------------------------------------------------------------------
Fri Sep 1 16:00:04 UTC 2017 - eich@suse.com
- Initial package creation (FATE#321721).
- mpip.unwinder.patch:
Fix AARCH64.

347
mpiP.spec Normal file
View File

@ -0,0 +1,347 @@
#
# spec file
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global flavor @BUILD_FLAVOR@%{nil}
%define pname mpiP
%define _vers 3_5
%if 0%{?sle_version} >= 150200
%define DisOMPI1 ExclusiveArch: do_not_build
%endif
%if 0%{?sle_version} >= 150300
%define DisOMPI2 ExclusiveArch: do_not_build
%endif
%if "%flavor" == ""
ExclusiveArch: do_not_build
%endif
%if "%{flavor}" == "gnu-openmpi4-hpc"
%{?DisOMPI4}
%global compiler_family gnu
%undefine c_f_ver
%define mpi_family openmpi
%define mpi_ver 4
%endif
%if "%{flavor}" == "gnu-openmpi5-hpc"
%{?DisOMPI5}
%global compiler_family gnu
%undefine c_f_ver
%define mpi_family openmpi
%define mpi_ver 5
%endif
%if "%{flavor}" == "gnu-mvapich2-hpc"
%global compiler_family gnu
%undefine c_f_ver
%define mpi_family mvapich2
%endif
%if "%{flavor}" == "gnu-mpich-hpc"
%global compiler_family gnu
%undefine c_f_ver
%define mpi_family mpich
%endif
%if "%{flavor}" == "gnu7-openmpi4-hpc"
%{?DisOMPI4}
%global compiler_family gnu
%define c_f_ver 7
%define mpi_family openmpi
%define mpi_ver 4
%endif
%if "%{flavor}" == "gnu7-openmpi5-hpc"
%{?DisOMPI5}
%global compiler_family gnu
%define c_f_ver 7
%define mpi_family openmpi
%define mpi_ver 5
%endif
%if "%{flavor}" == "gnu7-mvapich2-hpc"
%global compiler_family gnu
%define c_f_ver 7
%define mpi_family mvapich2
%endif
%if "%{flavor}" == "gnu7-mpich-hpc"
%global compiler_family gnu
%define c_f_ver 7
%define mpi_family mpich
%endif
%if "%{flavor}" == "gnu8-openmpi4-hpc"
%{?DisOMPI4}
%global compiler_family gnu
%define c_f_ver 8
%define mpi_family openmpi
%define mpi_ver 4
%endif
%if "%{flavor}" == "gnu8-openmpi5-hpc"
%{?DisOMPI5}
%global compiler_family gnu
%define c_f_ver 8
%define mpi_family openmpi
%define mpi_ver 5
%endif
%if "%{flavor}" == "gnu8-mvapich2-hpc"
%global compiler_family gnu
%define c_f_ver 8
%define mpi_family mvapich2
%endif
%if "%{flavor}" == "gnu8-mpich-hpc"
%global compiler_family gnu
%define c_f_ver 8
%define mpi_family mpich
%endif
%if "%{flavor}" == "gnu9-openmpi4-hpc"
%{?DisOMPI4}
%global compiler_family gnu
%define c_f_ver 9
%define mpi_family openmpi
%define mpi_ver 4
%endif
%if "%{flavor}" == "gnu9-openmpi5-hpc"
%{?DisOMPI5}
%global compiler_family gnu
%define c_f_ver 9
%define mpi_family openmpi
%define mpi_ver 5
%endif
%if "%{flavor}" == "gnu9-mvapich2-hpc"
%global compiler_family gnu
%define c_f_ver 9
%define mpi_family mvapich2
%endif
%if "%{flavor}" == "gnu9-mpich-hpc"
%global compiler_family gnu
%define c_f_ver 9
%define mpi_family mpich
%endif
%if "%{flavor}" == "gnu10-openmpi4-hpc"
%{?DisOMPI4}
%global compiler_family gnu
%define c_f_ver 10
%define mpi_family openmpi
%define mpi_ver 4
%endif
%if "%{flavor}" == "gnu10-openmpi5-hpc"
%{?DisOMPI5}
%global compiler_family gnu
%define c_f_ver 10
%define mpi_family openmpi
%define mpi_ver 5
%endif
%if "%{flavor}" == "gnu10-mvapich2-hpc"
%global compiler_family gnu
%define c_f_ver 10
%define mpi_family mvapich2
%endif
%if "%{flavor}" == "gnu10-mpich-hpc"
%global compiler_family gnu
%define c_f_ver 10
%define mpi_family mpich
%endif
%{?hpc_init:%{hpc_init -c %compiler_family -m %mpi_family %{?c_f_ver:-v %{c_f_ver}} %{?mpi_ver:-V %{mpi_ver}} %{?ext:-e %{ext}}}}
Name: %{?hpc_package_name:%{hpc_package_name %_vers}}%{!?hpc_package_name:%pname}
Summary: A profiling library for MPI applications
License: BSD-3-Clause
Group: Development/Tools/Debuggers
Version: 3.5
Release: 0
ExcludeArch: i586 %arm s390
URL: https://github.com/LLNL/mpiP
Source0: https://github.com/LLNL/mpiP/releases/download/%{version}/mpip-%{version}.tgz#/%{pname}-%{version}.tgz
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
BuildRequires: dejagnu
BuildRequires: libunwind-devel
BuildRequires: lua-lmod
BuildRequires: python3
#BuildRequires: slurm-node
BuildRequires: suse-hpc
%{?hpc_requires}
%description
mpiP is a profiling library for MPI applications.
It only collects statistical information about MPI functions, so mpiP
generates less overhead and much less data than tracing
tools. All the information captured by mpiP is task-local. It only
uses communication during report generation, typically at the end of
the experiment, to merge results from all of the tasks into one output
file.
%{hpc_master_package -L}
%package devel
Summary: Headers for profiling library for MPI applications
Group: Development/Libraries/C and C++
%{?hpc_requires_devel}
%description devel
mpiP is a profiling library for MPI applications. This packages contains
the build headers.
%{hpc_master_package devel}
%package devel-static
Summary: Static version of profiling library for MPI applications
Group: Development/Libraries/C and C++
%{?hpc_requires_devel}
%description devel-static
mpiP is a profiling library for MPI applications.
This package contains the static libraries.
%package doc
Summary: Documentation for the mpiP profiling library
Group: Documentation/Other
%description doc
mpiP is a profiling library for MPI applications.
This contains the documentation.
%{hpc_master_package doc}
%if "%(echo %version | tr '.' '_')" != "%_vers"
%{error: Fix _vers variable to match package version!}
%endif
%prep
%setup -q -n %{pname}-%{version}
%autopatch -p0
sed -i -e "/-shared -o \$@/s#\(\${LDFLAGS}\)#\1 -Wl,-soname,\$@#" Makefile.in
%build
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
%hpc_setup
export CC=mpicc
export CXX=mpicxx
export FC=mpifort
export F77=$FC
export CFLAGS="-D__DATE__=\\\"NODATE\\\" -D__TIME__=\\\"NOTIME\\\""
export FFLAGS="-std=legacy"
export HAVE_PYTHON="python3"
%hpc_configure \
--enable-demangling \
%ifarch aarch64
--enable-setjmp \
%endif
--docdir=%{_docdir}/%{name}
make %{?_smp_mflags} PYTHON="python3" shared
%install
%hpc_setup
make install-all DESTDIR=%{?buildroot}
find "%{buildroot}" -type f -name "*.a" -exec chmod a-x {} +
find "%{buildroot}/%{_docdir}" -type f -exec chmod a-x {} +
find "%{buildroot}/%{hpc_includedir}" -type f -exec chmod a-x {} +
%{hpc_shebang_sanitize_scripts %{buildroot}%{hpc_bindir}}
for i in mpirun-mpip srun-mpip; do
sed -i \
-e "s@\(MPIP_DIR=\).*@\1%{?hpc_prefix}@" \
-e "s@\(LD_PRELOAD=\).*:\(.*\)@\1\2@" \
-e "s@\(ADDTL_RT_LIBS=.*\)@#\1@" \
-e "s@/lib/libmpiP.so@/%{_lib}/libmpiP.so@" %{buildroot}%{hpc_bindir}/$i
done
%hpc_write_modules_files
#%%Module1.0#####################################################################
proc ModulesHelp { } {
puts stderr " "
puts stderr "This module loads the %{pname} library built with the %{compiler_family} compiler"
puts stderr "toolchain and the %{mpi_family} MPI stack."
puts stderr "\nVersion %{version}\n"
}
module-whatis "Name: %{pname} built with %{compiler_family} compiler and %{mpi_family} MPI"
module-whatis "Version: %{version}"
module-whatis "Category: Profiling library"
module-whatis "Description: %{SUMMARY:0}"
module-whatis "URL %{url}"
set version %{version}
prepend-path PATH %{hpc_bindir}
prepend-path LD_LIBRARY_PATH %{hpc_libdir}
if {[file isdirectory %{hpc_includedir}]} {
prepend-path C_INCLUDE_PATH %{hpc_includedir}
prepend-path INCLUDE %{hpc_includedir}
}
setenv %{hpc_upcase %pname}_DIR %{hpc_prefix}
setenv %{hpc_upcase %pname}_LIB %{hpc_libdir}
EOF
%check
%hpc_setup
export CC=mpicc
export CXX=mpicxx
export FC=mpifort
export F77=$FC
export FFLAGS="-std=legacy"
LD_LIBRARY_PATH=$(pwd)${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
make FFLAGS+=${FFLAGS} check || exit 0
%postun
%hpc_module_delete_if_default
%files
%{hpc_dirs}
%{hpc_modules_files}
%{hpc_libdir}/*so
%{hpc_bindir}
%files doc
%{_docdir}/%{name}/
%files devel
%{hpc_includedir}
%files devel-static
%{hpc_libdir}/*.a
%changelog

39
mpip.unwinder.patch Normal file
View File

@ -0,0 +1,39 @@
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)
+ ifeq ($(ARCH), aarch64)
+ CPPFLAGS += -DAARCH64
+ endif
ifeq ($(ARCH),i686)
CPPFLAGS += -DIA32
endif
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)
+/* AArch64 Linux */
+#elif defined(Linux) && defined(AARCH64)
+#define ParentFP(jb) ((void*) jb[0].__jmpbuf[10])
+#define FramePC(fp) ((void*)(((void**)fp)[1]))
+#define NextFP(fp) ((void*)((void**)fp)[0])
+
/* IA32 Linux */
#elif defined(Linux) && defined(IA32)
#define ParentFP(jb) ((void*) jb[0].__jmpbuf[3])

View File

@ -0,0 +1,41 @@
commit 21d336356fcf152e832a17dfe4204699faf39013
Author: Nicolas Morey <nmorey@suse.com>
Date: Thu Sep 5 14:58:58 2024 +0200
pc_lookup: replace PTR with void
Fixes compilation issues with newer glibc
Signed-off-by: Nicolas Morey <nmorey@suse.com>
diff --git pc_lookup.c pc_lookup.c
index 4c595645813a..4c2a1a30e693 100644
--- pc_lookup.c
+++ pc_lookup.c
@@ -115,7 +115,7 @@ static void
find_address_in_section (abfd, section, data)
bfd *abfd;
asection *section;
- PTR data;
+ void* data;
{
bfd_vma vma;
bfd_size_type size;
@@ -435,7 +435,7 @@ mpiP_find_src_loc (void *i_addr_hex, char **o_file_str, int *o_lineno,
found = FALSE;
- bfd_map_over_sections (abfd, find_address_in_section, (PTR) NULL);
+ bfd_map_over_sections (abfd, find_address_in_section, (void*) NULL);
#ifdef SO_LOOKUP
if (!found)
@@ -477,7 +477,7 @@ mpiP_find_src_loc (void *i_addr_hex, char **o_file_str, int *o_lineno,
mpiPi_msg_debug ("fso->bfd->sections is %p\n",
((bfd *) (fso->bfd))->sections);
bfd_map_over_sections (fso->bfd, find_address_in_section,
- (PTR) NULL);
+ (void*) NULL);
}
}