Skip to Content.
Sympa Menu

charm - Re: [charm] barrier without reduction

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

Re: [charm] barrier without reduction


Chronological Thread 
  • From: "Kale, Laxmikant V" <kale AT illinois.edu>
  • To: Robert Steinke <rsteinke AT uwyo.edu>
  • Cc: "charm AT cs.illinois.edu" <charm AT cs.illinois.edu>
  • Subject: Re: [charm] barrier without reduction
  • Date: Tue, 12 Aug 2014 17:02:45 +0000
  • Accept-language: en-US
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm/>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>


Using the reducer type CkReduction::nop 
is a way to do that. (essentially, a barrier is a reduction with no data..). 

-----
Laxmikant (Sanjay) Kale         http://charm.cs.uiuc.edu
Professor, Computer Science     kale AT illinois.edu
201 N. Goodwin Avenue           Ph:  (217) 244-0094
Urbana, IL  61801-2302          FAX: (217) 265-6582


On Aug 12, 2014, at 9:43 AM, Robert Steinke <rsteinke AT uwyo.edu> wrote:

Is there a way in Charm++ to do a barrier without doing a reduction?

I have a situation where I need a chare group to do six barriers through a sequence of code.  Having them do a reduction to the main chare and then have the main chare send a message to proceed is bloating the code.  I don't need to do a reduction to produce a value.  I just need a barrier.  It would be nice if I could just put a barrier statement in the charm group code.

I suppose one solution would be to call MPI_Barrier directly, but I don't like that solution.  First of all, is it safe to do that from within my Charm++ code?  Will it always be safe in future versions of Charm++?  It seems like a dangerous use of undocumented functionality.  Also, the code would not be portable to Charm++ installs that were not compiled to use MPI.

For anyone who is curious why I need six barriers, this group is using a parallel library to write NetCDF files.  Every member must perform define actions where they specify what variables are in the file.  Then they all perform data actions where they write values to those variables.  Then they all must close the file.  The define actions of all group members must be done before any group member performs a data action, and the data actions of all group members must be done before any group member closes the file.  I need two barriers per file and they are doing this for three files so I need six barriers.  This is an infrequent operation so speed is not much of an issue, just code bloat.

Bob Steinke

_______________________________________________
charm mailing list
charm AT cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/charm

-----
Laxmikant (Sanjay) Kale         http://charm.cs.uiuc.edu
Professor, Computer Science     kale AT illinois.edu
201 N. Goodwin Avenue           Ph:  (217) 244-0094
Urbana, IL  61801-2302          FAX: (217) 265-6582







Archive powered by MHonArc 2.6.16.

Top of Page