From 9cad13733896913c2918ed58ee8f7815593f7448 Mon Sep 17 00:00:00 2001 From: kmazouzi Date: Fri, 18 Sep 2015 14:33:50 +0200 Subject: [PATCH] MAJ --- lab1/pi_mpi.c | 2 +- lab1/pi_ser.c | 2 +- lab3/mpi_heat2D.c | 2 +- lab3/plot.py | 2 +- lab3/ser_heat2D.c | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) 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; } -- 1.7.10.4