Quite confused by the distributed data..

Post here if you have a question about LAPACK or ScaLAPACK algorithm or data format

Quite confused by the distributed data..

Postby w0ss4g3 » Thu Jan 26, 2012 10:43 am


I have a large block diagonal matrix which I have computed using serial code. I essentially want to calculate the cholesky factorisation of each block using the scalapack routine PDPOTRF. My problem is that I cannot figure out how to generalise some of the parameters for the array descriptor. Note: I'm working in fortran.

Anyway, I have got through most of the examples and documentation and am at the stage where I have to set the various parameters ready to call the routine DESCINIT( DESC, M, N, MB, NB, IRSRC, ICSRC, ICTXT,LLD, INFO ).

I know that DESC is an integer array of size 9. M and N are equal to the global size of my matrix (M=N in this case). MB and NB is the dimension of my process grid (MB=NB too). then IRSRC and ICSRC are both zero (as I'm going to put the first entry of the matix into the process 0. ICTXT comes from a call to SL_INIT and BLACS_GRIDINFO. Which leaves me with LLD.

I simply don't quite understand how to calculate this value. Could someone give me an explanation how to do this for a matrix of size NxN, possibly with an example?

Moreover, if someone has any example code where an existing matrix NxN matrix is distributed, that would be very helpful. I just can't quite follow the example code from the documentation here.

Thanks a lot in advance for any help! - I should probably say I'm an applied mathematician and have not got a huge amount of experience using libraries.. which hopefully explains my confusion a little? :)
Last edited by w0ss4g3 on Thu Jan 26, 2012 12:31 pm, edited 1 time in total.
Posts: 3
Joined: Thu Jan 26, 2012 10:30 am

Re: Quite confused by the distrubted data..

Postby admin » Thu Jan 26, 2012 11:03 am

Look at he header file of descinit for more info
http://www.netlib.org/scalapack/explore ... ource.html

Once you compute the size of the local matrices (thanks to numroc)
np = numroc_( n , nb, myrow, 0, nprow );
nq = numroc_( n , nb, mycol, 0, npcol );
Just set lld to the following
lld = max( 1, np );

Hope it helps
Site Admin
Posts: 468
Joined: Wed Dec 08, 2004 7:07 pm

Re: Quite confused by the distrubted data..

Postby w0ss4g3 » Thu Jan 26, 2012 12:07 pm

Thanks very much - shall give it a try!
Posts: 3
Joined: Thu Jan 26, 2012 10:30 am

Return to Algorithm / Data

Who is online

Users browsing this forum: Google [Bot] and 1 guest