Chare array construction semantics differ wrt readonly array proxy on PE 0
When creating a chare array from a mainchare's main routine, on PE 0 chare array elements are created inline at the ckNew call, but for remote chare creation a message is sent after the inline calls complete. If the constructor for chare elements in this chare array makes use of a global variable for the proxy to its array (i.e. it sets the return value of ckNew as a global 'arrayProxy'), then this global value will be valid on all PEs except PE 0.
This arose in an application that used a global variable instead of 'thisProxy' in a chare array constructor to create a CkCallback for a later reduction. Since this global was undefined on PE 0, the reduction would fail with the message "Error! This group proxy has not been initialized!"
#5 Updated by Eric Mikida 4 months ago
Is this required for something important? As Nikhil mentioned above, I think inline array creation is fairly ingrained in the RTS to the point where certain applications depend on it (although they probably shouldn't). I know when the topic has come up before, there's been resistance in removing the inline creation. I also can't really think of any cases where you wouldn't just use 'thisProxy', or pass in the value of a different proxy. I can take a look into inline creation again and see if any changes over the past years have made it any less difficult to remove.