Depending on the datatype and its order in memory, the “Block,*” and “*,Block” (which we used to call “slabs” in 3D) may be implemented by a simple scatter/gather call in MPI. The “Block,Block” distribution is a little more complex, but if you take advantage of MPI’s derived datatypes, you may be able to reference an arbitrary 3D sub-space as a single data entity and then use gather/scatter with that.
I recommend that look through some of the examples in “MPI – The Complete Reference (Vol. 1)” by Snir, et.al. for use of MPI_Gather(), MPI_Scatter(), as well as the section on user-defined datatypes. Section 5.2 of “Using MPI” by Gropp, Lusk and Skjellum has an example code for an N-Body Problem which you may find useful.
Hope this helps.
users mailing list