support for ampi
authorXiang Ni <xiangni2@illinois.edu>
Sat, 5 Jan 2013 21:23:42 +0000 (15:23 -0600)
committerXiang Ni <xiangni2@illinois.edu>
Sat, 5 Jan 2013 21:23:42 +0000 (15:23 -0600)
src/ck-core/ckmemcheckpoint.C
src/conv-core/convcore.c
src/libs/ck-libs/ampi/ampi.C
src/libs/ck-libs/tcharm/tcharm.C
src/util/pup_c.C
src/util/pup_c.h
src/util/pup_util.C

index e8df99c6d0584e7e4a9e991aeabf562f204f15a2..7cf43ccbd699a0e116358a74dbbde517084da691 100644 (file)
@@ -1626,7 +1626,6 @@ void CkMemCheckPT::RollBack(){
                 int numElements;
                 pchecker|numElements;
                 for(int i=0;i<numElements;i++){
-      //for(int i=0;i<1;i++){
       CkGroupID gID;
       CkArrayIndex idx;
 
@@ -1636,8 +1635,8 @@ void CkMemCheckPT::RollBack(){
       CkLocMgr * mgr = (CkLocMgr *)CkpvAccess(_groupTable)->find(gID).getObj();
       mgr->resume(idx,pchecker,CmiFalse,CmiFalse,CmiFalse);
       }
-      //return pchecker.getResult();
-      return true;
+      return pchecker.getResult();
+      //return true;
     }
 
     static void recvRemoteChkpHandler(char *msg){
index d275a40416b3c81186eac59fb252c2e0474599f9..b392f33cac9258efeed28a3b13653c40f4b9ec13 100644 (file)
@@ -348,8 +348,11 @@ char **CmiCopyArgs(char **argv)
        int argc=CmiGetArgc(argv);
        char **ret=(char **)malloc(sizeof(char *)*(argc+1));
        int i;
-       for (i=0;i<=argc;i++)
-               ret[i]=argv[i];
+       for (i=0;i<argc;i++) {
+               //printf("Copyin argc %d/%d of lenght %d\n",i,argc,strlen(argv[i]));
+               ret[i] = (char*)malloc(strlen(argv[i])*sizeof(char));
+               memcpy(ret[i],argv[i],strlen(argv[i])*sizeof(char)); 
+       }
        return ret;
 }
 
index b45ac6573d2948c834362cdb23580113b1a5e283..5815c123bddd1eed9d3946f409e2cc8178a735e3 100644 (file)
@@ -1018,6 +1018,7 @@ TCharm *ampiParent::registerAmpi(ampi *ptr,ampiCommStruct s,bool forMigration)
     //they don't need to re-register on migration.
     if (worldPtr!=NULL) CkAbort("One ampiParent has two MPI_COMM_WORLDs");
     worldPtr=ptr;
+       s.getIndices();
     worldStruct=s;
 
     //MPI_COMM_SELF has the same member as MPI_COMM_WORLD, but it's alone:
index 5bf49e5ad6fce9464815fcc1f23887b89c17d07d..aab905ee1cc56e98957058018d1178947a6fe758 100644 (file)
@@ -224,7 +224,6 @@ void checkPupMismatch(PUP::er &p,int expected,const char *where)
 void TCharm::pup(PUP::er &p) {
 //Pup superclass
   ArrayElement1D::pup(p);
-
   //BIGSIM_OOC DEBUGGING
   //if(!p.isUnpacking()){
   //  CmiPrintf("TCharm[%d] packing: ", thisIndex);
index 6573750eca298bae725454f458e994b2b282b712..f8e70446097a27aaab11978d1436f2bdf59bb96c 100644 (file)
@@ -64,6 +64,8 @@ CDECL void pup_resumeChecking(const pup_er p)
   { mp.resume();}
 CDECL void pup_skipChecking(const pup_er p)
   { mp.skip();}
+CDECL void pup_setAccuracy(const pup_er p,double accuracy)
+  { mp.setAccuracy(accuracy);}
 CDECL int pup_isSizing(const pup_er p)
   { return (mp.isSizing())?1:0;}
 CDECL int pup_isDeleting(const pup_er p)
index 252a2634fee4aa49e9e026369955c95b64f4f666..fcf8be450867c6ae74a229598ba03cb94940a960 100644 (file)
@@ -92,6 +92,7 @@ int pup_isUnpacking(const pup_er p);
 int pup_isChecking(const pup_er p);
 void pup_resumeChecking(const pup_er p);
 void pup_skipChecking(const pup_er p);
+void pup_setAccuracy(const pup_er p,double accuracy);
 int pup_isSizing(const pup_er p);
 int pup_isDeleting(const pup_er p);
 int pup_isUserlevel(const pup_er p);
index b75b2e3d658f8304c385c67d7aabc900b0491970..1c2c3ca955b96ac820f9029c0e89b44a4b709c92 100644 (file)
@@ -186,7 +186,7 @@ void PUP::checker::bytes(void * p,int n,size_t itemSize,dataType t)
                                        for(int i=0;i<n/itemSize;i++){
                                                if(fabs(p1[i]-p2[i])>accuracy){
                                                        if(result)
-                                                               printf("found incorrect int %d %d\n",p1[i],p2[i]);
+                                                               printf("found incorrect int %d %d at %d total %d\n",p1[i],p2[i],i,n/itemSize);
                                                        result = result && false;
                                                }
                                        }