Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reduce the size of partial shared malloc tests.
[simgrid.git] / teshsuite / smpi / mpich3-test / init / exitst3.c
1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
2 /*
3  *  (C) 2001 by Argonne National Laboratory.
4  *      See COPYRIGHT in top-level directory.
5  */
6 #include "mpi.h"
7
8 /*
9  * This is a special test to check that mpiexec handles the death of
10  * some processes without an Abort or clean exit
11  */
12 int main(int argc, char *argv[])
13 {
14     int rank, size;
15     MPI_Init(&argc, &argv);
16     MPI_Comm_rank(MPI_COMM_WORLD, &rank);
17     MPI_Comm_size(MPI_COMM_WORLD, &size);
18     MPI_Barrier(MPI_COMM_WORLD);
19     if (rank == size - 1) {
20         /* Cause some processes to exit */
21         int *p = 0;
22         *p = rank;
23     }
24     MPI_Finalize();
25     return 0;
26 }