Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add new entry in Release_Notes.
[simgrid.git] / teshsuite / smpi / mpich3-test / init / exitst3.c
index 9943e3b..33d7d78 100644 (file)
@@ -5,22 +5,22 @@
  */
 #include "mpi.h"
 
-/* 
+/*
  * This is a special test to check that mpiexec handles the death of
  * some processes without an Abort or clean exit
  */
-int main( int argc, char *argv[] )
+int main(int argc, char *argv[])
 {
     int rank, size;
-    MPI_Init( 0, 0 );
-    MPI_Comm_rank( MPI_COMM_WORLD, &rank );
-    MPI_Comm_size( MPI_COMM_WORLD, &size );
-    MPI_Barrier( MPI_COMM_WORLD );
-    if (rank == size-1) {
-       /* Cause some processes to exit */
-       int *p =0 ;
-       *p = rank;
+    MPI_Init(&argc, &argv);
+    MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+    MPI_Comm_size(MPI_COMM_WORLD, &size);
+    MPI_Barrier(MPI_COMM_WORLD);
+    if (rank == size - 1) {
+        /* Cause some processes to exit */
+        int *p = 0;
+        *p = rank;
     }
-    MPI_Finalize( );
+    MPI_Finalize();
     return 0;
 }