From 37bc68735e52a3a65db34cd44fe942f3374085b7 Mon Sep 17 00:00:00 2001 From: wzx Date: Thu, 3 Nov 2022 19:01:01 +0800 Subject: [PATCH] Add sw64 architecture Signed-off-by: wzx --- openmpi-2.1.1-sw.patch | 909 +++++++++++++++++++++++++++++++++++++++++ openmpi.spec | 14 +- 2 files changed, 922 insertions(+), 1 deletion(-) create mode 100755 openmpi-2.1.1-sw.patch diff --git a/openmpi-2.1.1-sw.patch b/openmpi-2.1.1-sw.patch new file mode 100755 index 0000000..02e4a6f --- /dev/null +++ b/openmpi-2.1.1-sw.patch @@ -0,0 +1,909 @@ +diff -Naur openmpi-2.1.1.org/aclocal.m4 openmpi-2.1.1.sw/aclocal.m4 +--- openmpi-2.1.1.org/aclocal.m4 2022-09-02 09:14:15.550000000 +0000 ++++ openmpi-2.1.1.sw/aclocal.m4 2022-09-05 08:40:17.130000000 +0000 +@@ -1,4 +1,4 @@ +-# generated automatically by aclocal 1.15 -*- Autoconf -*- ++# generated automatically by aclocal 1.16 -*- Autoconf -*- + + # Copyright (C) 1996-2014 Free Software Foundation, Inc. + +@@ -32,10 +32,10 @@ + # generated from the m4 files accompanying Automake X.Y. + # (This private macro should not be called outside this file.) + AC_DEFUN([AM_AUTOMAKE_VERSION], +-[am__api_version='1.15' ++[am__api_version='1.16' + dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to + dnl require some minimum version. Point them to the right macro. +-m4_if([$1], [1.15], [], ++m4_if([$1], [1.16.5], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl + ]) + +@@ -51,7 +51,7 @@ + # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. + # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. + AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +-[AM_AUTOMAKE_VERSION([1.15])dnl ++[AM_AUTOMAKE_VERSION([1.16.5])dnl + m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl + _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) +diff -Naur openmpi-2.1.1.org/config/config.guess openmpi-2.1.1.sw/config/config.guess +--- openmpi-2.1.1.org/config/config.guess 2022-09-02 09:14:15.750000000 +0000 ++++ openmpi-2.1.1.sw/config/config.guess 2022-09-02 17:13:27.660000000 +0000 +@@ -891,6 +891,14 @@ + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; ++ sw_64:Linux:*:*) ++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in ++ sw) UNAME_MACHINE=sw_64 ;; ++ esac ++ objdump --private-headers /bin/sh | grep -q ld.so.1 ++ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; +diff -Naur openmpi-2.1.1.org/config/config.sub openmpi-2.1.1.sw/config/config.sub +--- openmpi-2.1.1.org/config/config.sub 2022-09-02 09:14:15.750000000 +0000 ++++ openmpi-2.1.1.sw/config/config.sub 2022-09-02 17:11:49.530000000 +0000 +@@ -248,6 +248,7 @@ + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ ++ | sw_64 \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ +@@ -370,6 +371,7 @@ + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ ++ | sw_64-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ +diff -Naur openmpi-2.1.1.org/config/opal_config_asm.m4 openmpi-2.1.1.sw/config/opal_config_asm.m4 +--- openmpi-2.1.1.org/config/opal_config_asm.m4 2022-09-02 09:14:15.740000000 +0000 ++++ openmpi-2.1.1.sw/config/opal_config_asm.m4 2022-09-02 09:19:15.330000000 +0000 +@@ -1020,6 +1020,12 @@ + OPAL_ASM_SUPPORT_64BIT=1 + OPAL_GCC_INLINE_ASSIGN='"mov %0=r0\n;;\n" : "=&r"(ret)' + ;; ++ sw_64*) ++ opal_cv_asm_arch="SW_64" ++ OPAL_ASM_SUPPORT_64BIT=1 ++ OPAL_GCC_INLINE_ASSIGN='"mov 0, %0" : "=&r"(ret)' ++ ;; ++ + aarch64*) + opal_cv_asm_arch="ARM64" + OPAL_ASM_SUPPORT_64BIT=1 +diff -Naur openmpi-2.1.1.org/configure openmpi-2.1.1.sw/configure +--- openmpi-2.1.1.org/configure 2022-09-02 09:14:15.600000000 +0000 ++++ openmpi-2.1.1.sw/configure 2022-09-05 10:30:45.730000000 +0000 +@@ -7233,7 +7233,7 @@ + # + # Init automake + # +-am__api_version='1.15' ++am__api_version='1.16' + + # Find a good install program. We prefer a C program (faster), + # so one script is as good as another. But avoid the broken or +@@ -32858,6 +32858,13 @@ + OPAL_ASM_SUPPORT_64BIT=1 + OPAL_GCC_INLINE_ASSIGN='"mov %0=r0\n;;\n" : "=&r"(ret)' + ;; ++ ++ sw_64*) ++ opal_cv_asm_arch="SW_64" ++ OPAL_ASM_SUPPORT_64BIT=1 ++ OPAL_GCC_INLINE_ASSIGN='"mov 0, %0" : "=&r"(ret)' ++ ;; ++ + aarch64*) + opal_cv_asm_arch="ARM64" + OPAL_ASM_SUPPORT_64BIT=1 +diff -Naur openmpi-2.1.1.org/ompi/mca/io/romio314/romio/aclocal.m4 openmpi-2.1.1.sw/ompi/mca/io/romio314/romio/aclocal.m4 +--- openmpi-2.1.1.org/ompi/mca/io/romio314/romio/aclocal.m4 2022-09-02 09:14:16.110000000 +0000 ++++ openmpi-2.1.1.sw/ompi/mca/io/romio314/romio/aclocal.m4 2022-09-05 10:18:40.720000000 +0000 +@@ -1,4 +1,4 @@ +-# generated automatically by aclocal 1.15 -*- Autoconf -*- ++# generated automatically by aclocal 1.16 -*- Autoconf -*- + + # Copyright (C) 1996-2014 Free Software Foundation, Inc. + +@@ -32,10 +32,10 @@ + # generated from the m4 files accompanying Automake X.Y. + # (This private macro should not be called outside this file.) + AC_DEFUN([AM_AUTOMAKE_VERSION], +-[am__api_version='1.15' ++[am__api_version='1.16' + dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to + dnl require some minimum version. Point them to the right macro. +-m4_if([$1], [1.15], [], ++m4_if([$1], [1.16.5], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl + ]) + +@@ -51,7 +51,7 @@ + # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. + # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. + AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +-[AM_AUTOMAKE_VERSION([1.15])dnl ++[AM_AUTOMAKE_VERSION([1.16.5])dnl + m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl + _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) +diff -Naur openmpi-2.1.1.org/ompi/mca/io/romio314/romio/confdb/config.guess openmpi-2.1.1.sw/ompi/mca/io/romio314/romio/confdb/config.guess +--- openmpi-2.1.1.org/ompi/mca/io/romio314/romio/confdb/config.guess 2022-09-02 09:14:16.100000000 +0000 ++++ openmpi-2.1.1.sw/ompi/mca/io/romio314/romio/confdb/config.guess 2022-09-02 17:13:51.970000000 +0000 +@@ -891,6 +891,14 @@ + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; ++ sw_64:Linux:*:*) ++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in ++ sw) UNAME_MACHINE=sw_64 ;; ++ esac ++ objdump --private-headers /bin/sh | grep -q ld.so.1 ++ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; +diff -Naur openmpi-2.1.1.org/ompi/mca/io/romio314/romio/confdb/config.sub openmpi-2.1.1.sw/ompi/mca/io/romio314/romio/confdb/config.sub +--- openmpi-2.1.1.org/ompi/mca/io/romio314/romio/confdb/config.sub 2022-09-02 09:14:16.110000000 +0000 ++++ openmpi-2.1.1.sw/ompi/mca/io/romio314/romio/confdb/config.sub 2022-09-02 17:12:09.680000000 +0000 +@@ -248,6 +248,7 @@ + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ ++ | sw_64 \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ +@@ -370,6 +371,7 @@ + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ ++ | sw_64-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ +diff -Naur openmpi-2.1.1.org/ompi/mca/io/romio314/romio/configure openmpi-2.1.1.sw/ompi/mca/io/romio314/romio/configure +--- openmpi-2.1.1.org/ompi/mca/io/romio314/romio/configure 2022-09-02 09:14:16.110000000 +0000 ++++ openmpi-2.1.1.sw/ompi/mca/io/romio314/romio/configure 2022-09-05 09:57:03.980000000 +0000 +@@ -2917,7 +2917,7 @@ + + + +-am__api_version='1.15' ++am__api_version='1.16' + + # Find a good install program. We prefer a C program (faster), + # so one script is as good as another. But avoid the broken or +diff -Naur openmpi-2.1.1.org/opal/include/Makefile.in openmpi-2.1.1.sw/opal/include/Makefile.in +--- openmpi-2.1.1.org/opal/include/Makefile.in 2022-09-02 09:14:16.350000000 +0000 ++++ openmpi-2.1.1.sw/opal/include/Makefile.in 2022-09-05 09:43:43.980000000 +0000 +@@ -696,8 +696,10 @@ + opal/sys/atomic.h opal/sys/atomic_impl.h opal/sys/timer.h \ + opal/sys/cma.h opal/sys/x86_64/atomic.h \ + opal/sys/x86_64/timer.h opal/sys/arm/atomic.h \ +- opal/sys/arm/timer.h opal/sys/arm64/atomic.h \ +- opal/sys/arm64/timer.h opal/sys/ia32/atomic.h \ ++ opal/sys/arm/timer.h \ ++ opal/sys/arm64/atomic.h opal/sys/arm64/timer.h \ ++ opal/sys/sw_64/atomic.h opal/sys/sw_64/timer.h \ ++ opal/sys/ia32/atomic.h \ + opal/sys/ia32/timer.h opal/sys/ia64/atomic.h \ + opal/sys/ia64/timer.h opal/sys/mips/atomic.h \ + opal/sys/mips/timer.h opal/sys/osx/atomic.h \ +@@ -757,6 +759,7 @@ + $(srcdir)/opal/sys/Makefile.am \ + $(srcdir)/opal/sys/arm/Makefile.am \ + $(srcdir)/opal/sys/arm64/Makefile.am \ ++ $(srcdir)/opal/sys/sw_64/Makefile.am \ + $(srcdir)/opal/sys/gcc_builtin/Makefile.am \ + $(srcdir)/opal/sys/ia32/Makefile.am \ + $(srcdir)/opal/sys/ia64/Makefile.am \ +@@ -1917,6 +1920,7 @@ + opal/sys/x86_64/atomic.h opal/sys/x86_64/timer.h \ + opal/sys/arm/atomic.h opal/sys/arm/timer.h \ + opal/sys/arm64/atomic.h opal/sys/arm64/timer.h \ ++ opal/sys/sw_64/atomic.h opal/sys/sw_64/timer.h \ + opal/sys/ia32/atomic.h opal/sys/ia32/timer.h \ + opal/sys/ia64/atomic.h opal/sys/ia64/timer.h \ + opal/sys/mips/atomic.h opal/sys/mips/timer.h \ +@@ -1933,7 +1937,7 @@ + $(MAKE) $(AM_MAKEFLAGS) all-am + + .SUFFIXES: +-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/opal/Makefile.am $(srcdir)/opal/sys/Makefile.am $(srcdir)/opal/sys/x86_64/Makefile.am $(srcdir)/opal/sys/arm/Makefile.am $(srcdir)/opal/sys/arm64/Makefile.am $(srcdir)/opal/sys/ia32/Makefile.am $(srcdir)/opal/sys/ia64/Makefile.am $(srcdir)/opal/sys/mips/Makefile.am $(srcdir)/opal/sys/osx/Makefile.am $(srcdir)/opal/sys/powerpc/Makefile.am $(srcdir)/opal/sys/sparcv9/Makefile.am $(srcdir)/opal/sys/sync_builtin/Makefile.am $(srcdir)/opal/sys/gcc_builtin/Makefile.am $(am__configure_deps) ++$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/opal/Makefile.am $(srcdir)/opal/sys/Makefile.am $(srcdir)/opal/sys/x86_64/Makefile.am $(srcdir)/opal/sys/arm/Makefile.am $(srcdir)/opal/sys/arm64/Makefile.am $(srcdir)/opal/sys/sw_64/Makefile.am $(srcdir)/opal/sys/ia32/Makefile.am $(srcdir)/opal/sys/ia64/Makefile.am $(srcdir)/opal/sys/mips/Makefile.am $(srcdir)/opal/sys/osx/Makefile.am $(srcdir)/opal/sys/powerpc/Makefile.am $(srcdir)/opal/sys/sparcv9/Makefile.am $(srcdir)/opal/sys/sync_builtin/Makefile.am $(srcdir)/opal/sys/gcc_builtin/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ +@@ -1953,7 +1957,7 @@ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; +-$(srcdir)/opal/Makefile.am $(srcdir)/opal/sys/Makefile.am $(srcdir)/opal/sys/x86_64/Makefile.am $(srcdir)/opal/sys/arm/Makefile.am $(srcdir)/opal/sys/arm64/Makefile.am $(srcdir)/opal/sys/ia32/Makefile.am $(srcdir)/opal/sys/ia64/Makefile.am $(srcdir)/opal/sys/mips/Makefile.am $(srcdir)/opal/sys/osx/Makefile.am $(srcdir)/opal/sys/powerpc/Makefile.am $(srcdir)/opal/sys/sparcv9/Makefile.am $(srcdir)/opal/sys/sync_builtin/Makefile.am $(srcdir)/opal/sys/gcc_builtin/Makefile.am $(am__empty): ++$(srcdir)/opal/Makefile.am $(srcdir)/opal/sys/Makefile.am $(srcdir)/opal/sys/x86_64/Makefile.am $(srcdir)/opal/sys/arm/Makefile.am $(srcdir)/opal/sys/arm64/Makefile.am $(srcdir)/opal/sys/sw_64/Makefile.am $(srcdir)/opal/sys/ia32/Makefile.am $(srcdir)/opal/sys/ia64/Makefile.am $(srcdir)/opal/sys/mips/Makefile.am $(srcdir)/opal/sys/osx/Makefile.am $(srcdir)/opal/sys/powerpc/Makefile.am $(srcdir)/opal/sys/sparcv9/Makefile.am $(srcdir)/opal/sys/sync_builtin/Makefile.am $(srcdir)/opal/sys/gcc_builtin/Makefile.am $(am__empty): + + $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +diff -Naur openmpi-2.1.1.org/opal/include/opal/sys/architecture.h openmpi-2.1.1.sw/opal/include/opal/sys/architecture.h +--- openmpi-2.1.1.org/opal/include/opal/sys/architecture.h 2022-09-02 09:14:16.350000000 +0000 ++++ openmpi-2.1.1.sw/opal/include/opal/sys/architecture.h 2022-09-02 09:22:40.490000000 +0000 +@@ -42,6 +42,7 @@ + #define OPAL_MIPS 0070 + #define OPAL_ARM 0100 + #define OPAL_ARM64 0101 ++#define OPAL_SW_64 0120 + #define OPAL_S390 0110 + #define OPAL_S390X 0111 + #define OPAL_BUILTIN_SYNC 0200 +diff -Naur openmpi-2.1.1.org/opal/include/opal/sys/atomic.h openmpi-2.1.1.sw/opal/include/opal/sys/atomic.h +--- openmpi-2.1.1.org/opal/include/opal/sys/atomic.h 2022-09-02 09:14:16.350000000 +0000 ++++ openmpi-2.1.1.sw/opal/include/opal/sys/atomic.h 2022-09-05 09:42:11.710000000 +0000 +@@ -161,6 +161,8 @@ + #include "opal/sys/arm/atomic.h" + #elif OPAL_ASSEMBLY_ARCH == OPAL_ARM64 + #include "opal/sys/arm64/atomic.h" ++#elif OPAL_ASSEMBLY_ARCH == OPAL_SW_64 ++#include "opal/sys/sw_64/atomic.h" + #elif OPAL_ASSEMBLY_ARCH == OPAL_IA32 + #include "opal/sys/ia32/atomic.h" + #elif OPAL_ASSEMBLY_ARCH == OPAL_IA64 +diff -Naur openmpi-2.1.1.org/opal/include/opal/sys/cma.h openmpi-2.1.1.sw/opal/include/opal/sys/cma.h +--- openmpi-2.1.1.org/opal/include/opal/sys/cma.h 2022-09-02 09:14:16.350000000 +0000 ++++ openmpi-2.1.1.sw/opal/include/opal/sys/cma.h 2022-09-05 09:28:51.400000000 +0000 +@@ -64,6 +64,10 @@ + #define __NR_process_vm_readv 270 + #define __NR_process_vm_writev 271 + ++#elif OPAL_ASSEMBLY_ARCH == OPAL_SW_64 ++#define __NR_process_vm_readv 504 ++#define __NR_process_vm_writev 505 ++ + #elif OPAL_ASSEMBLY_ARCH == OPAL_MIPS + + #if _MIPS_SIM == _MIPS_SIM_ABI32 +@@ -97,6 +101,10 @@ + #define __NR_process_vm_readv 340 + #define __NR_process_vm_writev 341 + ++#elif OPAL_ASSEMBLY_ARCH == OPAL_SW_64 ++#define __NR_process_vm_readv 504 ++#define __NR_process_vm_writev 505 ++ + #else + #error "Unsupported architecture for process_vm_readv and process_vm_writev syscalls" + #endif +diff -Naur openmpi-2.1.1.org/opal/include/opal/sys/Makefile.am openmpi-2.1.1.sw/opal/include/opal/sys/Makefile.am +--- openmpi-2.1.1.org/opal/include/opal/sys/Makefile.am 2022-09-02 09:14:16.350000000 +0000 ++++ openmpi-2.1.1.sw/opal/include/opal/sys/Makefile.am 2022-09-02 09:18:08.130000000 +0000 +@@ -34,6 +34,7 @@ + include opal/sys/x86_64/Makefile.am + include opal/sys/arm/Makefile.am + include opal/sys/arm64/Makefile.am ++include opal/sys/sw_64/Makefile.am + include opal/sys/ia32/Makefile.am + include opal/sys/ia64/Makefile.am + include opal/sys/mips/Makefile.am +diff -Naur openmpi-2.1.1.org/opal/include/opal/sys/sw_64/atomic.h openmpi-2.1.1.sw/opal/include/opal/sys/sw_64/atomic.h +--- openmpi-2.1.1.org/opal/include/opal/sys/sw_64/atomic.h 1970-01-01 00:00:00.000000000 +0000 ++++ openmpi-2.1.1.sw/opal/include/opal/sys/sw_64/atomic.h 2022-09-02 17:28:56.350000000 +0000 +@@ -0,0 +1,321 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ ++/* ++ * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana ++ * University Research and Technology ++ * Corporation. All rights reserved. ++ * Copyright (c) 2004-2005 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) 2010 IBM Corporation. All rights reserved. ++ * Copyright (c) 2010 ARM ltd. All rights reserved. ++ * Copyright (c) 2016 Los Alamos National Security, LLC. All rights ++ * reserved. ++ * $COPYRIGHT$ ++ * ++ * Additional copyrights may follow ++ * ++ * $HEADER$ ++ */ ++ ++#if !defined(OPAL_SYS_ARCH_ATOMIC_H) ++ ++#define OPAL_SYS_ARCH_ATOMIC_H 1 ++ ++#if OPAL_GCC_INLINE_ASSEMBLY ++ ++#define OPAL_HAVE_ATOMIC_MEM_BARRIER 1 ++#define OPAL_HAVE_ATOMIC_LLSC_32 1 ++#define OPAL_HAVE_ATOMIC_CMPSET_32 1 ++#define OPAL_HAVE_ATOMIC_SWAP_32 1 ++#define OPAL_HAVE_ATOMIC_MATH_32 1 ++#define OPAL_HAVE_ATOMIC_CMPSET_64 1 ++#define OPAL_HAVE_ATOMIC_SWAP_64 1 ++#define OPAL_HAVE_ATOMIC_LLSC_64 1 ++#define OPAL_HAVE_ATOMIC_ADD_32 1 ++#define OPAL_HAVE_ATOMIC_SUB_32 1 ++#define OPAL_HAVE_ATOMIC_ADD_64 1 ++#define OPAL_HAVE_ATOMIC_SUB_64 1 ++ ++#define MB() __asm__ __volatile__ ("memb" : : : "memory") ++#define RMB() __asm__ __volatile__ ("memb" : : : "memory") ++#define WMB() __asm__ __volatile__ ("memb" : : : "memory") ++ ++/********************************************************************** ++ * ++ * Memory Barriers ++ * ++ *********************************************************************/ ++ ++static inline void opal_atomic_mb (void) ++{ ++ MB(); ++} ++ ++static inline void opal_atomic_rmb (void) ++{ ++ RMB(); ++} ++ ++static inline void opal_atomic_wmb (void) ++{ ++ WMB(); ++} ++ ++static inline void opal_atomic_isync (void) ++{ ++ __asm__ __volatile__ ("memb"); ++} ++ ++/********************************************************************** ++ * ++ * Atomic math operations ++ * ++ *********************************************************************/ ++ ++static inline int opal_atomic_cmpset_32(volatile int32_t *addr, ++ int32_t oldval, int32_t newval) ++{ ++ int32_t ret, tmp; ++ int32_t tmp1, tmp2; ++ ++ __asm__ __volatile__ (" ldi %2, %4 \n" //tmp1=addr ++ "1: lldl %0, 0(%2) \n" //ret=*tmp1 ++ " cmpeq %0, %5, %3 \n" ++ " wr_f %3 \n" //if(ret != oldval) tmp2 = 0;else tmp2 =1 ++ " mov %6, %1 \n" //tmp = newval ++ " lstw %1, 0(%2) \n" //*tmp=tmp1 ++ " rd_f %1 \n" ++ " beq %3,2f \n" //if(tmp2 == 0) goto 2 ++ " beq %1, 1b \n" //if(tmp == 0) goto 1, if store option failed goto 1 ++ "2: \n" ++ : "=&r" (ret), "=&r" (tmp), "=&r" (tmp1), "=&r" (tmp2) ++ : "m" (*addr), "r" (oldval), "r" (newval) ++ : "memory"); ++ ++ return (ret == oldval); ++} ++ ++static inline int32_t opal_atomic_swap_32(volatile int32_t *addr, int32_t newval) ++{ ++ int32_t ret, tmp; ++ int32_t tmp1, tmp2; ++ ++ __asm__ __volatile__ (" ldi %2, %4 \n" //tmp1 = addr ++ "1: lldw %0, 0(%2) \n" //ret=*tmp1 ++ " ldi %3, 1 \n" //tmp2=1 ++ " wr_f %3 \n" ++ " mov %5, %1 \n" //tmp=newval ++ " lstw %1, 0(%2) \n" //*tmp1=tmp ++ " rd_f %1 \n" //tmp = status value ++ " beq %1, 1b \n" //if(tmp == 0) goto 1, start again on atomic error ++ : "=&r" (ret), "=&r" (tmp),"=&r" (tmp1), "=&r" (tmp2) ++ : "m" (*addr), "r" (newval) ++ : "memory"); ++ ++ return ret; ++} ++ ++/* these two functions aren't inlined in the non-gcc case because then ++ there would be two function calls (since neither cmpset_32 nor ++ atomic_?mb can be inlined). Instead, we "inline" them by hand in ++ the assembly, meaning there is one function call overhead instead ++ of two */ ++static inline int opal_atomic_cmpset_acq_32(volatile int32_t *addr, ++ int32_t oldval, int32_t newval) ++{ ++ int32_t ret, tmp; ++ int32_t tmp1, tmp2; ++ ++ __asm__ __volatile__ (" ldi %2, %4 \n" //tmp1=addr ++ "1: lldw %0, 0(%2) \n" //ret=*tmp1 ++ " cmpeq %0, %5, %3 \n" ++ " wr_f %3 \n" //if(ret != oldval) tmp2 = 0;else tmp2 =1 ++ " mov %6, %1 \n" //tmp=newval ++ " lstw %1, 0(%2) \n" //*tmp1=tmp ++ " beq %3, 2f \n" //if(tmp2 == 0) goto 2 ++ " beq %1, 1b \n" //if(tmp == 0) goto 1, if store option failed goto 1 ++ "2: \n" ++ : "=&r" (ret), "=&r" (tmp), "=&r" (tmp1), "=&r" (tmp2) ++ : "m" (*addr), "r" (oldval), "r" (newval) ++ : "memory"); ++ ++ return (ret == oldval); ++} ++ ++ ++static inline int opal_atomic_cmpset_rel_32(volatile int32_t *addr, ++ int32_t oldval, int32_t newval) ++{ ++ int32_t ret, tmp; ++ int32_t tmp1, tmp2; ++ ++ __asm__ __volatile__ (" ldi %2, %4 \n" //tmp1=addr ++ "1: lldw %0, 0(%2) \n" //ret=*tmp1 ++ " cmpeq %0, %5, %3 \n" ++ " wr_f %3 \n" //if(ret != oldval) tmp2 = 0;else tmp2 =1 ++ " mov %6, %1 \n" //tmp=newval ++ " lstw %1, 0(%2) \n" //*tmp1=tmp ++ " beq %3, 2f \n" //if(tmp2 == 0) goto 2 ++ " beq %1, 1b \n" //if(tmp == 0) goto 1, if store option failed goto 1 ++ "2: \n" ++ : "=&r" (ret), "=&r" (tmp), "=&r" (tmp1), "=&r" (tmp2) ++ : "m" (*addr), "r" (oldval), "r" (newval) ++ : "memory"); ++ ++ return (ret == oldval); ++} ++ ++static inline int32_t opal_atomic_ll_32 (volatile int32_t *addr) ++{ ++ int32_t ret; ++ __asm__ __volatile__ ( ++ "ldl %0,0(%1) \n" ++ : "=&r" (ret) ++ : "m" (*addr)); ++ ++ return ret; ++} ++ ++static inline int opal_atomic_sc_32 (volatile int32_t *addr, int32_t newval) ++{ ++ int ret; ++ ++ __asm__ __volatile__ ( ++ "stl %2,0(%1) \n" ++ : "=&r" (ret) ++ : "m" (*addr), "r" (newval) ++ : "memory"); ++ ++ return ret == 0; ++} ++ ++static inline int opal_atomic_cmpset_64(volatile int64_t *addr, ++ int64_t oldval, int64_t newval) ++{ ++ int64_t ret; ++ int tmp; ++ int32_t tmp1, tmp2; ++ ++ __asm__ __volatile__ (" ldi %2, %4 \n" //tmp1=addr ++ "1: lldl %0, 0(%2) \n" //ret=*tmp1 ++ " cmpeq %0, %5, %3 \n" ++ " wr_f %3 \n" //if(ret != oldval) tmp2 = 0;else tmp2 =1 ++ " mov %6, %1 \n" //tmp = newval ++ " lstw %1, 0(%2) \n" //*tmp=tmp1 ++ " rd_f %1 \n" ++ " beq %3,2f \n" //if(tmp2 == 0) goto 2 ++ " beq %1, 1b \n" //if(tmp == 0) goto 1, if store option failed goto 1 ++ "2: \n" ++ : "=&r" (ret), "=&r" (tmp), "=&r" (tmp1), "=&r" (tmp2) ++ : "m" (*addr), "r" (oldval), "r" (newval) ++ : "memory"); ++ ++ return (ret == oldval); ++} ++ ++static inline int64_t opal_atomic_swap_64 (volatile int64_t *addr, int64_t newval) ++{ ++ int64_t ret; ++ int tmp; ++ ++ __asm__ __volatile__ ("1: ldaxr %0, [%2] \n" ++ " stlxr %w1, %3, [%2] \n" ++ " cbnz %w1, 1b \n" ++ : "=&r" (ret), "=&r" (tmp) ++ : "r" (addr), "r" (newval) ++ : "cc", "memory"); ++ ++ return ret; ++} ++ ++/* these two functions aren't inlined in the non-gcc case because then ++ there would be two function calls (since neither cmpset_64 nor ++ atomic_?mb can be inlined). Instead, we "inline" them by hand in ++ the assembly, meaning there is one function call overhead instead ++ of two */ ++static inline int opal_atomic_cmpset_acq_64(volatile int64_t *addr, ++ int64_t oldval, int64_t newval) ++{ ++ int64_t ret; ++ int tmp; ++ int64_t tmp1, tmp2; ++ ++ __asm__ __volatile__ (" ldi %2, %4 \n" //tmp1=addr ++ "1: lldl %0, 0(%2) \n" //ret=*tmp1 ++ " cmpeq %0, %5, %3 \n" ++ " wr_f %3 \n" //if(ret != oldval) tmp2 = 0;else tmp2 =1 ++ " mov %6, %1 \n" //tmp = newval ++ " lstw %1, 0(%2) \n" //*tmp=tmp1 ++ " rd_f %1 \n" ++ " beq %3,2f \n" //if(tmp2 == 0) goto 2 ++ " beq %1, 1b \n" //if(tmp == 0) goto 1, if store option failed goto 1 ++ "2: \n" ++ : "=&r" (ret), "=&r" (tmp), "=&r" (tmp1), "=&r" (tmp2) ++ : "m" (*addr), "r" (oldval), "r" (newval) ++ : "memory"); ++ ++ return (ret == oldval); ++} ++ ++ ++static inline int opal_atomic_cmpset_rel_64(volatile int64_t *addr, ++ int64_t oldval, int64_t newval) ++{ ++ int64_t ret; ++ int tmp; ++ int64_t tmp1, tmp2; ++ ++ __asm__ __volatile__ (" ldi %2, %4 \n" //tmp1=addr ++ "1: lldl %0, 0(%2) \n" //ret=*tmp1 ++ " cmpeq %0, %5, %3 \n" ++ " wr_f %3 \n" //if(ret != oldval) tmp2 = 0;else tmp2 =1 ++ " mov %6, %1 \n" //tmp = newval ++ " lstw %1, 0(%2) \n" //*tmp=tmp1 ++ " rd_f %1 \n" ++ " beq %3,2f \n" //if(tmp2 == 0) goto 2 ++ " beq %1, 1b \n" //if(tmp == 0) goto 1, if store option failed goto 1 ++ "2: \n" ++ : "=&r" (ret), "=&r" (tmp), "=&r" (tmp1), "=&r" (tmp2) ++ : "m" (*addr), "r" (oldval), "r" (newval) ++ : "memory"); ++ ++ return (ret == oldval); ++} ++ ++static inline int64_t opal_atomic_ll_64 (volatile int64_t *addr) ++{ ++ int64_t ret; ++ ++ __asm__ __volatile__ ("ldi $1, %1 \n" ++ "lldl %0,0($1) \n" ++ "ldi $2,1 \n" ++ "wr_f $2 \n" ++ : "=&r" (ret) ++ : "m" (*addr)); ++ ++ return ret; ++} ++ ++static inline int opal_atomic_sc_64 (volatile int64_t *addr, int64_t newval) ++{ ++ int ret; ++ ++ __asm__ __volatile__ ("stlxr %w0, %w2, [%1] \n" ++ "mov %2,$3 \n" ++ "lstl $3,0(%1) \n" ++ "rd_f $4 \n" ++ : "=&r" (ret) ++ : "m" (*addr), "r" (newval) ++ : "memory"); ++ ++ return ret == 0; ++} ++ ++ ++#endif /* OPAL_GCC_INLINE_ASSEMBLY */ ++ ++#endif /* ! OPAL_SYS_ARCH_ATOMIC_H */ +diff -Naur openmpi-2.1.1.org/opal/include/opal/sys/sw_64/Makefile.am openmpi-2.1.1.sw/opal/include/opal/sys/sw_64/Makefile.am +--- openmpi-2.1.1.org/opal/include/opal/sys/sw_64/Makefile.am 1970-01-01 00:00:00.000000000 +0000 ++++ openmpi-2.1.1.sw/opal/include/opal/sys/sw_64/Makefile.am 2022-09-02 09:24:55.930000000 +0000 +@@ -0,0 +1,24 @@ ++# ++# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana ++# University Research and Technology ++# Corporation. All rights reserved. ++# Copyright (c) 2004-2008 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$ ++# ++# Additional copyrights may follow ++# ++# $HEADER$ ++# ++ ++# This makefile.am does not stand on its own - it is included from opal/include/Makefile.am ++ ++headers += \ ++ opal/sys/sw_64/atomic.h \ ++ opal/sys/sw_64/timer.h ++ +diff -Naur openmpi-2.1.1.org/opal/include/opal/sys/sw_64/timer.h openmpi-2.1.1.sw/opal/include/opal/sys/sw_64/timer.h +--- openmpi-2.1.1.org/opal/include/opal/sys/sw_64/timer.h 1970-01-01 00:00:00.000000000 +0000 ++++ openmpi-2.1.1.sw/opal/include/opal/sys/sw_64/timer.h 2022-09-02 09:27:27.980000000 +0000 +@@ -0,0 +1,45 @@ ++/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ ++/* ++ * Copyright (c) 2008 The University of Tennessee and The University ++ * of Tennessee Research Foundation. All rights ++ * reserved. ++ * Copyright (c) 2016 Broadcom Limited. All rights reserved. ++ * Copyright (c) 2016 Los Alamos National Security, LLC. All rights ++ * reserved. ++ * $COPYRIGHT$ ++ * ++ * Additional copyrights may follow ++ * ++ * $HEADER$ ++ */ ++ ++#ifndef OPAL_SYS_ARCH_TIMER_H ++#define OPAL_SYS_ARCH_TIMER_H 1 ++ ++#include ++ ++typedef uint64_t opal_timer_t; ++ ++static inline opal_timer_t ++opal_sys_timer_get_cycles(void) ++{ ++ opal_timer_t ret; ++ ++ __asm__ __volatile__ ("memb" ::: "memory"); ++ __asm__ __volatile__ ("rtc %0" : "=r" (ret)); ++ ++ return ret; ++} ++ ++ ++static inline opal_timer_t ++opal_sys_timer_freq(void) ++{ ++ opal_timer_t freq; ++ __asm__ __volatile__ ("rtc %0" : "=r" (freq)); ++ return (opal_timer_t)(freq); ++} ++ ++#define OPAL_HAVE_SYS_TIMER_GET_CYCLES 1 ++ ++#endif /* ! OPAL_SYS_ARCH_TIMER_H */ +diff -Naur openmpi-2.1.1.org/opal/include/opal/sys/timer.h openmpi-2.1.1.sw/opal/include/opal/sys/timer.h +--- openmpi-2.1.1.org/opal/include/opal/sys/timer.h 2022-09-02 09:14:16.350000000 +0000 ++++ openmpi-2.1.1.sw/opal/include/opal/sys/timer.h 2022-09-05 09:42:02.870000000 +0000 +@@ -90,7 +90,9 @@ + #include "opal/sys/arm/timer.h" + #elif OPAL_ASSEMBLY_ARCH == OPAL_ARM64 + #include "opal/sys/arm64/timer.h" +-#elif OPAL_ASSEMBLY_ARCH == OPAL_IA32 ++#elif OPAL_ASSEMBLY_ARCH == OPAL_ARM64 ++#include "opal/sys/sw_64/timer.h" ++#elif OPAL_ASSEMBLY_ARCH == OPAL_SW_64 + #include "opal/sys/ia32/timer.h" + #elif OPAL_ASSEMBLY_ARCH == OPAL_IA64 + #include "opal/sys/ia64/timer.h" +diff -Naur openmpi-2.1.1.org/opal/mca/event/libevent2022/libevent/aclocal.m4 openmpi-2.1.1.sw/opal/mca/event/libevent2022/libevent/aclocal.m4 +--- openmpi-2.1.1.org/opal/mca/event/libevent2022/libevent/aclocal.m4 2022-09-02 09:14:16.450000000 +0000 ++++ openmpi-2.1.1.sw/opal/mca/event/libevent2022/libevent/aclocal.m4 2022-09-05 08:41:43.830000000 +0000 +@@ -1,4 +1,4 @@ +-# generated automatically by aclocal 1.15 -*- Autoconf -*- ++# generated automatically by aclocal 1.16 -*- Autoconf -*- + + # Copyright (C) 1996-2014 Free Software Foundation, Inc. + +@@ -32,10 +32,10 @@ + # generated from the m4 files accompanying Automake X.Y. + # (This private macro should not be called outside this file.) + AC_DEFUN([AM_AUTOMAKE_VERSION], +-[am__api_version='1.15' ++[am__api_version='1.16' + dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to + dnl require some minimum version. Point them to the right macro. +-m4_if([$1], [1.15], [], ++m4_if([$1], [1.16.5], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl + ]) + +@@ -51,7 +51,7 @@ + # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. + # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. + AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +-[AM_AUTOMAKE_VERSION([1.15])dnl ++[AM_AUTOMAKE_VERSION([1.16.5])dnl + m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl + _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) +diff -Naur openmpi-2.1.1.org/opal/mca/event/libevent2022/libevent/config.guess openmpi-2.1.1.sw/opal/mca/event/libevent2022/libevent/config.guess +--- openmpi-2.1.1.org/opal/mca/event/libevent2022/libevent/config.guess 2022-09-02 09:14:16.470000000 +0000 ++++ openmpi-2.1.1.sw/opal/mca/event/libevent2022/libevent/config.guess 2022-09-02 17:13:10.730000000 +0000 +@@ -891,6 +891,14 @@ + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; ++ sw_64:Linux:*:*) ++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in ++ sw) UNAME_MACHINE=sw_64 ;; ++ esac ++ objdump --private-headers /bin/sh | grep -q ld.so.1 ++ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; +diff -Naur openmpi-2.1.1.org/opal/mca/event/libevent2022/libevent/config.sub openmpi-2.1.1.sw/opal/mca/event/libevent2022/libevent/config.sub +--- openmpi-2.1.1.org/opal/mca/event/libevent2022/libevent/config.sub 2022-09-02 09:14:16.470000000 +0000 ++++ openmpi-2.1.1.sw/opal/mca/event/libevent2022/libevent/config.sub 2022-09-02 17:12:41.600000000 +0000 +@@ -248,6 +248,7 @@ + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ ++ | sw_64 \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ +@@ -370,6 +371,7 @@ + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ ++ | sw_64-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ +diff -Naur openmpi-2.1.1.org/opal/mca/event/libevent2022/libevent/configure openmpi-2.1.1.sw/opal/mca/event/libevent2022/libevent/configure +--- openmpi-2.1.1.org/opal/mca/event/libevent2022/libevent/configure 2022-09-02 09:14:16.460000000 +0000 ++++ openmpi-2.1.1.sw/opal/mca/event/libevent2022/libevent/configure 2022-09-02 17:29:15.820000000 +0000 +@@ -2642,7 +2642,7 @@ + + + # Open MPI: changed to one 1 arg AM INIT_AUTOMAKE +-am__api_version='1.15' ++am__api_version='1.16' + + ac_aux_dir= + for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do +diff -Naur openmpi-2.1.1.org/opal/mca/hwloc/hwloc1112/hwloc/src/topology-linux.c openmpi-2.1.1.sw/opal/mca/hwloc/hwloc1112/hwloc/src/topology-linux.c +--- openmpi-2.1.1.org/opal/mca/hwloc/hwloc1112/hwloc/src/topology-linux.c 2022-09-02 09:14:16.500000000 +0000 ++++ openmpi-2.1.1.sw/opal/mca/hwloc/hwloc1112/hwloc/src/topology-linux.c 2022-09-02 09:15:50.240000000 +0000 +@@ -77,6 +77,8 @@ + # define __NR_sched_setaffinity 1231 + # elif defined(__hppa__) + # define __NR_sched_setaffinity 211 ++# elif defined(__sw_64__) ++# define __NR_sched_setaffinity 395 + # elif defined(__alpha__) + # define __NR_sched_setaffinity 395 + # elif defined(__s390__) +@@ -110,6 +112,8 @@ + # define __NR_sched_getaffinity 1232 + # elif defined(__hppa__) + # define __NR_sched_getaffinity 212 ++# elif defined(__sw_64__) ++# define __NR_sched_getaffinity 396 + # elif defined(__alpha__) + # define __NR_sched_getaffinity 396 + # elif defined(__s390__) +diff -Naur openmpi-2.1.1.org/opal/mca/pmix/pmix112/pmix/aclocal.m4 openmpi-2.1.1.sw/opal/mca/pmix/pmix112/pmix/aclocal.m4 +--- openmpi-2.1.1.org/opal/mca/pmix/pmix112/pmix/aclocal.m4 2022-09-02 09:14:16.540000000 +0000 ++++ openmpi-2.1.1.sw/opal/mca/pmix/pmix112/pmix/aclocal.m4 2022-09-05 08:41:17.450000000 +0000 +@@ -1,4 +1,4 @@ +-# generated automatically by aclocal 1.15 -*- Autoconf -*- ++# generated automatically by aclocal 1.16 -*- Autoconf -*- + + # Copyright (C) 1996-2014 Free Software Foundation, Inc. + +@@ -32,10 +32,10 @@ + # generated from the m4 files accompanying Automake X.Y. + # (This private macro should not be called outside this file.) + AC_DEFUN([AM_AUTOMAKE_VERSION], +-[am__api_version='1.15' ++[am__api_version='1.16' + dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to + dnl require some minimum version. Point them to the right macro. +-m4_if([$1], [1.15], [], ++m4_if([$1], [1.16.5], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl + ]) + +@@ -51,7 +51,7 @@ + # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. + # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. + AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +-[AM_AUTOMAKE_VERSION([1.15])dnl ++[AM_AUTOMAKE_VERSION([1.16.5])dnl + m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl + _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) +diff -Naur openmpi-2.1.1.org/opal/mca/pmix/pmix112/pmix/config/config.guess openmpi-2.1.1.sw/opal/mca/pmix/pmix112/pmix/config/config.guess +--- openmpi-2.1.1.org/opal/mca/pmix/pmix112/pmix/config/config.guess 2022-09-02 09:14:16.560000000 +0000 ++++ openmpi-2.1.1.sw/opal/mca/pmix/pmix112/pmix/config/config.guess 2022-09-02 17:13:18.640000000 +0000 +@@ -891,6 +891,14 @@ + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; ++ sw_64:Linux:*:*) ++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in ++ sw) UNAME_MACHINE=sw_64 ;; ++ esac ++ objdump --private-headers /bin/sh | grep -q ld.so.1 ++ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; +diff -Naur openmpi-2.1.1.org/opal/mca/pmix/pmix112/pmix/config/config.sub openmpi-2.1.1.sw/opal/mca/pmix/pmix112/pmix/config/config.sub +--- openmpi-2.1.1.org/opal/mca/pmix/pmix112/pmix/config/config.sub 2022-09-02 09:14:16.560000000 +0000 ++++ openmpi-2.1.1.sw/opal/mca/pmix/pmix112/pmix/config/config.sub 2022-09-02 17:12:26.180000000 +0000 +@@ -248,6 +248,7 @@ + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ ++ | sw_64 \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ +@@ -370,6 +371,7 @@ + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ ++ | sw_64-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ +diff -Naur openmpi-2.1.1.org/opal/mca/pmix/pmix112/pmix/configure openmpi-2.1.1.sw/opal/mca/pmix/pmix112/pmix/configure +--- openmpi-2.1.1.org/opal/mca/pmix/pmix112/pmix/configure 2022-09-02 09:14:16.540000000 +0000 ++++ openmpi-2.1.1.sw/opal/mca/pmix/pmix112/pmix/configure 2022-09-05 09:54:27.340000000 +0000 +@@ -3121,7 +3121,7 @@ + program_prefix=${target_alias}- + + # Init automake +-am__api_version='1.15' ++am__api_version='1.16' + + # Find a good install program. We prefer a C program (faster), + # so one script is as good as another. But avoid the broken or +diff -Naur openmpi-2.1.1.org/opal/mca/timer/linux/timer_linux_component.c openmpi-2.1.1.sw/opal/mca/timer/linux/timer_linux_component.c +--- openmpi-2.1.1.org/opal/mca/timer/linux/timer_linux_component.c 2022-09-02 09:14:16.390000000 +0000 ++++ openmpi-2.1.1.sw/opal/mca/timer/linux/timer_linux_component.c 2022-09-05 09:44:04.640000000 +0000 +@@ -118,6 +118,9 @@ + #if OPAL_ASSEMBLY_ARCH == OPAL_ARM64 + opal_timer_linux_freq = opal_sys_timer_freq(); + #endif ++#if OPAL_ASSEMBLY_ARCH == OPAL_SW_64 ++ opal_timer_linux_freq = opal_sys_timer_freq(); ++#endif + + if (0 == opal_timer_linux_freq) { + /* first, look for a timebase field. probably only on PPC, diff --git a/openmpi.spec b/openmpi.spec index bcdf05f..8f416dd 100644 --- a/openmpi.spec +++ b/openmpi.spec @@ -1,6 +1,6 @@ Name: openmpi Version: 2.1.1 -Release: 21 +Release: 22 Summary: Open Source High Performance Computing License: BSD and MIT and Romio URL: http://www.open-mpi.org/ @@ -8,6 +8,9 @@ Source0: https://download.open-mpi.org/release/open-mpi/v2.1/openmpi-%{ve Source1: openmpi.module.in Source2: openmpi.pth.py3 Source3: macros.openmpi +%ifarch sw_64 +Patch1: openmpi-2.1.1-sw.patch +%endif BuildRequires: gcc-c++, gcc-gfortran BuildRequires: valgrind-devel, hwloc-devel, java-1.8.0-openjdk-devel, libfabric-devel, papi-devel @@ -174,7 +177,9 @@ make check %{_libdir}/%{name}/bin/shmemrun %{_libdir}/%{name}/lib/*.so.* %{_libdir}/%{name}/lib/openmpi/* +%ifnarch sw_64 %{_libdir}/%{name}/lib/mpi.jar +%endif %{_libdir}/%{name}/share/openmpi/help*.txt %{_libdir}/%{name}/share/openmpi/amca-param-sets %{_libdir}/%{name}/share/openmpi/mca-btl-openib-device-params.ini @@ -183,7 +188,9 @@ make check %files devel %dir %{_includedir}/%{name_all} %{_includedir}/%{name_all}/* +%ifnarch sw_64 %{_libdir}/%{name}/share/doc/ +%endif %{_libdir}/%{name}/bin/mpic* %{_libdir}/%{name}/bin/mpiCC %{_libdir}/%{name}/bin/mpif* @@ -193,7 +200,9 @@ make check %{_libdir}/%{name}/bin/oshfort %{_libdir}/%{name}/bin/shmemcc %{_libdir}/%{name}/bin/shmemfort +%ifnarch sw_64 %{_libdir}/%{name}/bin/mpijava* +%endif %{_libdir}/%{name}/lib/*.so %{_libdir}/%{name}/lib/*.mod %{_libdir}/%{name}/lib/pkgconfig/ @@ -211,6 +220,9 @@ make check %{_mandir}/%{name_all}/man*/* %changelog +* Tue Oct 25 2022 wuzx - 2.1.1-22 +- Add sw64 architecture + * Wed Mar 30 2022 ouyangminxiang - 2.1.1-21 - change Buildrequire from java-devel to java-1.8.0-openjdk-devel -- Gitee