Using QD for startup to ensure that comlib has been initialized before we use it.
authorIsaac Dooley <idooley2@illinois.edu>
Thu, 2 Jul 2009 18:16:44 +0000 (18:16 +0000)
committerIsaac Dooley <idooley2@illinois.edu>
Thu, 2 Jul 2009 18:16:44 +0000 (18:16 +0000)
tests/charm++/commtest/section-multicast-test-6/Makefile
tests/charm++/commtest/section-multicast-test-6/test.C
tests/charm++/commtest/section-multicast-test-6/test.ci

index 9190910e3f806626ac0bfac6024226877c65c3c4..99d56686fb0ca035bfa217d1540f3f9ab653199f 100644 (file)
@@ -1,4 +1,4 @@
-CHARMC=../../../../bin/charmc -module comlib  $(OPTS)
+CHARMC=../../../../bin/charmc -module comlib  $(OPTS) -g
 
 all: pgm
 
index 30024e8d38a27805f11874a8c02f8beaf7ef4bc8..24bee0b52ac18aa77f31e8fb3e106b279d6c738a 100644 (file)
@@ -12,12 +12,12 @@ CProxy_LUBlk luArrProxy;
 ComlibInstanceHandle cinst_direct;
 ComlibInstanceHandle cinst_ring;
 ComlibInstanceHandle cinst_multiring;
-
+ComlibInstanceHandle cinst_onetime;
 
 #define BLKSIZE 10
-#define NumElem 40
+#define NumElem 200
 #define COOKIE 777777
-#define NUM_ITER 10
+#define NUM_ITER 40
 
 #define DEBUG 0
 
@@ -53,6 +53,9 @@ public:
 
     Strategy *strategy_multiring = new MultiRingMulticastStrategy();
     cinst_multiring = ComlibRegister(strategy_multiring);
+  
+    Strategy *strategy_onetime = new OneTimeNodeTreeMulticastStrategy();
+    cinst_onetime = ComlibRegister(strategy_onetime);
 
     
 
@@ -60,7 +63,9 @@ public:
     luArrProxy.ckSetReductionClient(cb);
     startTime = CmiWallTimer();
 
-    startIteration();
+    CkCallback *cbstart = new CkCallback(CkIndex_Main::startIteration(), thisProxy);
+    CkStartQD(*cbstart);
+
   }
 
 
@@ -134,7 +139,7 @@ public:
       if(thisIndex < NumElem-1) {
        CProxySection_LUBlk sect = CProxySection_LUBlk::ckNew(thisArrayID, thisIndex+1, NumElem-1, 1);
 
-       switch(rand() % 3){
+       switch(rand() % 4){
        case 0:
          ComlibAssociateProxy(cinst_direct, sect); 
          break;
@@ -144,8 +149,12 @@ public:
        case 2:
          ComlibAssociateProxy(cinst_multiring, sect); 
          break;
+       case 3:
+         ComlibAssociateProxy(cinst_onetime, sect); 
+         break;
        }
 
+
        blkMsg *msg = new (BLKSIZE) blkMsg;
        msg->data[1] = COOKIE;
        msg->data[BLKSIZE-1] = COOKIE;
index e4b5c5a2c1a7a880a6500a12659afcfe2b396938..88dde5b1f663d39ab28cc347f19a4b22963ea59d 100644 (file)
@@ -1,9 +1,11 @@
 mainmodule test {
   readonly CProxy_Main mainProxy;
   readonly CProxy_LUBlk luArrProxy;
-  readonly ComlibInstanceHandle cinst_direct;
-  readonly ComlibInstanceHandle cinst_ring;
-  readonly ComlibInstanceHandle cinst_multiring;
+
+readonly ComlibInstanceHandle cinst_direct;
+readonly ComlibInstanceHandle cinst_ring;
+readonly ComlibInstanceHandle cinst_multiring;
+readonly ComlibInstanceHandle cinst_onetime;
 
   message blkMsg {
     double data[];
@@ -12,6 +14,8 @@ mainmodule test {
   mainchare Main {
     entry Main(CkArgMsg *m);
     entry void iterationCompleted(CkReductionMsg *);
+   entry void startIteration();                         
+
   };
 
   array [1D] LUBlk {