[Developers] Proposed Cactus Timer API Completion

Steve White swhite at aei.mpg.de
Wed Aug 11 07:19:27 CDT 2004

I just tried out the MPICH timer.  On my laptop, it has very fine
granularity (and has a call to report granularity).

Attached find a little program mpi.c.

	gcc -I <MPICH-PATH>/include/ -c mpi.c
	gcc mpi.o -L<MPICH-PATH>/lib/ -lmpich

I get
	0.000004 usec; 0 iterations
	MPI Tick time 0.000002

So maybe this MPI timer thorn I wrote would really be useful.

Steve White : Programmer
Max-Planck-Institut für Gravitationsphysik      Albert-Einstein-Institut
Am Mühlenberg 1, D-14476 Golm, Germany                  +49-331-567-7329
-------------- next part --------------
#include <stdio.h>
#include <stdlib.h>
#include <mpi.h>

	int i;
	double begin = MPI_Wtime();

	for( i = 0; i < 100000; i++ )
		double end = MPI_Wtime();
		if( end > begin )
			printf( "%f usec; %d iterations\n",
				end - begin, i );
	printf( "MPI Tick time %f \n", MPI_Wtick() );
	return 0;

More information about the Developers mailing list