MPI convention for index of rows and columns

一曲冷凌霜 提交于 2020-01-06 07:14:00

问题


I am using MPI for solving PDE. For this, I breakdown the 2D domain into different cells (size of each of these cells is "xcell,ycell" with xcell = size_x_domain/(number of X subdomains) and ycell = size_y_domain/(number of Y subdomains).

So, I am running the code with number of processes = (number of X subdomains)*(number of Y subdomains)

The gain relatively to sequential version is that I communicate between each process representing the sub-domains.

Here a figure illustrating my breakdown with 8 processes (2 subdomains for X and 4 for Y) :

(xs,xe) represent x_start and x_end of the cell, (ys,ye) represent y_start and y_end of the cell

I would like to know if I have to set, into x(i,j) array, i the index as row index and j as column index ?

Is it a general rule to put the first index for row and the second one for column ? ( for example, in C, Fortran and Matlab language or maybe more)

Thanks for your help.


回答1:


I'm not sure, but maybe try having a different flag for all 4 of the communications.



来源:https://stackoverflow.com/questions/46087715/mpi-convention-for-index-of-rows-and-columns

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!