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

gathering distributed matrix

oguren
Beginner
772 Views

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 Kudos
3 Replies
Alex_Kosenkov
Beginner
772 Views

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 Kudos
oguren
Beginner
772 Views

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 Kudos
Alex_Kosenkov
Beginner
771 Views

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 Kudos
Reply