Blame test/mpi/basic/wtime.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
#include <stdio.h>
Packit Service c5cf8c
#include "mpitest.h"
Packit Service c5cf8c
Packit Service c5cf8c
int main(int argc, char *argv[])
Packit Service c5cf8c
{
Packit Service c5cf8c
    int i;
Packit Service c5cf8c
    double dStart, dFinish, dDuration;
Packit Service c5cf8c
Packit Service c5cf8c
    MPI_Init(&argc, &argv);
Packit Service c5cf8c
    MPI_Comm_rank(MPI_COMM_WORLD, &i);
Packit Service c5cf8c
Packit Service c5cf8c
    dStart = MPI_Wtime();
Packit Service c5cf8c
    MTestSleep(1);
Packit Service c5cf8c
    dFinish = MPI_Wtime();
Packit Service c5cf8c
    dDuration = dFinish - dStart;
Packit Service c5cf8c
Packit Service c5cf8c
    printf("start:%g\nfinish:%g\nduration:%g\n", dStart, dFinish, dDuration);
Packit Service c5cf8c
Packit Service c5cf8c
    MPI_Finalize();
Packit Service c5cf8c
    return 0;
Packit Service c5cf8c
}