Skip to content

Commit 173116f

Browse files
committed
sessions:undo ring_c.c changes
Signed-off-by: Howard Pritchard <[email protected]>
1 parent 5e9df52 commit 173116f

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

examples/ring_c.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
* Simple ring test program in C.
88
*/
99

10-
#include <stdio.h>
1110
#include "mpi.h"
11+
#include <stdio.h>
1212

1313
int main(int argc, char *argv[])
1414
{
@@ -34,8 +34,8 @@ int main(int argc, char *argv[])
3434
if (0 == rank) {
3535
message = 10;
3636

37-
printf("Process 0 sending %d to %d, tag %d (%d processes in ring)\n",
38-
message, next, tag, size);
37+
printf("Process 0 sending %d to %d, tag %d (%d processes in ring)\n", message, next, tag,
38+
size);
3939
MPI_Send(&message, 1, MPI_INT, next, tag, MPI_COMM_WORLD);
4040
printf("Process 0 sent to %d\n", next);
4141
}
@@ -49,8 +49,7 @@ int main(int argc, char *argv[])
4949
and can quit normally. */
5050

5151
while (1) {
52-
MPI_Recv(&message, 1, MPI_INT, prev, tag, MPI_COMM_WORLD,
53-
MPI_STATUS_IGNORE);
52+
MPI_Recv(&message, 1, MPI_INT, prev, tag, MPI_COMM_WORLD, MPI_STATUS_IGNORE);
5453

5554
if (0 == rank) {
5655
--message;
@@ -68,8 +67,7 @@ int main(int argc, char *argv[])
6867
to be received before the program can exit */
6968

7069
if (0 == rank) {
71-
MPI_Recv(&message, 1, MPI_INT, prev, tag, MPI_COMM_WORLD,
72-
MPI_STATUS_IGNORE);
70+
MPI_Recv(&message, 1, MPI_INT, prev, tag, MPI_COMM_WORLD, MPI_STATUS_IGNORE);
7371
}
7472

7573
/* All done */

0 commit comments

Comments
 (0)