>Sorry for the delay in replying -- we were all at a working group
>meeting last week, and I fell behind on e-mail.
It doesn't matter :) Thanks for your reply anyway.
>This should actually work just fine -- you have told MPI that you want
>to reduce 1 instance of data represented by the CSData datatype. Are
>you intending something else?
>MPI_Reduce does not require contiguous buffers.
>You can supply any buffer, count, and datatype to MPI_Reduce, assuming
>that the reduction function associated with the MPI_Op that you use
>understands the datatype and structure of the buffers that it will
>receive. Pre-defined MPI operations only understand certain datatypes
>(e.g., if you try to MPI_SUM on a user-defined datatype, it won't
>work). But if you're defining your own reduction operation, assumedly
>you can write your own callback function that understands the data
>structure (e.g., checkerboard) without all the extra copying.
>Specifically, you should be able to reduce directly to your target
>buffers without extra copying.
>Hope that helps.
Thanks. I understand now. But may I ask another question, as you
mentioned above, will all the nodes calling MPI_Reduce send the entire
buffer or just the data specified by CSData be sent?
Thanks in advance.
|