
#if !defined (MPI_TEST_H)
#define MPI_TEST_H


/***************************************************************************
  include section
***************************************************************************/

#include <stdio.h>        /* Standard Input/Output Library     */
#include <stdlib.h>       /* Standard Utilities Library        */
#include <mpi.h>          /* Message Passing Interface Library */

#include "env.h"

/***************************************************************************
  definitions section
***************************************************************************/

#define Wtime MPI_Wtime

/* comment out this define to return 
  to old transfer rates as they were from Ivan Ruzanov */

#define PRINT_TOTAL_RATES		't'
#define PRINT_AVERAGE_RATES		'a'
#define PRINT_LOCAL_RATES		'l'

#define TRANSFER_RATE_LINK_AVG

#define DEFAULT_TIMES 20
#define KILOBYTE 1024
#define MEGABYTE (1024*1024)
#define DEFAULT_MSGLEN_UNIT MEGABYTE
#define DEFAULT_RATE_UNIT MEGABYTE
#define MIN_MESSAGE_LENGTH 1
#define MAX_MESSAGE_LENGTH 4

/* root process */
#define iROOT  0
#define MASTER 0

#define comm MPI_COMM_WORLD


#define iTAG 1000
#define iSEND_TAG 1000
#define iRECV_TAG 2000

/***************************************************************************
  prototype section.
***************************************************************************/

void SetSize ( int iArgumentCount, char *sArguments [ ], int *isize );
void finish(char*);

double Chaos  (int iSIZE,int TIMES); /* Chaos topology (blocking) test.     */
double Chaos2 (int iSIZE,int TIMES); /* Chaos topology (non-blocking) test. */
double Star   (int iSIZE,int TIMES); /* Star topology (blocking) test.      */
double Star2  (int iSIZE,int TIMES); /* Star topology (non-blocking) test.  */
double Ring   (int iSIZE,int TIMES); /* Ring topology (blocking) test.      */
double Ring2  (int iSIZE,int TIMES); /* Ring topology (non-blocking) test.  */

#endif /* MPI_TEST_H */

/* End of file 'mpi-test.h' */
