Community
cancel
Showing results for 
Search instead for 
Did you mean: 
yongbei_ma_
New Contributor I
194 Views

is there some mkl function for transposing rectangle matrix in mpi?

0 Kudos
3 Replies
Ying_H_Intel
Employee
194 Views

Hi yongbei m.

It seems two questions here

R1. transposing function 

R2. MPI support 

So are you working on large matrix , which are distributed on nodes in a cluster? 

You may check the MKL manual

for R1.

mkl_?imatcopy
Performs scaling and in-place transposition/copying of
matrices

mkl_?omatcopy
Performs scaling and out-place transposition/copying
of matrices.
Syntax
Fortran:
call mkl_somatcopy(ordering, trans, rows, cols, alpha, a, lda, b, ldb)
call mkl_domatcopy(ordering, trans, rows, cols, alpha, a, lda, b, ldb)
call mkl_comatcopy(ordering, trans, rows, cols, alpha, a, lda, b, ldb

For R2, 

Please see ScaLAPACK Auxiliary and Utility Routines 7,which support MPI.  But seems no direct function of the purpose.

On the other hand, as you see, most of function of Scalapack support Transpose as input.  What is the follow operation after you get the transpose of the matrix?   it would be better if there are chance to combine the transpose and other functionality together.   

Best Regards,

Ying

Sebastian_L_1
Beginner
194 Views

Hey Yongbei, maybe the functions pstran/pdtran/pctranu/pztranu are what you are looking for? These PBLAS functions should "Transpose a distributed real/complex matrix". I haven't used these functions, yet. I wonder a little bit, why the MPI communicator is not needed in function call. Maybe someone else is experienced with pctran? Unfortunately there are no p?tran examples provided in the Intel installation. Best regards Sebastian
Ying_H_Intel
Employee
194 Views

Hi Sebastian, 

thanks for the reply.  right, these functions should be able to transposes a distributed matrix.   The function call is like below pstran(m, n, alpha, a, ia, ja, desca, beta, c, ic, jc, descc),  but it does need mpi communicator out of functions, also  need create desca, descc, which have the position and mpi rank information. So the function don't need MPI communicator itself, but encaps  MPI communicator internally. . 
We have some discussion about the matrix distrubution and MKL PBLAS function call  in forum thread like 

https://software.intel.com/en-us/forums/topic/561007

https://software.intel.com/en-us/forums/topic/562259. ;

It also include some examples. You can distribute the matrix manually like the sample or call functions, pstran, psadd (also suppose transpose) You may refer to them. 

Best Regards,

Ying 

 

Reply