Commit 9cad13733896913c2918ed58ee8f7815593f7448

Authored by kmazouzi
1 parent 6c0f7fa151
Exists in master

MAJ

Showing 5 changed files with 7 additions and 7 deletions Side-by-side Diff

lab1/pi_mpi.c View file @ 9cad137
1 1 #include <stdio.h>
2 2 #include <string.h>
3   -#include "mpi/mpi.h"
  3 +#include "mpi.h"
4 4 #define N 100000000
5 5  
6 6 int main (int argc, char** argv)
lab1/pi_ser.c View file @ 9cad137
... ... @@ -23,7 +23,7 @@
23 23  
24 24 for (i = 0; i < n; i ++)
25 25 {
26   - x = (i + 0.5)*h;
  26 + x = (i+0.5)*h;
27 27 l_sum += 4.0/(1.0 + x*x);
28 28 }
29 29  
lab3/mpi_heat2D.c View file @ 9cad137
... ... @@ -46,7 +46,7 @@
46 46 #include <stdio.h>
47 47 #include <stdlib.h>
48 48 #include <math.h>
49   -#include <mpi/mpi.h>
  49 +#include <mpi.h>
50 50 #define NN 50
51 51 #define MM 50
52 52  
lab3/plot.py View file @ 9cad137
... ... @@ -14,6 +14,6 @@
14 14  
15 15 figure(1)
16 16 imshow(A, interpolation='nearest')
17   -grid(True)
  17 +#grid(True)
18 18 show()
lab3/ser_heat2D.c View file @ 9cad137
... ... @@ -23,7 +23,7 @@
23 23 u[Central] = (1/4) * ( u[North] + u[South] + u[East] + u[West] )
24 24  
25 25 ****************************************************************************/
26   -#include <stdio.h>
  26 +#include <stdio.h>
27 27 #include <stdlib.h>
28 28 #include <math.h>
29 29  
... ... @@ -102,7 +102,7 @@
102 102  
103 103 if(iter%ITER_PRINT==0)
104 104  
105   - printf("Iteration %d, diff = %f\n ", iter,diff);
  105 + printf("Iteration %d, diff = %e\n ", iter,diff);
106 106  
107 107 iter++;
108 108 }
... ... @@ -185,7 +185,7 @@
185 185  
186 186 //boundary top
187 187 for (iy = 0; iy < ny; iy++){
188   - u[iy]=0.0;
  188 + u[iy]=100.0;
189 189  
190 190 }
191 191