diff --git a/44a66e208c5771e0897bcf27430a3afa171ba4c2.patch b/44a66e208c5771e0897bcf27430a3afa171ba4c2.patch new file mode 100644 index 0000000..bb256aa --- /dev/null +++ b/44a66e208c5771e0897bcf27430a3afa171ba4c2.patch @@ -0,0 +1,43 @@ +From 44a66e208c5771e0897bcf27430a3afa171ba4c2 Mon Sep 17 00:00:00 2001 +From: Gilles Gouaillardet +Date: Wed, 7 Sep 2016 08:49:20 +0900 +Subject: [PATCH] threads: fix WAIT_SYNC_INIT with a zero count + +WAIT_SYNC_INIT(sync,0); WAIT_SYNC_RELEASE(sync); +hanged because sync->signaled was initialised to true, and +there is no reason to invoke WAIT_SYNC_SIGNALED(sync) before +WAIT_SYNC_RELEASE(sync) +this commit initializes sync->signaled to true unless the count is zero. + +Thanks George for the review and guidance. +--- + opal/threads/wait_sync.h | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/opal/threads/wait_sync.h b/opal/threads/wait_sync.h +index 9ebb4d7..2ec8485 100644 +--- a/opal/threads/wait_sync.h ++++ b/opal/threads/wait_sync.h +@@ -6,6 +6,8 @@ + * Copyright (c) 2016 Los Alamos National Security, LLC. All rights + * reserved. + * Copyright (c) 2016 Mellanox Technologies. All rights reserved. ++ * Copyright (c) 2016 Research Organization for Information Science ++ * and Technology (RIST). All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow +@@ -86,11 +88,11 @@ static inline int sync_wait_st (ompi_wait_sync_t *sync) + + #define WAIT_SYNC_INIT(sync,c) \ + do { \ +- (sync)->count = c; \ ++ (sync)->count = (c); \ + (sync)->next = NULL; \ + (sync)->prev = NULL; \ + (sync)->status = 0; \ +- (sync)->signaling = true; \ ++ (sync)->signaling = (0 != (c)); \ + if (opal_using_threads()) { \ + pthread_cond_init (&(sync)->condition, NULL); \ + pthread_mutex_init (&(sync)->lock, NULL); \ diff --git a/openmpi.spec b/openmpi.spec index e126380..97fedf7 100644 --- a/openmpi.spec +++ b/openmpi.spec @@ -22,7 +22,7 @@ Name: openmpi%{?_cc_name_suffix} Version: 2.0.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Open Message Passing Interface Group: Development/Libraries License: BSD, MIT and Romio @@ -34,6 +34,8 @@ Source1: openmpi.module.in Source2: openmpi.pth.py2 Source3: openmpi.pth.py3 Source4: macros.openmpi +# threads: fix WAIT_SYNC_INIT with a zero count +Patch0: https://github.com/open-mpi/ompi/commit/44a66e208c5771e0897bcf27430a3afa171ba4c2.patch BuildRequires: gcc-gfortran %ifnarch s390 s390x @@ -127,7 +129,7 @@ Contains development wrapper for compiling Java with openmpi. %global namearch openmpi-%{_arch}%{?_cc_name_suffix} %prep -%setup -q -n openmpi-%{version} +%autosetup -p1 %build ./configure --prefix=%{_libdir}/%{name} \ @@ -274,6 +276,9 @@ make check %changelog +* Mon Oct 24 2016 Orion Poplawski - 2.0.1-2 +- Add upstream patch for thread wait issue with mpi4py + * Fri Oct 21 2016 Orion Poplawski - 2.0.1-1 - Update to 2.0.1