]> AND Public Git Repository - simgrid.git/blobdiff - teshsuite/smpi/mpich3-test/init/exitst3.c
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of framagit.org:Adrien.Gougeon/simgrid into master
[simgrid.git] / teshsuite / smpi / mpich3-test / init / exitst3.c
index 9943e3b02bb72f977aab18068cb4ce361442fb23..33d7d78908fe4afa2b4cdbf2b4efeff9da1af110 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;
 }