/* $Source: runtime/gasnet/other/amxtests/testgetput.c $ * $Date: Sat, 09 Oct 2004 22:19:40 -0700 $ * $Revision: 1.2.1.2 $ * Description: AMX test * Copyright 2004, Dan Bonachea * Terms of use are as specified in license.txt */ #include "apputils.h" #define MAX_PROCS 255 static uint32_t vals[MAX_PROCS]; int main(int argc, char **argv) { eb_t eb; ep_t ep; uint64_t networkpid; int myproc; int numprocs; int k; int iters = 0; CHECKARGS(argc, argv, 1, 1, "iters"); AMX_VerboseErrors = 1; /* call startup */ AM_Safe(AMX_SPMDStartup(&argc, &argv, 0, &networkpid, &eb, &ep)); /* setup handlers */ setupUtilHandlers(ep, eb); /* get SPMD info */ myproc = AMX_SPMDMyProc(); numprocs = AMX_SPMDNumProcs(); if (argc > 1) iters = atoi(argv[1]); if (!iters) iters = 1; if (myproc == 0) { printf("Running %i iterations of get/put test...\n", iters); fflush(stdout); } for (k=0;k < iters; k++) { /* set just my val */ {int i; for (i=0;i