/************* ** ** Dense Cholesky Factorization using block striped mapping ** ** ** N is the number of unknowns (ie. the input matrix should be N x N) ** NR is the number of rows per processor (ie. N / S == # of processors) ** **************/ #include #include #include "mayc.h" #define INPUT_FILE "in.matrix" #define OUTPUT_FILE "out.matrix" #define N 6 /* # of unknown */ #define NR 1 /* # of rows per block */ #define NP N/NR /* # of processors (blocks) */ entity driver {argc,argv} int argc; char **argv; { FILE *fp[2]; int i,j; float temp, A[N][N]; ename p_id[N]; message answer { int k; float row[N];} answer; if ((fp[0] = fopen (INPUT_FILE, "r")) == NULL) fputs("error opening the input file\n",stderr); for (i=0; ij) A[i][j] = 0.0; else A[i][j] = temp; } fclose (fp[0]); /** create the processors **/ for (i=0; i