Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Combine identical conditions.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 19 Apr 2021 20:19:41 +0000 (22:19 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 19 Apr 2021 20:50:16 +0000 (22:50 +0200)
examples/smpi/simple-execute/simple-execute.c

index 1b5fb81..fae01b8 100644 (file)
@@ -33,12 +33,10 @@ int main(int argc, char *argv[])
     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);