Fixing bug in linear.C. The benchmark was not storing the bucketsize correctly.
authorSameer Kumar <skumar2@uiuc.edu>
Fri, 18 Mar 2005 03:18:26 +0000 (03:18 +0000)
committerSameer Kumar <skumar2@uiuc.edu>
Fri, 18 Mar 2005 03:18:26 +0000 (03:18 +0000)
Now bucketsize is readonly.

tests/charm++/commtest/commlib_stream/hello.C
tests/charm++/commtest/commlib_stream/hello.ci
tests/charm++/commtest/commlib_stream/linear.C

index 542b3e18070da999e090a90a5e3fc60cc74561d9..550e3aac85b157143b3f795d439e21e9ae88b6d1 100644 (file)
@@ -16,6 +16,8 @@ ComlibInstanceHandle mss_inst;
 ComlibInstanceHandle samp_inst;
 ComlibInstanceHandle dummy_inst;
 
+int bucketSize = 400;
+
 /*mainchare*/
 class Main : public Chare
 {
@@ -38,8 +40,8 @@ public:
        
        CProxy_Hello arr = CProxy_Hello::ckNew(nElements);
        
-       StreamingStrategy *strat=new StreamingStrategy(1,400);
-       MeshStreamingStrategy *mstrat=new MeshStreamingStrategy(1,400);
+       StreamingStrategy *strat=new StreamingStrategy(1,bucketSize);
+       MeshStreamingStrategy *mstrat=new MeshStreamingStrategy(1,bucketSize);
        
        //strat->enableShortArrayMessagePacking();
        //strat->disableIdleFlush();
index 0a664711898644691157c44393849600ed205e2f..efc5918bdf11d130cdba56fbb534a8cfa0f79a0d 100644 (file)
@@ -2,6 +2,8 @@ mainmodule hello {
        readonly CProxy_Main mainProxy;
        readonly int nElements;
 
+       readonly int bucketSize;
+
        readonly ComlibInstanceHandle ss_inst;
        readonly ComlibInstanceHandle mss_inst;
        readonly ComlibInstanceHandle samp_inst;        
index d5e635081d8fd3b5aecb8d75cf3a288e4390e936..ab939cd588ae22a35b30cea04fb883a31f5f74a5 100644 (file)
@@ -20,8 +20,8 @@ int NUM_MSGS;
 
 #define TEST_HI 4001
 #define MAX_COUNT 2000
-int STREAMING_BUCKET_SIZE=100;
-#define MAX_PER_ITR 2*STREAMING_BUCKET_SIZE
+int bucketSize = 100;
+#define MAX_PER_ITR 2*bucketSize 
 
 ComlibInstanceHandle ss_inst;  //basic streaming strategy
 ComlibInstanceHandle mss_inst;  //mesh streaming strategy
@@ -42,7 +42,7 @@ public:
         //Process command-line arguments
         nElements=5;
         if(m->argc >1 ) nElements=atoi(m->argv[1]);
-        if(m->argc > 2 ) STREAMING_BUCKET_SIZE= atoi(m->argv[2]);
+        if(m->argc > 2 ) bucketSize= atoi(m->argv[2]);
         delete m;
         
         recv_count = 0;
@@ -50,16 +50,16 @@ public:
         
         //Start the computation
         CkPrintf("Running Hello on %d processors for %d elements with bucket %d\n",
-                 CkNumPes(),nElements, STREAMING_BUCKET_SIZE);
+                 CkNumPes(),nElements, bucketSize);
         mainProxy = thishandle;
         
         arr = CProxy_Hello::ckNew(nElements);
         
-        StreamingStrategy *strat=new StreamingStrategy(1,STREAMING_BUCKET_SIZE);
-        StreamingStrategy *sstrat=new StreamingStrategy(1,STREAMING_BUCKET_SIZE);
+        StreamingStrategy *strat=new StreamingStrategy(1,bucketSize);
+        StreamingStrategy *sstrat=new StreamingStrategy(1,bucketSize);
 
         MeshStreamingStrategy *mstrat=new 
-         MeshStreamingStrategy(1, STREAMING_BUCKET_SIZE);
+         MeshStreamingStrategy(1, bucketSize);
         
         sstrat->enableShortArrayMessagePacking();