-
Hi all, I have a question related to running Charm++-based data-analysis and visualization (DAV) routines within the Lulesh code, which also uses Charm++. The domain is decomposed into a 3D chare array in the beginning of the execution. What I’m trying to do is to add some in situ DAV as part of the execution. My DAV dataflow also uses a chare array, a 1D chare array. Basically, I’m in a situation where I need to create this 1D chare array from within one of the chares in the 3D chare array. To maintain decoupling I don’t want to create the 1D array for DAV in the main chare. Is it possible at all? If it is, how one can communicate the proxy for this 1D array to other chares of the 3D array? Because each chare of the 3D chare array will need to pass local data to the appropriate 1D chare. Thanks in advance! -Sergei |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi Sergei, it is possible to create a chare array from within another. Once created, you can simply broadcast the proxy of the 1D array to the chares of the 3D array. There is however one small caveat: currently arrays can only be created on PE 0. So if you make sure that the 3D chare array creates the 1D array from a chare on PE 0, then you can just do it the same way you'd do it as if you were creating the new array from the main chare. However, if you want it to be more flexible/general, you can use the API for asynchronous array creation, which allows you to create an array from any PE. That API is described in the manual in section 2.3.4.2.7 (https://charm.readthedocs.io/en/latest/charm++/manual.html#more-chare-array-features). When using this, you would need to pass a callback to array creation that would get called once the array is created, and you could use a callback which broadcasts the array ID for the new array to the 3D chare array, for example. If you have any further questions let me know. |
Beta Was this translation helpful? Give feedback.
Hi Sergei, it is possible to create a chare array from within another. Once created, you can simply broadcast the proxy of the 1D array to the chares of the 3D array. There is however one small caveat: currently arrays can only be created on PE 0. So if you make sure that the 3D chare array creates the 1D array from a chare on PE 0, then you can just do it the same way you'd do it as if you were creating the new array from the main chare.
However, if you want it to be more flexible/general, you can use the API for asynchronous array creation, which allows you to create an array from any PE. That API is described in the manual in section 2.3.4.2.7 (https://charm.readthedocs.io/en/latest/ch…