Skip to content

Commit

Permalink
Chap 3 - Correction des constantes MPI en C
Browse files Browse the repository at this point in the history
  • Loading branch information
plstonge committed May 7, 2024
1 parent c683fc1 commit 94049c5
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions 3-point-a-point.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@
"\n",
"```C\n",
"if (proc == 2) {\n",
" MPI_Send(&a, 1, MPI_INTEGER, 0, 746, MPI_COMM_WORLD);\n",
" MPI_Send(&a, 1, MPI_INT, 0, 746, MPI_COMM_WORLD);\n",
"}\n",
"else if (proc == 0) {\n",
" MPI_Recv(&b, 1, MPI_INTEGER, 2, 746, MPI_COMM_WORLD, &etat);\n",
" MPI_Recv(&b, 1, MPI_INT, 2, 746, MPI_COMM_WORLD, &etat);\n",
"}\n",
"```"
]
Expand Down Expand Up @@ -170,12 +170,12 @@
"\n",
"```C\n",
"if (proc == 0) {\n",
" MPI_Ssend(&a, 1, MPI_INTEGER, 2, 10, MPI_COMM_WORLD);\n",
" MPI_Recv( &b, 1, MPI_INTEGER, 2, 11, MPI_COMM_WORLD, &etat);\n",
" MPI_Ssend(&a, 1, MPI_INT, 2, 10, MPI_COMM_WORLD);\n",
" MPI_Recv( &b, 1, MPI_INT, 2, 11, MPI_COMM_WORLD, &etat);\n",
"}\n",
"else if (proc == 2) {\n",
" MPI_Ssend(&b, 1, MPI_INTEGER, 0, 11, MPI_COMM_WORLD);\n",
" MPI_Recv( &a, 1, MPI_INTEGER, 0, 10, MPI_COMM_WORLD, &etat);\n",
" MPI_Ssend(&b, 1, MPI_INT, 0, 11, MPI_COMM_WORLD);\n",
" MPI_Recv( &a, 1, MPI_INT, 0, 10, MPI_COMM_WORLD, &etat);\n",
"}\n",
"```\n",
"\n",
Expand All @@ -202,12 +202,12 @@
"\n",
"```C\n",
"if (proc == 0) {\n",
" MPI_Ssend(&a, 1, MPI_INTEGER, 2, 10, MPI_COMM_WORLD);\n",
" MPI_Recv( &b, 1, MPI_INTEGER, 2, 11, MPI_COMM_WORLD, &etat);\n",
" MPI_Ssend(&a, 1, MPI_INT, 2, 10, MPI_COMM_WORLD);\n",
" MPI_Recv( &b, 1, MPI_INT, 2, 11, MPI_COMM_WORLD, &etat);\n",
"}\n",
"else if (proc == 2) {\n",
" MPI_Recv( &a, 1, MPI_INTEGER, 0, 10, MPI_COMM_WORLD, &etat);\n",
" MPI_Ssend(&b, 1, MPI_INTEGER, 0, 11, MPI_COMM_WORLD);\n",
" MPI_Recv( &a, 1, MPI_INT, 0, 10, MPI_COMM_WORLD, &etat);\n",
" MPI_Ssend(&b, 1, MPI_INT, 0, 11, MPI_COMM_WORLD);\n",
"}\n",
"```\n",
"\n",
Expand Down Expand Up @@ -252,12 +252,12 @@
"\n",
"```C\n",
"if (proc == 0) {\n",
" MPI_Isend(&a, 1, MPI_INTEGER, 2, 10, MPI_COMM_WORLD, &requete);\n",
" MPI_Recv( &b, 1, MPI_INTEGER, 2, 11, MPI_COMM_WORLD, &etat);\n",
" MPI_Isend(&a, 1, MPI_INT, 2, 10, MPI_COMM_WORLD, &requete);\n",
" MPI_Recv( &b, 1, MPI_INT, 2, 11, MPI_COMM_WORLD, &etat);\n",
"}\n",
"else if (proc == 2) {\n",
" MPI_Isend(&b, 1, MPI_INTEGER, 0, 11, MPI_COMM_WORLD, &requete);\n",
" MPI_Recv( &a, 1, MPI_INTEGER, 0, 10, MPI_COMM_WORLD, &etat);\n",
" MPI_Isend(&b, 1, MPI_INT, 0, 11, MPI_COMM_WORLD, &requete);\n",
" MPI_Recv( &a, 1, MPI_INT, 0, 10, MPI_COMM_WORLD, &etat);\n",
"}\n",
"\n",
"MPI_Wait(&requete, &etat);\n",
Expand Down

0 comments on commit 94049c5

Please sign in to comment.