Hi, I have written an outboard module that imports data via MPI (message passing) instead of reading files. For that, on initial execution it spawns a thread which henceforth listens to 'the simulation program' (as that is parallelized, it's actually a little more complicated), and each time it gets new data it calls the module function which then incorporates that data into a field and outputs it to the DX net.

This works (ignoring some other unsolved problems ;-) as long as the module function each time creates an entirely new field from the received data. The Programmer's Reference already dims hopes to be able to simply write the new data directly into the old object: "After a call to DXEndField, pointers obtained by calls to DXGetArrayData to data contained in Arrays that are components of a Field cannot be assumed valid." Is there no way to circumvent this limitation, short of creating a variant of DXEndField in order to get valid pointers?

Not knowing a solution to that problem, I thought I might just use DXSetComponentValue and take the pain (performance-wise) to replace the whole array instead of just overwriting parts of it. But even this did not work. Apparently, not even outputting the (static) field in its unchanged form is possible: When the module function tries to return a field defined in a previous execution, I get "Bad class: bad object returned as output 0 from outboard module". Which results in my question #2: Is it wrong to expect the field to survive a net execution?

In case I am unlucky and the answers to the above questions are 'yes', maybe somebody can give a hint on how the partial replacement of already outputted fields can be achieved without continuous re-creation of all fields and thus continuous copying of all data in memory. It seems like an awful waste...

Thanks in advance!


--
Urs Enke <[EMAIL PROTECTED]>

High-Performance Computing
Center for Computing and Communication
RWTH Aachen University

Reply via email to