Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add new entry in Release_Notes.
[simgrid.git] / teshsuite / smpi / mpich3-test / init / timeout.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 /* This is a program that tests the ability of mpiexec to timeout a process
9    after no more than 3 minutes.  By default, it will run for 5 minutes */
10 int main(int argc, char *argv[])
11 {
12     double t1;
13     double deltaTime = 300;
14
15     MPI_Init(0, 0);
16     t1 = MPI_Wtime();
17     while (MPI_Wtime() - t1 < deltaTime);
18     MPI_Finalize();
19     return 0;
20 }