Project

General

Profile

Bug #1811

Cross array section reduction and multicast with callback set at contribute time

Added by Eric Bohm 4 months ago. Updated 3 months ago.

Status:
In Progress
Priority:
Normal
Category:
-
Target version:
-
Start date:
02/21/2018
Due date:
% Done:

0%


Description

Cross array sections and multicasts have basic testing in mega test.

Cross array section reductions have questionable support.

To test this, create several arrays that are all different instances of the same type. Create a section across those arrays that uses only a few elements of each.

Initiatlize those sections, record the cookie in each section element.

Create a multiphase test that triggers computation in a broadcast to all arrays. Have each element that is in a section contribute to their section with a callback to a single element function target (could be in main). Then initiate another phase via a broadcast on all arrays and have the same section operation reduce back to a different callback function target.

Verify that each function root is only invoked once and that it has a contribution from each element in the section.

History

#1 Updated by Eric Bohm 4 months ago

  • Assignee set to Raghavendra Kanakagiri

#2 Updated by Raghavendra Kanakagiri 4 months ago

For the cross array section reduction to work the reduction client should be set first.
The example code in:

~/charm/examples/charm++/hello/xarraySection

is wrong, and should be changed to incorporate setReductionClient().
mcastMgr->setReductionClient(sectionProxy, new CkCallback(CkReductionTarget(Main,rednPong), thisProxy));

after
sectionProxy.ckSectionDelegate(mcastMgr);

and in the mcastPing():
mcastMgr->contribute(sizeof(int), &(msg->hiNo), CkReduction::sum_int, sectionCookie);

If the reduction client is not set, the program does not throw any error, but the reduction produces a wrong output.
Should add a new example (Juan's) to the code base.

#3 Updated by Eric Bohm 4 months ago

Is the callback version broken? The desired functionality is that one can pass any reduction target as the destination in the callback.

Our typical use case is that we make a section, initialize it with a multicast so every member can record the cookie. Then they contribute back to something in startup so that the computation can proceed with the guarantee that the section reduction will work. Then when suitable conditions are met, reductions go along the tree to other reduction roots. Such as a termination callback when all beads are minimized, or a synchronization callback for temper exchange when all tempers have hit the temper exchange iteration.

#5 Updated by Raghavendra Kanakagiri 3 months ago

  • Status changed from New to In Progress

#6 Updated by Raghavendra Kanakagiri 3 months ago

  • Status changed from In Progress to Implemented

#7 Updated by Raghavendra Kanakagiri 3 months ago

  • Status changed from Implemented to In Progress

Also available in: Atom PDF