You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an MPI collective call, so all ranks must pass an index_out Node, but only one rank fills the Node with any data. Looks like it will be rank 0 as long as it has any domains on that rank, but in general you don't know. This means that the calling code needs to inspect index_out before doing anything with it subsequently, especially if it intends to pass it along to something that expects a non-empty Node.
I can deal with this by inspecting the DataType of the Node, and if it's an object, it must contain the generated index, but would it make sense to add something to to API that explicitly tells us which rank has the index in the Node? Some possibilities would be to make the rank the return value, or to add an Node& info to the signature as a place to put a small amount of metadata.
The text was updated successfully, but these errors were encountered:
Thanks for the feedback -- I think I should simply fix to broadcast so that all ranks get the resulting index.
Seems like the easiest interface contract?
That's fine--I thought it may have been a choice to avoid the broadcast overhead. When I first looked at this, I assumed that the index would exist everywhere.
Just a comment/suggestion about this function in conduit::blueprint::mpi::mesh
This is an MPI collective call, so all ranks must pass an
index_out
Node, but only one rank fills the Node with any data. Looks like it will be rank 0 as long as it has any domains on that rank, but in general you don't know. This means that the calling code needs to inspectindex_out
before doing anything with it subsequently, especially if it intends to pass it along to something that expects a non-empty Node.I can deal with this by inspecting the DataType of the Node, and if it's an object, it must contain the generated index, but would it make sense to add something to to API that explicitly tells us which rank has the index in the Node? Some possibilities would be to make the rank the return value, or to add an
Node& info
to the signature as a place to put a small amount of metadata.The text was updated successfully, but these errors were encountered: