abort.c 508 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
/*
 *
 *  (C) 2003 by Argonne National Laboratory.
 *      See COPYRIGHT in top-level directory.
 */
#include "mpi.h"
#include <stdio.h>

int main(int argc, char **argv)
{
    int rank, size;

    MPI_Init(&argc, &argv);
    MPI_Comm_rank(MPI_COMM_WORLD, &rank);

17
    printf(" No Errors\n");
18
    fflush( stdout );
19
20
21
22
23
24
25
26
27
28

    if (rank == 0)
        MPI_Abort(MPI_COMM_WORLD, MPI_SUCCESS);

    while(1)
        ;

    MPI_Finalize();
    return 0;
}