Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

gathering distributed matrix

oguren
初学者
1,762 次查看

Hi,

I want to gather block cyclic distributed matrix( with scalapack routine) in a global matrixat root processor. is there any function in mkl library to use for?It can be done with using MPI_Send and Recv or MPI_Gathervfunctions, but maybe there is an efficient function in scalapack.

Thanks,

Regards

0 项奖励
3 回复数
Alex_Kosenkov
初学者
1,762 次查看

Hello, oguren

Please try PDLACP3. Hope this will help.


SUBROUTINE PDLACP3( M, I, A, DESCA, B, LDB, II, JJ, REV )

* Purpose

* =======

* PDLACP3 is an auxiliary routine that copies from a global parallel

* array into a local replicated array or vise versa. Notice that

* the entire submatrix that is copied gets placed on one node or

* more. The receiving node can be specified precisely, or all nodes

* can receive, or just one row or column of nodes.

Best regards,

Alexander

0 项奖励
oguren
初学者
1,762 次查看

Thanks for your reply. if I'm not wrong, it copies square matrix. I need a general function to gather A(MxP) matrix at root. It is distributedon processors as size of (mAxnA).

Regards

Input Parameters

m

(global) INTEGER.

m is the order of the square submatrix that is copied.

m 0. Unchanged on exit.

i

(global) INTEGER. A(i, i) is the global location that the copying starts from. Unchanged on exit.

0 项奖励
Alex_Kosenkov
初学者
1,761 次查看

Indeed it does copy a square submatrix.

So I assume that you can either copy square submatrix and then all remaining square submatrices or either use p?lacp2 or p?lacpy (sure, they do copy one distributed submatrix into another distributed matrix - but the local matrix is nothing more than the matrix distributed over one node)

0 项奖励
回复