aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Bock <nicolasbock@gmail.com>2013-09-11 11:26:47 -0600
committerNicolas Bock <nicolasbock@gmail.com>2013-09-11 11:26:47 -0600
commit64302b37bf4fb940d3eb260d51b491b111094485 (patch)
treeaff0f63d98fc1d16b41d7be80e798f4867097b29 /sys-cluster/charm/files
parentMerge pull request #80 from gerddie/master (diff)
downloadsci-64302b37bf4fb940d3eb260d51b491b111094485.tar.gz
sci-64302b37bf4fb940d3eb260d51b491b111094485.tar.bz2
sci-64302b37bf4fb940d3eb260d51b491b111094485.zip
Added patch to fix bug in CkReductionMgr::reduceMessages().
This issues has been reported upstream (issue #287). Package-Manager: portage-2.2.1
Diffstat (limited to 'sys-cluster/charm/files')
-rw-r--r--sys-cluster/charm/files/charm-6.5.1-CkReductionMgr.patch34
1 files changed, 34 insertions, 0 deletions
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
+