/************* ** ** 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) ** ** Note: compile with -lm ** Adapted for Maisie v. 3.0 on 2-25-97 ** **************/ #include #include #include "maisie.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) */ message answer { int k; float row[N];}; entity driver {int argc, char **argv} { FILE *fp[2]; int i,j; float temp, A[N][N]; ename p_id[N]; message answer answer; if ((fp[0] = fopen (INPUT_FILE, "r")) == NULL) { fputs("error opening the input file\n",stderr); terminate(); } for (i=0; ij) A[i][j] = 0.0; else A[i][j] = temp; } fclose (fp[0]); /** create the processors **/ for (i=0; i