我正在使用 MPI 来解决 PDE。为此,我将 2D 域分解为不同的单元格(每个单元格的大小为 " xcell,ycell"xcell = size_x_domain/(number of X subdomains)和ycell = size_y_domain/(number of Y subdomains).
所以,我正在运行代码number of processes = (number of X subdomains)*(number of Y subdomains)
相对于顺序版本的好处是我在代表子域的每个进程之间进行通信。
下图说明了我对 8 个进程的细分(X 为 2 个子域,Y 为 4 个子域):
( xs,xe) 表示单元格的x_start和x_end,( ys,ye) 表示单元格的y_start和y_end
我想知道是否必须将i 索引设置为行索引,将j 设置为列x(i,j)索引?
将第一个索引放在 row 上,将第二个索引放在 column 上是一般规则吗?(例如,在 C、Fortran 和 Matlab 语言或更多语言中)
谢谢你的帮助。
