/****************************************************************************** gcc -DDEBUG -Wall -Werror mm.c -o mm.out ./mm.out openMP compilation for 103 --> gcc -fopenmp -Wall -Werror omp_mm.c -o omp_mm.out run like --> ./omp_mm.out 20 or ./omp_mm.out to use system default number of threads ******************************************************************************/ #include #include #include "support.h" #define NRA 1000 /* number of rows in matrix A */ #define NCA 1000 /* number of columns in matrix A */ #define NCB 100 /* number of columns in matrix B */ int main (int argc, char *argv[]) { int i, j, k; //int nthreads, tid, chunk; double a[NRA][NCA], /* matrix A to be multiplied */ b[NCA][NCB], /* matrix B to be multiplied */ c[NRA][NCB]; /* result matrix C */ { printf("Starting matrix multiple example\n"); printf("Initializing matrices...\n"); for (i=0; i