diff --git a/lab1/pi_mpi.c b/lab1/pi_mpi.c index e0f3299..3774ce2 100644 --- a/lab1/pi_mpi.c +++ b/lab1/pi_mpi.c @@ -1,6 +1,6 @@ #include #include -#include "mpi/mpi.h" +#include "mpi.h" #define N 100000000 int main (int argc, char** argv) diff --git a/lab1/pi_ser.c b/lab1/pi_ser.c index 28ed7b5..b3676cb 100644 --- a/lab1/pi_ser.c +++ b/lab1/pi_ser.c @@ -23,7 +23,7 @@ int main (int argc, char** argv) for (i = 0; i < n; i ++) { - x = (i + 0.5)*h; + x = (i+0.5)*h; l_sum += 4.0/(1.0 + x*x); } diff --git a/lab3/mpi_heat2D.c b/lab3/mpi_heat2D.c index cb64a3f..a08c7a0 100644 --- a/lab3/mpi_heat2D.c +++ b/lab3/mpi_heat2D.c @@ -46,7 +46,7 @@ PARALLEL MPI VERSION : #include #include #include -#include +#include #define NN 50 #define MM 50 diff --git a/lab3/plot.py b/lab3/plot.py index 09e9d81..231e799 100755 --- a/lab3/plot.py +++ b/lab3/plot.py @@ -14,5 +14,5 @@ A = [ map(float,line.split()) for line in f ] figure(1) imshow(A, interpolation='nearest') -grid(True) +#grid(True) show() diff --git a/lab3/ser_heat2D.c b/lab3/ser_heat2D.c index 23637d5..3cf927c 100644 --- a/lab3/ser_heat2D.c +++ b/lab3/ser_heat2D.c @@ -23,7 +23,7 @@ Interrior point : u[Central] = (1/4) * ( u[North] + u[South] + u[East] + u[West] ) ****************************************************************************/ -#include +#include #include #include @@ -102,7 +102,7 @@ int main(int argc, char *argv[]) if(iter%ITER_PRINT==0) - printf("Iteration %d, diff = %f\n ", iter,diff); + printf("Iteration %d, diff = %e\n ", iter,diff); iter++; } @@ -185,7 +185,7 @@ void inidat(int nx, int ny, float *u, float *unew) //boundary top for (iy = 0; iy < ny; iy++){ - u[iy]=0.0; + u[iy]=100.0; }