简体   繁体   English

ScaLAPACK中大小不同的块?

[英]Blocks of different sizes in ScaLAPACK?

I am performing a Cholesky factorization with Intel-MKL, which uses ScaLAPACK. 我正在使用ScaLAPACK的Intel-MKL执行Cholesky分解。 I distributed the matrix, based on this example , where the matrix is distributed in blocks, which are of equal size (ie Nb x Mb). 基于此示例 ,我分配了矩阵,其中矩阵按大小相等(即Nb x Mb)的块分布。 I tried to make it so that every block has it's own size, depending on which process it belongs, so that I can experiment more and maybe get better performance. 我试图做到这一点,以便每个块都有它自己的大小,这取决于它属于哪个进程,以便我可以进行更多的实验,也许可以获得更好的性能。

Check this question , in order to get a better understanding of what I am saying. 请检查此问题 ,以更好地理解我的意思。 I won't post my code, since it's too big (yes the minor example is too big too, I checked) and the distribution seems to work well. 我不会发布我的代码,因为它太大了(是的,较小的示例也太大了,我检查过),并且发行似乎很好。 However, ScaLAPACK seems to assume that the matrix is distributed in blocks of equal size? 但是, ScaLAPACK似乎假设矩阵以相等大小的块分布?

For example, I am using this: 例如,我正在使用此:

int nrows = numroc_(&N, &Nb, &myrow, &iZERO, &procrows);
int ncols = numroc_(&M, &Mb, &mycol, &iZERO, &proccols);

where (taken from the manual ): 哪里(摘自手册 ):

NB (global input) INTEGER Block size, size of the blocks the distributed matrix is split into. NB(全局输入)INTEGER块大小,将分布式矩阵拆分成的块的大小。

So, does ScaLAPACK allow distributed matrices with non-equal block sizes? 那么, ScaLAPACK是否允许块大小不相等的分布式矩阵?


If I print information like this, for an 8x8 matrix: 如果我这样打印信息,则使用8x8矩阵:

std::cout << Nb << " " << Mb << " " << nrows << " " << ncols << " " << myid << std::endl;

I am getting this: 我得到这个:

3 3 5 5 0
1 1 4 4 1
1 1 4 4 2
1 1 4 4 3

and with by just swapping the first two block sizes, this: 只需交换前两个块大小,就可以了:

1 1 4 4 0
3 3 5 3 1
1 1 4 4 2
1 1 4 4 3

which doesn't make sense for an 8x8 matrix. 这对于8x8矩阵没有意义。

这里的回答,答案是否定的,不能有不同大小的块。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM