diff options
-rw-r--r-- | sys-cluster/charm/ChangeLog | 5 | ||||
-rw-r--r-- | sys-cluster/charm/charm-6.5.1.ebuild | 1 | ||||
-rw-r--r-- | sys-cluster/charm/files/charm-6.5.1-CkReductionMgr.patch | 34 |
3 files changed, 40 insertions, 0 deletions
diff --git a/sys-cluster/charm/ChangeLog b/sys-cluster/charm/ChangeLog index 60a0d00f3..f6f824c28 100644 --- a/sys-cluster/charm/ChangeLog +++ b/sys-cluster/charm/ChangeLog @@ -2,6 +2,11 @@ # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 11 Sep 2013; Nicolas Bock <nicolasbock@gmail.com> + +files/charm-6.5.1-CkReductionMgr.patch, charm-6.5.1.ebuild: + Added patch to fix bug in CkReductionMgr::reduceMessages(). This issues has + been reported upstream (issue #287). + 23 Jul 2013; Nicolas Bock <nicolasbock@gmail.com> +files/charm-6.5.1-cleanup-config.patch, charm-6.5.1.ebuild: sys-cluster/charm-6.5.1: Added patch to fix config.h The added patch diff --git a/sys-cluster/charm/charm-6.5.1.ebuild b/sys-cluster/charm/charm-6.5.1.ebuild index 5405952a2..9161c8fcb 100644 --- a/sys-cluster/charm/charm-6.5.1.ebuild +++ b/sys-cluster/charm/charm-6.5.1.ebuild @@ -90,6 +90,7 @@ src_prepare() { append-cflags -DALLOCA_H epatch "${FILESDIR}/charm-6.5.1-cleanup-config.patch" + epatch "${FILESDIR}/charm-6.5.1-CkReductionMgr.patch" } src_compile() { diff --git a/sys-cluster/charm/files/charm-6.5.1-CkReductionMgr.patch b/sys-cluster/charm/files/charm-6.5.1-CkReductionMgr.patch new file mode 100644 index 000000000..8387180f0 --- /dev/null +++ b/sys-cluster/charm/files/charm-6.5.1-CkReductionMgr.patch @@ -0,0 +1,34 @@ +From f9cc5724818141201ba201e698c21aea62ecd362 Mon Sep 17 00:00:00 2001 +From: Nicolas Bock <nicolasbock@gmail.com> +Date: Thu, 5 Sep 2013 04:04:06 -0600 +Subject: [PATCH] Fixed bug in CkReductionMgr::reduceMessages(). + +The first contribution of a child node is a single message. In this case +CkReductionMgr::reduceMessages() simply returns the message without calling +the reducer. However, when using the CkReduction::set reducer this behavior is +incorrect, and instead the reducer should be called even for one single +message so that the message is wrapped into a setElement struct. In the +current implementation, the reduction becomes corrupted because the +CkReduction::set() method one tier up in the reduction sizes the remote +contribution incorrectly assuming a setElement struct and not a simple +message. +--- + src/ck-core/ckreduction.C | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ck-core/ckreduction.C b/src/ck-core/ckreduction.C +index f2ac8cd..d94f5b1 100644 +--- a/src/ck-core/ckreduction.C ++++ b/src/ck-core/ckreduction.C +@@ -862,7 +862,7 @@ CkReductionMsg *CkReductionMgr::reduceMessages(void) + else + {//Use the reducer to reduce the messages + //if there is only one msg to be reduced just return that message +- if(nMsgs == 1){ ++ if(nMsgs == 1 && msgArr[0]->reducer != CkReduction::set) { + ret = msgArr[0]; + }else{ + if (msgArr[0]->reducer == CkReduction::random) { +-- +1.8.1.5 + |