next up previous
Next: Example: The NetSolve Up:

NetSolve: A Network Previous: Future Work


Example: The NetSolve C Interface

 

double A[100*100];                  /* Matrix A                                     */
double Real[100],Imaginary[100];    /* real and imaginary parts of A's eigenvalues */
int request;                        /* NetSolve request number                      */
int is_finished;                    /* Flag giving the computation status           */

/* Blocking call        */
request = netsolve("eig",           /* Eigenvalues problem             */
               A,100,               /* One matrix in input : A 100x100 */
               Real,Imaginary);     /* Two vectors in output :         */
                                    /*   Real and Imaginary            */

/* Asynchronous call    */
request = netsolve_nb("eig",A,100,
                      Real,Imaginary);

...    Some computations

is_finished = netsolve_get(request,PROBE);     /* poll the previous request       */

...    Some computations

is_finished = netsolve_get(request,WAIT);      /* poll in a blocking fashion      */



Joint Institute for Computational Science
Mon Apr 29 13:00:40 EDT 1996