Bug fix for armci with mempool based isomalloc, as modifying
authorNikhil Jain <nikhil@illinois.edu>
Tue, 10 Jan 2012 09:32:09 +0000 (03:32 -0600)
committerNikhil Jain <nikhil@illinois.edu>
Tue, 10 Jan 2012 09:32:09 +0000 (03:32 -0600)
the example code to test migration

examples/armci/putTest/Makefile
examples/armci/putTest/put.c
src/libs/ck-libs/armci/armci_vp.C

index 20f8fb4fac5151feddfc230dd3391545d55ffab3..2b9105dd7f71393f9522bf0d25abcead02290feb 100644 (file)
@@ -3,10 +3,10 @@ CHARMC=../../../bin/charmc $(OPTS)
 all: put
 
 put: put.c
-       $(CHARMC) -o put put.c -language armci 
+       $(CHARMC) -o put put.c -language armci -balancer RotateLB 
 
 test: put
-       ./charmrun +p2 ./put $(TESTOPTS)
+       ./charmrun +p2 ./put +vp 2 $(TESTOPTS)
 
 bgtest: put
        ./charmrun +p1 ./put +vp 2 +x2 +y1 +z1 $(TESTOPTS)
index 8593ee2146913b2aa36c0f08fa59e34bfd713577..1e27b15d6f71422d1800a932641335630a372b06 100644 (file)
@@ -26,6 +26,7 @@ int main(int argc, char * argv[]) {
   local = (char *)ARMCI_Malloc_local(MAX_BUF_SIZE*sizeof(char));
 
   ARMCI_Barrier();
+  ARMCI_Migrate();
    
   if (thisImage == 0) {
     for(size = 1; size <= MAX_BUF_SIZE; size = size<<1){
index 37a53f329e94f172f875fe654ca80953fb75e14d..5887df6f5002b38b174d98484cc0dddbd14a2386 100644 (file)
@@ -65,7 +65,7 @@ ArmciVirtualProcessor::ArmciVirtualProcessor(const CProxy_TCharm &_thr_proxy)
   thisProxy = this;
   tcharmClientInit();
   thread->semaPut(ARMCI_TCHARM_SEMAID,this);
-  memBlock = CmiIsomallocBlockListNew(NULL);
+  memBlock = CmiIsomallocBlockListNew(thread->getThread());
   thisProxy = CProxy_ArmciVirtualProcessor(thisArrayID);
   addressReply = NULL;
   // Save ourselves for the waiting ARMCI_Init
@@ -81,7 +81,7 @@ ArmciVirtualProcessor::ArmciVirtualProcessor(CkMigrateMessage *m)
 
 ArmciVirtualProcessor::~ArmciVirtualProcessor()
 {
-  CmiIsomallocBlockListDelete(memBlock);
+  //CmiIsomallocBlockListDelete(memBlock);
   if (addressReply) {delete addressReply;}
 }
 
@@ -561,7 +561,9 @@ void ArmciVirtualProcessor::notify_wait(int proc){
 
 void ArmciVirtualProcessor::pup(PUP::er &p) {
   TCharmClient1D::pup(p);
-  CmiIsomallocBlockListPup(&p, &memBlock,NULL);
+  //Copying only address, the mempool will be pupped as part of the thread
+  //CmiIsomallocBlockListPup(&p, &memBlock, thread->getThread());
+  pup_bytes(&p, &memBlock, sizeof(CmiIsomallocBlockList*));
   p|thisProxy;
   p|hdlList;
   p|noteList;