/*********************************************************** * test_scal.c * * Solve the linear system Ax=b with scalapack and checks * * the solution. * * The entries of A are random numbers and the solution * * is the vector with all components equal to one. * * * ***********************************************************/ #include #include #include #include #include #include int bl=4, nb=2, zero=0, one=1; /** Header files for Blacs and Pblas are not available from Intel Mkl */ void Cblacs_pinfo(int*, int*); void Cblacs_get(int, int, int*); void Cblacs_gridinit(int*, char*, int, int); void Cblacs_gridinfo(int, int*, int*, int*, int*); void Cblacs_barrier(int , char*); void Cblacs_gridexit(int); void descinit_(int*, int*, int*, int*, int*, int*, int*, int*, int*, int*); void pdgemv_(char*,int*,int*,double*,double*,int*,int*,int*,double*, int*,int*,int*,int*,double*,double*,int*,int*,int*,int*); void pdaxpy_(int*, double*, double*, int*, int*, int*, int*, double*, int*, int*, int*, int*); void pdnrm2_(int*, double*, double*, int*, int*, int*, int*); /** Local functions */ void block_A (int bl, double* a) /* Fills a square matrix block of order bl with random entries */ { int i,j; for (i=0; i