#include "mpi.h" #include "wtime.h" #include void mpi_error( void ) { printf( "mpi_error called\n" ); abort(); } int MPI_Irecv( void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request ) { mpi_error(); return( MPI_ERR_OTHER ); } int MPI_Send( void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm ) { mpi_error(); return( MPI_ERR_OTHER ); } int MPI_Wait( MPI_Request *request, MPI_Status *status ) { mpi_error(); return( MPI_ERR_OTHER ); } int MPI_Init( int *argc, char ***argv ) { return( MPI_SUCCESS ); } int MPI_Comm_rank( MPI_Comm comm, int *rank ) { *rank = 0; return( MPI_SUCCESS ); } int MPI_Comm_size( MPI_Comm comm, int *size ) { *size = 1; return( MPI_SUCCESS ); } double MPI_Wtime( void ) { void wtime(); double t; wtime( &t ); return( t ); } int MPI_Barrier( MPI_Comm comm ) { return( MPI_SUCCESS ); } int MPI_Finalize( void ) { return( MPI_SUCCESS ); } int MPI_Allreduce( void *sendbuf, void *recvbuf, int nitems, MPI_Datatype type, MPI_Op op, MPI_Comm comm ) { int i; if( type == MPI_INT ) { int *pd_sendbuf, *pd_recvbuf; pd_sendbuf = (int *) sendbuf; pd_recvbuf = (int *) recvbuf; for( i=0; i