/*
* mmult.c: matrix multiplication using MPI.
* There are some simplifications here. The main one is that matrices B and C
* are fully allocated everywhere, even though only a portion of them is
* used by each processor (except for processor 0)
*/
#include
#include
#define SIZE 8 /* Size of matrices */
int A[SIZE][SIZE], B[SIZE][SIZE], C[SIZE][SIZE];
void fill_matrix(int m[SIZE][SIZE])
{
static int n=0;
int i, j;
for (i=0; i