/* Solution of hw1 with OpenMP */ #include "omp.h" #include "math.h" #include /* All this is part of the student's work */ void power_distribute(double *A, double *b, long n); void power_method(long k); double power_answer(void); int main(int argc, char *argv[]) { int i=0, n=4; double *A, *b, norm_b; /* Create the matrix on the first node */ A = (double *) malloc (n * n * sizeof(double)); b = (double *) malloc (n * sizeof(double)); if (NULL == A || NULL == b){ printf ("Rank 0 has a problem with allocating memory\n"); exit (-1); } for (i=0; i