#define NMATRICES 2                     /* MK */
/*#define MATRIXSIZE 1048576 */              /* MN */
#define MATRIXSIZE 524288               /* MN */
/*#define MATRIXSIZE  1024*/             /* MN */
/*#define MATRIXSIZE  16 */           /* MN */
#define NONZERO 4                       /* ML */
/*#define DLEN 200  */                     /* MT */
#define DLEN 1600                       /* MT */
#define PART 50                         /* MD2 */
#define MD1 40		/* Max # steps in each subdivision of last pass*/

/* Macros for timing */
/*#define CPUSEC() (cpused() / (float)sysconf(_SC_CLK_TCK))*/
/*#define RTSEC() (rtclock() / (float)sysconf(_SC_CLK_TCK))*/
#define RTSEC() wall()
#define CPUSEC() cputime()

/* CVS info   */
/* $Date: 2005/01/28 21:17:22 $     */
/* $Revision: 1.3 $ */
/* $RCSfile: bench8sc.h,v $  */
/* $Name: rel_5 $     */

/* this is obnoxious - call to subr of Fortran newrandom.f */
#ifdef _CRAYMPP
#define BARRIER _upc_barrier()
/*#define MPI_I32 MPI_SHORT*/

/* Don't need these with C random number gen */
/*
#define get_my_bdata64 GET_MY_BDATA64
#define initiran INITIRAN
#define brand64 BRAND64
#define irand IRAND
#define check_maxlen CHECK_MAXLEN
*/

typedef long int64;
typedef short int32;
#endif
#ifdef __alpha
#ifdef FORTRAN
#define get_my_bdata64 get_my_bdata64_
#define initiran initiran_
#define brand64 brand64_
#define irand irand_
#define check_maxlen check_maxlen_
#endif

#define MPI_I32 MPI_INT
typedef long int64;
typedef int int32;

#define BARRIER upc_barrier
#endif

#define A(x,y,z) a[z + (MATRIXSIZE/npes)*(y + x*NONZERO)]