PDGESV - Programmatically accessing results? (ScaLAPACK)

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

PDGESV - Programmatically accessing results? (ScaLAPACK)

Postby anne101 » Mon Jul 09, 2018 4:24 pm

Hi, I am solving a system of equations using ScaLAPACK's routine PDGESV using a C wrapper:

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?
anne101
 
Posts: 1
Joined: Mon Jul 09, 2018 4:10 pm

Return to Algorithm / Data

Who is online

Users browsing this forum: No registered users and 1 guest