/* A simple example ping-pong program to test MPI_Send and MPI_Recv */
-/* Copyright (c) 2009-2021. The SimGrid Team.
+/* Copyright (c) 2009-2023. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
MPI_Finalize();
exit(0);
}
- if (0 == rank) {
+ if (rank == 0) {
printf("\n *** Ping-pong test (MPI_Send/MPI_Recv) ***\n\n");
- }
- /* start ping-pong tests between several pairs */
- if ( rank == 0) {
+ /* start ping-pong tests between several pairs */
int dst = 1;
printf("[%d] About to send 1st message '%d' to process [%d]\n", rank, msg, dst);
MPI_Send(&msg, 1, MPI_INT, dst, tag1, MPI_COMM_WORLD);