Package: openmpi Version: 1.6.5-9.2 Severity: normal Tags: patch
Attached patch fixes the build on the hppa architecture. Since we now do support the gcc builtin atomics the patch is pretty trivial. I even copied parts of the upstream "atomic.h" file from here: https://github.com/open-mpi/ompi/blob/master/opal/include/opal/sys/sync_builtin/atomic.h It would be nice if you could apply this patch for the next upload. Thanks, Helge PS: I'm currently trying to fix upstream to build with the generic "sync_builtin" target...
diff -up ./debian/control.org ./debian/control --- ./debian/control.org 2015-01-31 18:09:47.851303094 +0100 +++ ./debian/control 2015-01-31 18:12:19.483608895 +0100 @@ -17,7 +17,7 @@ Vcs-Svn: svn://svn.debian.org/svn/pkg-op Vcs-Browser: http://svn.debian.org/wsvn/pkg-openmpi/openmpi/trunk/ Package: openmpi-bin -Architecture: alpha amd64 armel armhf arm64 i386 ia64 powerpc powerpcspe ppc64 ppc64el sparc sparc64 kfreebsd-i386 kfreebsd-amd64 hurd-i386 mips64 mips64el mips mipsel +Architecture: alpha amd64 armel armhf arm64 hppa i386 ia64 powerpc powerpcspe ppc64 ppc64el sparc sparc64 kfreebsd-i386 kfreebsd-amd64 hurd-i386 mips64 mips64el mips mipsel Depends: ${shlibs:Depends}, ${misc:Depends}, openmpi-common (= ${source:Version}) Conflicts: openmpi-bin Suggests: gfortran, openmpi-checkpoint [amd64 armel armhf i386 powerpc] @@ -46,7 +46,7 @@ Description: high performance message pa Package: libopenmpi-dev Section: libdevel -Architecture: alpha amd64 armel armhf arm64 i386 ia64 powerpc powerpcspe ppc64 ppc64el sparc sparc64 kfreebsd-i386 kfreebsd-amd64 hurd-i386 mips64 mips64el mips mipsel +Architecture: alpha amd64 armel armhf arm64 hppa i386 ia64 powerpc powerpcspe ppc64 ppc64el sparc sparc64 kfreebsd-i386 kfreebsd-amd64 hurd-i386 mips64 mips64el mips mipsel Depends: ${shlibs:Depends}, ${misc:Depends}, libopenmpi1.6 (= ${binary:Version}), openmpi-common (= ${source:Version}), libibverbs-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], libhwloc-dev Conflicts: openmpi-dev, libopenmpi-dev, openmpi-bin (<= 1.2.4-0) Description: high performance message passing library -- header files @@ -61,7 +61,7 @@ Description: high performance message pa Package: libopenmpi1.6 Section: libs -Architecture: alpha amd64 armel armhf arm64 i386 ia64 powerpc powerpcspe ppc64 ppc64el sparc sparc64 kfreebsd-i386 kfreebsd-amd64 hurd-i386 mips64 mips64el mips mipsel +Architecture: alpha amd64 armel armhf arm64 hppa i386 ia64 powerpc powerpcspe ppc64 ppc64el sparc sparc64 kfreebsd-i386 kfreebsd-amd64 hurd-i386 mips64 mips64el mips mipsel Depends: ${shlibs:Depends}, ${misc:Depends} Conflicts: openmpi-libs0, libopenmpi1, libopenmpi1.3, libopenmpi2 Replaces: openmpi-checkpoint (<< 1.6.5-1) @@ -108,7 +108,7 @@ Description: high performance message pa Package: libopenmpi1.6-dbg Section: debug -Architecture: alpha amd64 armel armhf arm64 i386 ia64 powerpc powerpcspe ppc64 ppc64el sparc sparc64 kfreebsd-i386 kfreebsd-amd64 hurd-i386 mips64 mips64el mips mipsel +Architecture: alpha amd64 armel armhf arm64 hppa i386 ia64 powerpc powerpcspe ppc64 ppc64el sparc sparc64 kfreebsd-i386 kfreebsd-amd64 hurd-i386 mips64 mips64el mips mipsel Depends: ${misc:Depends}, openmpi-bin (= ${binary:Version}), libopenmpi1.6 (= ${binary:Version}) Conflicts: openmpi-dbg, libopenmpi-dbg Description: high performance message passing library -- debug library diff -up ./opal/config/opal_config_asm.m4.org ./opal/config/opal_config_asm.m4 --- ./opal/config/opal_config_asm.m4.org 2015-01-31 17:54:57.409541868 +0100 +++ ./opal/config/opal_config_asm.m4 2015-01-31 17:57:50.437879146 +0100 @@ -936,6 +936,12 @@ AC_DEFUN([OMPI_CONFIG_ASM],[ OMPI_GCC_INLINE_ASSIGN='"mov %0, #0" : "=&r"(ret)' ;; + hppa*) + ompi_cv_asm_arch="HPPA" + OPAL_ASM_SUPPORT_64BIT=0 + OMPI_GCC_INLINE_ASSIGN='"copy 0,%0" : "=&r"(ret)' + ;; + mips-*|mipsel-*) ompi_cv_asm_arch="MIPS" OPAL_ASM_SUPPORT_64BIT=0 diff -up ./opal/include/opal/sys/architecture.h.org ./opal/include/opal/sys/architecture.h --- ./opal/include/opal/sys/architecture.h.org 2015-01-31 18:02:05.554380962 +0100 +++ ./opal/include/opal/sys/architecture.h 2015-01-31 18:02:31.014431327 +0100 @@ -37,6 +37,7 @@ #define OMPI_SPARCV9_64 0062 #define OMPI_MIPS 0070 #define OMPI_ARM 0100 +#define OMPI_HPPA 0110 /* Formats */ #define OMPI_DEFAULT 1000 /* standard for given architecture */ diff -up ./opal/include/opal/sys/atomic.h.org ./opal/include/opal/sys/atomic.h --- ./opal/include/opal/sys/atomic.h.org 2015-01-31 18:03:17.054522533 +0100 +++ ./opal/include/opal/sys/atomic.h 2015-01-31 21:04:42.905730008 +0100 @@ -154,6 +154,8 @@ typedef struct opal_atomic_lock_t opal_a #include "opal/sys/ia32/atomic.h" #elif OPAL_ASSEMBLY_ARCH == OMPI_IA64 #include "opal/sys/ia64/atomic.h" +#elif OPAL_ASSEMBLY_ARCH == OMPI_HPPA +#include "opal/sys/hppa/atomic.h" #elif OPAL_ASSEMBLY_ARCH == OMPI_MIPS #include "opal/sys/mips/atomic.h" #elif OPAL_ASSEMBLY_ARCH == OMPI_POWERPC32 diff -up ./opal/include/opal/sys/hppa/atomic.h.org ./opal/include/opal/sys/hppa/atomic.h --- ./opal/include/opal/sys/hppa/atomic.h.org 2015-01-31 20:57:06.588811253 +0100 +++ ./opal/include/opal/sys/hppa/atomic.h 2015-01-31 21:04:11.281666043 +0100 @@ -0,0 +1,95 @@ +/* -*- 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-2013 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) 2011 Sandia National Laboratories. All rights reserved. + * Copyright (c) 2014 Los Alamos National Security, LLC. All rights + * reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#ifndef OPAL_SYS_ARCH_ATOMIC_H +#define OPAL_SYS_ARCH_ATOMIC_H 1 + +/********************************************************************** + * + * Memory Barriers + * + *********************************************************************/ +#define OPAL_HAVE_ATOMIC_MEM_BARRIER 1 + +static inline void opal_atomic_mb(void) +{ + __sync_synchronize(); +} + +static inline void opal_atomic_rmb(void) +{ + __sync_synchronize(); +} + +static inline void opal_atomic_wmb(void) +{ + __sync_synchronize(); +} + +#if OPAL_WANT_SMP_LOCKS +#define MB() opal_atomic_mb() +#else +#define MB() +#endif + +/********************************************************************** + * + * Atomic math operations + * + *********************************************************************/ + +#define OPAL_HAVE_ATOMIC_CMPSET_32 1 +static inline int opal_atomic_cmpset_acq_32( volatile int32_t *addr, + int32_t oldval, int32_t newval) +{ + return __sync_bool_compare_and_swap(addr, oldval, newval); +} + + +static inline int opal_atomic_cmpset_rel_32( volatile int32_t *addr, + int32_t oldval, int32_t newval) +{ + return __sync_bool_compare_and_swap(addr, oldval, newval);} + +static inline int opal_atomic_cmpset_32( volatile int32_t *addr, + int32_t oldval, int32_t newval) +{ + return __sync_bool_compare_and_swap(addr, oldval, newval); +} + +#define OPAL_HAVE_ATOMIC_MATH_32 1 + +#define OPAL_HAVE_ATOMIC_ADD_32 1 +static inline int32_t opal_atomic_add_32(volatile int32_t *addr, int32_t delta) +{ + return __sync_add_and_fetch(addr, delta); +} + +#define OPAL_HAVE_ATOMIC_SUB_32 1 +static inline int32_t opal_atomic_sub_32(volatile int32_t *addr, int32_t delta) +{ + return __sync_sub_and_fetch(addr, delta); +} + +#define OPAL_HAVE_ATOMIC_CMPSET_64 0 + +#endif /* ! OPAL_SYS_ARCH_ATOMIC_H */ diff -up ./opal/include/opal/sys/hppa/Makefile.am.org ./opal/include/opal/sys/hppa/Makefile.am --- ./opal/include/opal/sys/hppa/Makefile.am.org 2015-01-31 20:57:01.208800476 +0100 +++ ./opal/include/opal/sys/hppa/Makefile.am 2015-01-31 21:12:45.546714445 +0100 @@ -0,0 +1,23 @@ +# +# 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$ +# +# 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/hppa/atomic.h \ + opal/sys/hppa/timer.h diff -up ./opal/include/opal/sys/hppa/timer.h.org ./opal/include/opal/sys/hppa/timer.h --- ./opal/include/opal/sys/hppa/timer.h.org 2015-01-31 20:57:13.624825348 +0100 +++ ./opal/include/opal/sys/hppa/timer.h 2015-01-31 21:12:11.206644038 +0100 @@ -0,0 +1,34 @@ +/* + * 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$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#ifndef OMPI_SYS_ARCH_TIMER_H +#define OMPI_SYS_ARCH_TIMER_H 1 + + +typedef uint64_t opal_timer_t; + +static inline opal_timer_t +opal_sys_timer_get_cycles(void) +{ + return 0; +} + +#define OPAL_HAVE_SYS_TIMER_GET_CYCLES 0 + + +#endif /* ! OMPI_SYS_ARCH_TIMER_H */ diff -up ./opal/include/opal/sys/timer.h.org ./opal/include/opal/sys/timer.h --- ./opal/include/opal/sys/timer.h.org 2015-01-31 18:04:15.998639539 +0100 +++ ./opal/include/opal/sys/timer.h 2015-01-31 21:10:49.622476930 +0100 @@ -87,6 +87,8 @@ BEGIN_C_DECLS #include "opal/sys/ia32/timer.h" #elif OPAL_ASSEMBLY_ARCH == OMPI_IA64 #include "opal/sys/ia64/timer.h" +#elif OPAL_ASSEMBLY_ARCH == OMPI_HPPA +#include "opal/sys/hppa/timer.h" #elif OPAL_ASSEMBLY_ARCH == OMPI_POWERPC32 #include "opal/sys/powerpc/timer.h" #elif OPAL_ASSEMBLY_ARCH == OMPI_POWERPC64 diff -up ./opal/mca/timer/linux/configure.m4.org ./opal/mca/timer/linux/configure.m4 --- ./opal/mca/timer/linux/configure.m4.org 2015-01-31 18:04:47.006701197 +0100 +++ ./opal/mca/timer/linux/configure.m4 2015-01-31 18:05:34.778796331 +0100 @@ -45,7 +45,7 @@ AC_DEFUN([MCA_timer_linux_CONFIG],[ [timer_linux_happy="no"])]) case "${host}" in - i?86-*linux*|x86_64*linux*|ia64-*linux*|powerpc-*linux*|powerpc64-*linux*|sparc*-*linux*) + i?86-*linux*|x86_64*linux*|ia64-*linux*|powerpc-*linux*|powerpc64-*linux*|sparc*-*linux*|hppa*-*linux*) AS_IF([test "$timer_linux_happy" = "yes"], [AS_IF([test -r "/proc/cpuinfo"], [timer_linux_happy="yes"],