Skip to Content.
Sympa Menu

charm - Re: [charm] insertInitial

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

Re: [charm] insertInitial


Chronological Thread 
  • From: Jozsef Bakosi <jbakosi AT gmail.com>
  • To: "charm AT cs.uiuc.edu" <charm AT cs.uiuc.edu>
  • Subject: Re: [charm] insertInitial
  • Date: Thu, 26 Jan 2017 08:17:06 -0700

Hello again,

Digging into this a little further, I noticed that the same(?) problem may also appear when chare array elements are created (inserted) on all PEs into a previously created chare array that is empty. For example when each of a number of chare group element (residing on different PEs) fires up multiple array elements, by using insert(), the same assert is triggered in ckarray.C:780. I traced this back to these two commits:

356327636f "Assert that chare arrays are only created on PE 0 to support 64-bit ID construction" which really enables this and the one one that puts it in as comments:

d71fcf194f "Add asynchronous array construction API for post-startup use cases

When a chare array is created using this API, the callback function
receives a message, m, that contains the array id (m->aid).

This is necessary to provide positive array manager group IDs.

In future, when 64 bit ID is adopted, we want the group IDs to be
limited to a smaller compact range, hence the need to create them on
PE0. This API will enable us to force that requirement."

So it seems like that with my current use case this is not necessarily true since CkCreateArray() is apparently called on a PE that is not PE0: I do create my array (with CkNew) from a single chare (i.e., not an array or a group) as well as a group from which later I use insert to create new array elements. Note that I did this originally, because I wanted to create a potentially large number of array elements in a distributed/parallel fashion, i.e., spawning them from group elements residing on different PEs as a tree.

Does this mean that in the future this is not really a good design? What are ways of solving this problem? Is that assert really necessary?

Thanks,
Jozsef

On Tue, Jan 24, 2017 at 1:14 PM, Jozsef Bakosi <jbakosi AT gmail.com> wrote:
Hi folks,

It used to be CkArrMgr::insertInitial( int, ... ) which now takes const CkArrayIndex &idx as its first argument. I see in the online documentation that I could pass CkArrayIndex2D(x,y). I used to pass an int 'e'. What is the simplest conversion to CkArrayIndex? Looking at the constructors, I have tried CkArrayIndex(e) and CkArrayIndex1D(e), but I trigger this assertion with multiple PEs:

[2] Assertion "CkMyPe() == 0" failed in file ckarray.C line 780.

How should I convert using an int to a CkArrayIndex passed to insertInitial()?

Thanks,
Jozsef




Archive powered by MHonArc 2.6.19.

Top of Page