]> AND Public Git Repository - simgrid.git/blobdiff - examples/smpi/simple-execute/simple-execute.c
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use #include <...> for foreign header files.
[simgrid.git] / examples / smpi / simple-execute / simple-execute.c
index 1b5fb81cdd2749e5a8e32a6b9e6e6abc83d8fe84..97f399d90ca36c03e9f3966c238218602b0a818d 100644 (file)
@@ -1,6 +1,6 @@
 /* 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
@@ -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);