Project

General

Profile

Feature #1814

Add CkLoop Split Execution

Added by Ronak Buch 7 months ago. Updated 4 months ago.

Status:
New
Priority:
Normal
Category:
-
Start date:
02/26/2018
Due date:
% Done:

0%

Tags:

Description

Based on the documentation and code samples, the only way to currently use CkLoop is by calling the CkLoop_Parallelize function.

Issue #904 (https://charm.cs.illinois.edu/redmine/issues/904) added support for another function pointer to be passed to this function so that it can be run on the calling PE and overlap with the CkLoop work.

This seems unnecessarily opaque and restrictive. Instead, there should be a way to start and end CkLoop sections (CkLoop_Start() and CkLoop_Wait() or something like that) so that regular code can be inserted between the two calls. This would simplify and clarify the way users write overlapping tasks with CkLoop.

History

#1 Updated by Ronak Buch 7 months ago

  • Target version set to 7 (Next Generation Charm++)
  • Assignee set to Seonmyeong Bak

Assigning it to Seonmyeong since he's in charge of CkLoop now, but feel free to triage it.

#2 Updated by Seonmyeong Bak 7 months ago

I think adding an API to wait for all the spawned tasks is enough for this issue with some changes to the non-sync version.

In the current non-sync version, the call PE of the CkLoop work continues to work on the created work until the whole chunks are picked (not executed).
It doesn't wait only for the scheduled messages to be finished.

I think it's better to change the behavior of non-sync version with adding an API such as CkLoop_Wait.
e.g. ) Initiate CkLoop_Parallelize and return the CkLoop_Parallelize -> do its own work and call CkLoop_Wait. Within CkLoop_Wait, the call PE executes the left loop chunks in the created CkLoop work.

#3 Updated by Ronak Buch 7 months ago

Seonmyeong Bak wrote:

I think adding an API to wait for all the spawned tasks is enough for this issue with some changes to the non-sync version.

In the current non-sync version, the call PE of the CkLoop work continues to work on the created work until the whole chunks are picked (not executed).
It doesn't wait only for the scheduled messages to be finished.

I think it's better to change the behavior of non-sync version with adding an API such as CkLoop_Wait.
e.g. ) Initiate CkLoop_Parallelize and return the CkLoop_Parallelize -> do its own work and call CkLoop_Wait. Within CkLoop_Wait, the call PE executes the left loop chunks in the created CkLoop work.

Agreed, I think that the calling PE shouldn't execute the loop chunks until it calls CkLoop_Wait. There may be some utility to keeping the current scheme wherein passing numChunks = 0 runs the entire loop immediately on the calling PE, too.

#4 Updated by Sam White 5 months ago

  • Tags set to ckloop

#5 Updated by Sam White 4 months ago

  • Assignee changed from Seonmyeong Bak to Kavitha Chandrasekar

Also available in: Atom PDF