From f8304537018a611099d93c436199187ae35ee7c2 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Fri, 27 Mar 2015 08:12:08 -0600 Subject: [PATCH] Update to latest 1.8.4 snapshot - Add upstream patch to fix atomics on 32bit --- .gitignore | 1 + openmpi-atomic.patch | 60 ++++++++++++++++++++++++++++++++++++++++++++ openmpi.spec | 13 +++++++--- sources | 2 +- 4 files changed, 72 insertions(+), 4 deletions(-) create mode 100644 openmpi-atomic.patch diff --git a/.gitignore b/.gitignore index 220cc39..8f3a668 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ openmpi-1.4.1-RH.tar.bz2 /openmpi-1.8.3.tar.bz2 /openmpi-1.8.4.tar.bz2 /openmpi-v1.8.4-99-gd83fb30.tar.gz +/openmpi-v1.8.4-134-g9ad2aa8.tar.bz2 diff --git a/openmpi-atomic.patch b/openmpi-atomic.patch new file mode 100644 index 0000000..509e8e5 --- /dev/null +++ b/openmpi-atomic.patch @@ -0,0 +1,60 @@ +--- openmpi-v1.8.4-134-g9ad2aa8/opal/include/opal/sys/ia32/atomic.h.orig 2015-03-24 19:21:55.000000000 -0600 ++++ openmpi-v1.8.4-134-g9ad2aa8/opal/include/opal/sys/ia32/atomic.h 2015-03-27 08:09:41.140745019 -0600 +@@ -1,3 +1,4 @@ ++/* -*- 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 +@@ -10,6 +11,8 @@ + * Copyright (c) 2004-2005 The Regents of the University of California. + * All rights reserved. + * Copyright (c) 2007-2010 Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2015 Los Alamos National Security, LLC. All rights ++ * reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow +@@ -155,6 +158,25 @@ + + #if OMPI_GCC_INLINE_ASSEMBLY + ++#define OPAL_HAVE_ATOMIC_SWAP_32 1 ++ ++static inline int32_t opal_atomic_swap_32( volatile int32_t *addr, ++ int32_t newval) ++{ ++ int32_t oldval; ++ ++ __asm__ __volatile__("xchg %1, %0" : ++ "=r" (oldval), "=m" (*addr) : ++ "0" (newval), "m" (*addr) : ++ "memory"); ++ return oldval; ++} ++ ++#endif /* OPAL_GCC_INLINE_ASSEMBLY */ ++ ++ ++#if OPAL_GCC_INLINE_ASSEMBLY ++ + /** + * atomic_add - add integer to atomic variable + * @i: integer value to add +@@ -167,7 +189,7 @@ + int ret = i; + __asm__ __volatile__( + SMPLOCK "xaddl %1,%0" +- :"=m" (*v), "+r" (ret) ++ :"+m" (*v), "+r" (ret) + :"m" (*v) + :"memory", "cc" + ); +@@ -187,7 +209,7 @@ + int ret = -i; + __asm__ __volatile__( + SMPLOCK "xaddl %1,%0" +- :"=m" (*v), "+r" (ret) ++ :"+m" (*v), "+r" (ret) + :"m" (*v) + :"memory", "cc" + ); diff --git a/openmpi.spec b/openmpi.spec index b5c579e..ab561be 100644 --- a/openmpi.spec +++ b/openmpi.spec @@ -22,7 +22,7 @@ Name: openmpi%{?_cc_name_suffix} Version: 1.8.4 -Release: 5.20150228gitgd83fb30%{?dist} +Release: 6.20150324gitg9ad2aa8%{?dist} Summary: Open Message Passing Interface Group: Development/Libraries License: BSD, MIT and Romio @@ -30,9 +30,11 @@ URL: http://www.open-mpi.org/ # We can't use %{name} here because of _cc_name_suffix #Source0: http://www.open-mpi.org/software/ompi/v1.8/downloads/openmpi-%{version}.tar.bz2 -Source0: http://www.open-mpi.org/nightly/v1.8/openmpi-v%{version}-99-gd83fb30.tar.gz +Source0: http://www.open-mpi.org/nightly/v1.8/openmpi-v1.8.4-134-g9ad2aa8.tar.bz2 Source1: openmpi.module.in Source2: macros.openmpi +# Upstream patch to fix atomics on 32bit +Patch0: openmpi-atomic.patch # Patch to use system ltdl for tests Patch1: openmpi-ltdl.patch # Fix typo in liboshmem name @@ -114,7 +116,8 @@ Contains development wrapper for compiling Java with openmpi. %global namearch openmpi-%{_arch}%{?_cc_name_suffix} %prep -%setup -q -n openmpi-v%{version}-99-gd83fb30 +%setup -q -n openmpi-v%{version}-134-g9ad2aa8 +%patch0 -p1 -b .atomic %patch1 -p1 -b .ltdl %patch2 -p1 -b .oshmem # Make sure we don't use the local libltdl library @@ -241,6 +244,10 @@ make check %changelog +* Fri Mar 27 2015 Orion Poplawski 1.8.4-6.20150324gitg9ad2aa8 +- Update to latest 1.8.4 snapshot +- Add upstream patch to fix atomics on 32bit + * Mon Mar 23 2015 Zbigniew Jędrzejewski-Szmek - 1.8.4-5.20150228gitgd83fb30 - Rebuild for fortran update (#1204420) diff --git a/sources b/sources index 5f5d918..489b5f5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f7ffd20704880169af895178086a54c3 openmpi-v1.8.4-99-gd83fb30.tar.gz +fa1ebef6c4659c8eb48f7188de3797a8 openmpi-v1.8.4-134-g9ad2aa8.tar.bz2