I have a C program in which I want to use ScaLAPACK to take a symmetric real tridiagonal matrix A and calculate its eigenvectors. First, I call pdstebz_ in order to calculate the eigenvalues of A. This completes successfully. Now I want to use pdstein_ in order to calculate the eigenvectors using the result of the output of the call to pdstebz_. It is important that I have both the eigenvalues and eigenvectors at the end.
Given the Fortran version here:
http://www.netlib.org/scalapack/double/pdstein.f
there are some input arguments which I don't fully understand.
Z: It specifies that the dimension of this is (DESCZ(DLEN_), N/npcol + NB), does this mean it's a 1D or 2D array?
IZ, JZ: Should these be 0 or something else?
DESCZ: I read the array descriptor information here:
http://www.netlib.org/scalapack/slug/node88.html
but none of these seem to match at first glance. What exactly do I need to put in here? Or, what function(s) do I need to call to get this array?
My current correct call to pdstebz_ is:
pdstebz_(&icontext, &arg2, &arg3, &c, &argdummy, &argdummy, &arg7, &arg8, &arg9, A, B, &M, &nsplit, W, iblock, isplit, work, &lwork, iwork, &liwork, &info);
My call to pdstein_ (which at the moment doesn't work) is:
pdstein_(&c, A, B, &c2, W, iblock, isplit, &orfac, Z, &zero, &zero2, descz, work2, &lwork2, iwork2, &liwork2, ifail, iclustr, gap, &info);
Currently, the code I use for initializing both MPI and Cblacs is:
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &numprocs);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
Cblacs_pinfo( &mype, &npe );
Cblacs_get( 0, 0, &icontext );
Cblacs_gridinit( &icontext, "R", 1, npe );
What other method calls do I need to make, if any, to get the information I need in order for pdstein to work properly?

