## 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..

Hi,

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.
w0ss4g3

Posts: 3
Joined: Thu Jan 26, 2012 10:30 am

### Re: Quite confused by the distrubted data..

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
Julie
admin
Site Admin

Posts: 612
Joined: Wed Dec 08, 2004 7:07 pm

### Re: Quite confused by the distrubted data..

Thanks very much - shall give it a try!
w0ss4g3

Posts: 3
Joined: Thu Jan 26, 2012 10:30 am

Return to Algorithm / Data

### Who is online

Users browsing this forum: No registered users and 1 guest