Blame test/mpi/init/timeout.c
|
Packit Service |
c5cf8c |
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
|
|
Packit Service |
c5cf8c |
/*
|
|
Packit Service |
c5cf8c |
* (C) 2001 by Argonne National Laboratory.
|
|
Packit Service |
c5cf8c |
* See COPYRIGHT in top-level directory.
|
|
Packit Service |
c5cf8c |
*/
|
|
Packit Service |
c5cf8c |
#include "mpi.h"
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* This is a program that tests the ability of mpiexec to timeout a process
|
|
Packit Service |
c5cf8c |
after no more than 3 minutes. By default, it will run for 5 minutes */
|
|
Packit Service |
c5cf8c |
int main(int argc, char *argv[])
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
double t1;
|
|
Packit Service |
c5cf8c |
double deltaTime = 300;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
MPI_Init(0, 0);
|
|
Packit Service |
c5cf8c |
t1 = MPI_Wtime();
|
|
Packit Service |
c5cf8c |
while (MPI_Wtime() - t1 < deltaTime);
|
|
Packit Service |
c5cf8c |
MPI_Finalize();
|
|
Packit Service |
c5cf8c |
return 0;
|
|
Packit Service |
c5cf8c |
}
|