Function declaration in the header file:
- Code: Select all
void pdgesv_( int * n, int * nrhs, double * A, int * ia, int * ja, int * desca, int * ipiv,
double * b, int * ib, int * jb, int * descb, int * info );
Most examples use PDLAPRNT to access the results. Everything prints out fine when I have the following code:
- Code: Select all
pdgesv_( &N, &uno, A, &uno, &uno, desca, ipiv, b, &uno, &uno, descb, &info );
Cpdlaprnt( &N, &uno, b, &uno, &uno, descb, &zero, &zero, "x", &sei, work );
However, I am unable to figure out how to programmatically access the resulting vector saved to b. When I simply run through the elements of b as shown in the code below, I get half the result vector appearing correct, and the other half a mixture of zeros or NaNs.
- Code: Select all
for(int i=1;i<=N;i++) fprintf(fp_scalapack,"%d %f \n",i,b[i]);
Is there an established way of accessing the results, beyond PDLAPRNT?

