The LAPACK forum has moved to https://github.com/Reference-LAPACK/lapack/discussions.

Matrix distribution: pdgemr2d

Open discussion regarding features, bugs, issues, vendors, etc.

Matrix distribution: pdgemr2d

Postby Poshi » Thu Feb 28, 2008 2:24 pm

Hi there!

I'm trying to distribute a square matrix in the process grid. I found the pdgemr2d function to perform this process, but the documentation is not very good and I'm lost with the parameters.

My actual code is:
Code: Select all
N=8; nb=2;
sl_init (&context, &nr, &nc);
blacs_gridinfo (&context, &nr, &nc, &mr, &mc);
myARows = numroc (&N, &nb, &mr, &zero, &nr);
myACols = numroc (&N, &nb, &mc, &zero, &nc);
row = mr*nb;
column = mc*nb;
descinit (descA, &N, &N, &nb, &nb, &zero, &zero, &context, &myARows, &info);
descinit (descPA, &myCovarRows, &myACols, &nb, &nb, &zero, &zero, &context, &myARows, &info);
pdgemr2d (&N, &N, &A[0], &zero, &zero, &descA[0], &PA[0], &row, &column, &descPA[0], &context);


But I get errors like:
Code: Select all
??MR2D:Bad submatrix:i=-1,j=-1,m=8,n=8,M=8,N=8
??MR2D:Bad submatrix:i=-1,j=-1,m=8,n=8,M=8,N=8
??MR2D:Bad submatrix:i=-1,j=-1,m=8,n=8,M=8,N=8
??MR2D:Bad submatrix:i=-1,j=-1,m=8,n=8,M=8,N=8


I'm sure it has something to do with the dimension parameters of the matrix, but I don't get the point.

Could someone give me any advice? Is there any good documentation about the library somewhere?

BTW, this is C code calling fortran ScaLAPACK code. Compiling and linking without problems.

Thanks a lot!
Poshi
 
Posts: 1
Joined: Thu Feb 28, 2008 2:09 pm

Return to User Discussion

Who is online

Users browsing this forum: No registered users and 4 guests