Hi all. I am relatively new to MPI, and so this may be covered somewhere else, but I can't seem to find any links to tutorials mentioning any specifics, so perhaps someone here can help.
In C, I have a 3D array that I have dynamically allocated and access like Array[x][y][z]. I was hoping to calculate a subsection for each processor to work on, of size nx in the x dimension, ny in the y dimension, and the full Z dimension. Starting at Array[sx][sy][0] and going to Array[ex][ey][z] where ey-sy=ny. What is the best way to do this? I am able to calculate the neighboring processors and assign a sub-section of the XY dimensions to each processor, however I am having problems with sharing the border information of the arrays with the other processors. I don't really want to have to do a MPI_Send for each of the 0..Z slices's border information. I'd kind of like to process all of the Z, then share the full "face" of the border information with the neighbor processor. For example, if process 1 was the right neighbor of process zero, I'd want process zero to send Subarray[0..nx][ny][0..Z](the right most face) to processor 1's left-most face..assuming the X-Y plane was your screen, and the Z dimension extended into the screen. If anyone has any information that talks about how to use the MPI data types, or some other method, or wants to talk about how this might be done, I'm all ears. I know it is hard to talk about without pictures, so if you all like, I can post a picture explaning what I want to do. Thanks! Derek