[MPICH] about MPI_Reduce
llwaeva at 21cn.com
llwaeva at 21cn.com
Mon Oct 17 09:29:37 CDT 2005
Hi there,
I use LAM/MPI under Linux and change to MPICH now. A similar question
about MPI_Reduce has been asked in the forum of LAM/MPI months ago. I
get some information from that reply but still have a question about that. I am
wondering if there is any way to reduce a data of a special datatype(like
checkboard-shape, with data located on the black grid)
It is easy to create such datatype(says CSData), however, the following
calling is invalid in MPI as mentioned before
MPI_Reduce( &src, &dest, 1, CSData, myOp, 0, MPI_COMM_WORLD);
MPI_Reduce knows nothing about the CSData and only ONE element will be
reduced actually.
I am going to reduce the data limited by CSData. For that, I will first
copy all data needed into a temporary buffer and then reduce the buffer, at
last copy the buffer to the destionation accordingly to the checkboard
structure. This method is too raw and the inefficient. I am looking for a
better way!
More information about the mpich-discuss
mailing list