Index: /issm/trunk/externalpackages/scotch/gmapx.c
===================================================================
--- /issm/trunk/externalpackages/scotch/gmapx.c	(revision 3638)
+++ /issm/trunk/externalpackages/scotch/gmapx.c	(revision 3639)
@@ -151,9 +151,18 @@
   int                 i,j,k;
 
-/*  check static variables from previous runs  */
-
-  if (C_paraNum > 0 || C_fileNum > 0) {
-    printf("gmap_mex still in memory -- clear gmap_mex and try again.\n");
-    return(1);
+/*  reset static variables from previous runs (jes, 4/27/10)  */
+
+  C_partNbr = 2;        /* Default number of parts     */
+  C_paraNum = 0;        /* Number of parameters        */
+  C_paraNbr = 0;        /* No parameters for mapping   */
+  C_fileNum = 0;        /* Number of file in arg list  */
+  C_fileNbr = 4;        /* Number of files for mapping */
+  for (i=0; i<C_FILENBR; i++) {
+    C_fileTab[i].name = "-";
+    C_fileTab[i].pntr = NULL;
+    if (i < 2)
+      C_fileTab[i].mode = "r";
+    else
+      C_fileTab[i].mode = "w";
   }
 
@@ -338,5 +347,7 @@
   clockStart (&runtime[1]);
 
+  printf("point 10a\n");
   SCOTCH_graphMapInit    (&grafdat, &mapdat, &archdat, NULL);
+  printf("point 10b\n");
   SCOTCH_graphMapCompute (&grafdat, &mapdat, &stradat); /* Perform mapping */
   printf("point 11\n");
Index: /issm/trunk/externalpackages/scotch/scotch.patch
===================================================================
--- /issm/trunk/externalpackages/scotch/scotch.patch	(revision 3638)
+++ /issm/trunk/externalpackages/scotch/scotch.patch	(revision 3639)
@@ -1,8 +1,8 @@
-Only in new: bin
-Only in new: include
-Only in new: lib
-diff -rc src/src/libscotch/arch.c new/src/libscotch/arch.c
+Only in new2: bin
+Only in new2: include
+Only in new2: lib
+diff -rc src/src/libscotch/arch.c new2/src/libscotch/arch.c
 *** src/src/libscotch/arch.c	2008-09-27 07:48:01.000000000 -0700
---- new/src/libscotch/arch.c	2010-04-06 15:51:57.485253299 -0700
+--- new2/src/libscotch/arch.c	2010-04-26 10:35:09.779996545 -0700
 ***************
 *** 173,187 ****
@@ -68,7 +68,7 @@
         memset     (archptr, 0, sizeof (Arch));     /* Initialize architecture body */
         return     (1);
-diff -rc src/src/libscotch/arch_cmplt.c new/src/libscotch/arch_cmplt.c
+diff -rc src/src/libscotch/arch_cmplt.c new2/src/libscotch/arch_cmplt.c
 *** src/src/libscotch/arch_cmplt.c	2008-05-22 06:44:41.000000000 -0700
---- new/src/libscotch/arch_cmplt.c	2010-04-06 15:51:57.492253308 -0700
+--- new2/src/libscotch/arch_cmplt.c	2010-04-26 10:35:09.786996551 -0700
 ***************
 *** 90,99 ****
@@ -120,7 +120,7 @@
       return     (1);
     }
-diff -rc src/src/libscotch/arch_cmplt.h new/src/libscotch/arch_cmplt.h
+diff -rc src/src/libscotch/arch_cmplt.h new2/src/libscotch/arch_cmplt.h
 *** src/src/libscotch/arch_cmplt.h	2008-05-22 06:44:41.000000000 -0700
---- new/src/libscotch/arch_cmplt.h	2010-04-06 15:51:57.499253316 -0700
+--- new2/src/libscotch/arch_cmplt.h	2010-04-26 10:35:09.794996558 -0700
 ***************
 *** 87,93 ****
@@ -137,7 +137,7 @@
   #define archCmpltArchFree           NULL
   ArchDomNum                  archCmpltDomNum     (const ArchCmplt * const, const ArchCmpltDom * const);
-diff -rc src/src/libscotch/arch_cmpltw.c new/src/libscotch/arch_cmpltw.c
+diff -rc src/src/libscotch/arch_cmpltw.c new2/src/libscotch/arch_cmpltw.c
 *** src/src/libscotch/arch_cmpltw.c	2008-08-27 14:22:22.000000000 -0700
---- new/src/libscotch/arch_cmpltw.c	2010-04-06 15:51:57.505253324 -0700
+--- new2/src/libscotch/arch_cmpltw.c	2010-04-26 10:35:09.801996564 -0700
 ***************
 *** 200,211 ****
@@ -209,7 +209,7 @@
         return     (1);
       }
-diff -rc src/src/libscotch/arch_cmpltw.h new/src/libscotch/arch_cmpltw.h
+diff -rc src/src/libscotch/arch_cmpltw.h new2/src/libscotch/arch_cmpltw.h
 *** src/src/libscotch/arch_cmpltw.h	2008-05-22 06:44:41.000000000 -0700
---- new/src/libscotch/arch_cmpltw.h	2010-04-06 15:51:57.512253332 -0700
+--- new2/src/libscotch/arch_cmpltw.h	2010-04-26 10:35:09.809996571 -0700
 ***************
 *** 86,92 ****
@@ -226,7 +226,7 @@
   int                         archCmpltwArchFree  (ArchCmpltw * restrict const);
   ArchDomNum                  archCmpltwDomNum    (const ArchCmpltw * const, const ArchCmpltwDom * const);
-diff -rc src/src/libscotch/arch_deco.c new/src/libscotch/arch_deco.c
+diff -rc src/src/libscotch/arch_deco.c new2/src/libscotch/arch_deco.c
 *** src/src/libscotch/arch_deco.c	2008-09-28 06:35:27.000000000 -0700
---- new/src/libscotch/arch_deco.c	2010-04-06 15:51:57.519253341 -0700
+--- new2/src/libscotch/arch_deco.c	2010-04-26 10:35:09.816996577 -0700
 ***************
 *** 211,217 ****
@@ -267,7 +267,7 @@
     if ((sizeof (ArchDeco)    > sizeof (ArchDummy)) ||
         (sizeof (ArchDecoDom) > sizeof (ArchDomDummy))) {
-diff -rc src/src/libscotch/arch_deco.h new/src/libscotch/arch_deco.h
+diff -rc src/src/libscotch/arch_deco.h new2/src/libscotch/arch_deco.h
 *** src/src/libscotch/arch_deco.h	2008-09-27 07:49:46.000000000 -0700
---- new/src/libscotch/arch_deco.h	2010-04-06 15:51:57.527253350 -0700
+--- new2/src/libscotch/arch_deco.h	2010-04-26 10:35:09.823996583 -0700
 ***************
 *** 113,119 ****
@@ -284,7 +284,7 @@
   int                         archDecoArchFree    (ArchDeco * const);
   Anum                        archDecoArchSize    (ArchDeco * const, const Anum);
-diff -rc src/src/libscotch/arch.h new/src/libscotch/arch.h
+diff -rc src/src/libscotch/arch.h new2/src/libscotch/arch.h
 *** src/src/libscotch/arch.h	2009-04-28 08:11:27.000000000 -0700
---- new/src/libscotch/arch.h	2010-04-06 15:51:57.533253358 -0700
+--- new2/src/libscotch/arch.h	2010-04-26 10:35:09.831996590 -0700
 ***************
 *** 175,181 ****
@@ -301,7 +301,7 @@
   char *                      archName            (const Arch * const);
   const ArchClass *           archClass           (const char * const);
-diff -rc src/src/libscotch/arch_hcub.c new/src/libscotch/arch_hcub.c
+diff -rc src/src/libscotch/arch_hcub.c new2/src/libscotch/arch_hcub.c
 *** src/src/libscotch/arch_hcub.c	2008-05-22 06:44:41.000000000 -0700
---- new/src/libscotch/arch_hcub.c	2010-04-06 15:51:57.540253366 -0700
+--- new2/src/libscotch/arch_hcub.c	2010-04-26 10:35:09.838996596 -0700
 ***************
 *** 88,95 ****
@@ -349,7 +349,7 @@
       errorPrint ("archHcubArchLoad: bad input");
       return     (1);
-diff -rc src/src/libscotch/arch_hcub.h new/src/libscotch/arch_hcub.h
+diff -rc src/src/libscotch/arch_hcub.h new2/src/libscotch/arch_hcub.h
 *** src/src/libscotch/arch_hcub.h	2008-05-22 06:44:41.000000000 -0700
---- new/src/libscotch/arch_hcub.h	2010-04-06 15:51:57.547253375 -0700
+--- new2/src/libscotch/arch_hcub.h	2010-04-26 10:35:09.845996602 -0700
 ***************
 *** 85,91 ****
@@ -366,7 +366,7 @@
   #define archHcubArchFree            NULL
   ArchDomNum                  archHcubDomNum      (const ArchHcub * const, const ArchHcubDom * const);
-diff -rc src/src/libscotch/arch_mesh.c new/src/libscotch/arch_mesh.c
+diff -rc src/src/libscotch/arch_mesh.c new2/src/libscotch/arch_mesh.c
 *** src/src/libscotch/arch_mesh.c	2008-05-22 06:44:41.000000000 -0700
---- new/src/libscotch/arch_mesh.c	2010-04-06 15:51:57.555253385 -0700
+--- new2/src/libscotch/arch_mesh.c	2010-04-26 10:35:09.853996609 -0700
 ***************
 *** 96,103 ****
@@ -465,7 +465,7 @@
       return     (1);
     }
-diff -rc src/src/libscotch/arch_mesh.h new/src/libscotch/arch_mesh.h
+diff -rc src/src/libscotch/arch_mesh.h new2/src/libscotch/arch_mesh.h
 *** src/src/libscotch/arch_mesh.h	2008-05-22 06:44:41.000000000 -0700
---- new/src/libscotch/arch_mesh.h	2010-04-06 15:51:57.561253392 -0700
+--- new2/src/libscotch/arch_mesh.h	2010-04-26 10:35:09.860996615 -0700
 ***************
 *** 96,102 ****
@@ -496,7 +496,7 @@
   #define archMesh3ArchFree           NULL
   ArchDomNum                  archMesh3DomNum     (const ArchMesh3 * const, const ArchMesh3Dom * const);
-diff -rc src/src/libscotch/arch_tleaf.c new/src/libscotch/arch_tleaf.c
+diff -rc src/src/libscotch/arch_tleaf.c new2/src/libscotch/arch_tleaf.c
 *** src/src/libscotch/arch_tleaf.c	2008-05-22 06:44:41.000000000 -0700
---- new/src/libscotch/arch_tleaf.c	2010-04-06 15:51:57.569253402 -0700
+--- new2/src/libscotch/arch_tleaf.c	2010-04-26 10:35:09.867996621 -0700
 ***************
 *** 92,99 ****
@@ -554,7 +554,7 @@
       return     (1);
     }
-diff -rc src/src/libscotch/arch_tleaf.h new/src/libscotch/arch_tleaf.h
+diff -rc src/src/libscotch/arch_tleaf.h new2/src/libscotch/arch_tleaf.h
 *** src/src/libscotch/arch_tleaf.h	2008-05-22 06:44:41.000000000 -0700
---- new/src/libscotch/arch_tleaf.h	2010-04-06 15:51:57.576253410 -0700
+--- new2/src/libscotch/arch_tleaf.h	2010-04-26 10:35:09.875996627 -0700
 ***************
 *** 89,95 ****
@@ -571,7 +571,7 @@
   #define archTleafArchFree           NULL
   ArchDomNum                  archTleafDomNum     (const ArchTleaf * const, const ArchTleafDom * const);
-diff -rc src/src/libscotch/arch_torus.c new/src/libscotch/arch_torus.c
+diff -rc src/src/libscotch/arch_torus.c new2/src/libscotch/arch_torus.c
 *** src/src/libscotch/arch_torus.c	2008-05-22 06:44:41.000000000 -0700
---- new/src/libscotch/arch_torus.c	2010-04-06 15:51:57.583253419 -0700
+--- new2/src/libscotch/arch_torus.c	2010-04-26 10:35:09.883996634 -0700
 ***************
 *** 90,97 ****
@@ -670,7 +670,7 @@
       return     (1);
     }
-diff -rc src/src/libscotch/arch_torus.h new/src/libscotch/arch_torus.h
+diff -rc src/src/libscotch/arch_torus.h new2/src/libscotch/arch_torus.h
 *** src/src/libscotch/arch_torus.h	2008-05-22 06:44:41.000000000 -0700
---- new/src/libscotch/arch_torus.h	2010-04-06 15:51:57.590253427 -0700
+--- new2/src/libscotch/arch_torus.h	2010-04-26 10:35:09.890996640 -0700
 ***************
 *** 96,102 ****
@@ -701,7 +701,7 @@
   #define archTorus3ArchFree          NULL
   ArchDomNum                  archTorus3DomNum    (const ArchTorus3 * const, const ArchTorus3Dom * const);
-diff -rc src/src/libscotch/common.c new/src/libscotch/common.c
+diff -rc src/src/libscotch/common.c new2/src/libscotch/common.c
 *** src/src/libscotch/common.c	2008-05-22 06:44:41.000000000 -0700
---- new/src/libscotch/common.c	2010-04-06 15:51:57.597253436 -0700
+--- new2/src/libscotch/common.c	2010-04-26 10:35:09.897996646 -0700
 ***************
 *** 100,106 ****
@@ -720,7 +720,7 @@
 + #endif /* MATLAB */
   }
-diff -rc src/src/libscotch/common.h new/src/libscotch/common.h
+diff -rc src/src/libscotch/common.h new2/src/libscotch/common.h
 *** src/src/libscotch/common.h	2009-02-06 14:20:55.000000000 -0800
---- new/src/libscotch/common.h	2010-04-06 15:51:57.604253444 -0700
+--- new2/src/libscotch/common.h	2010-04-06 15:51:57.604253000 -0700
 ***************
 *** 66,71 ****
@@ -756,7 +756,160 @@
   **  Working definitions.
   */
-diff -rc src/src/libscotch/dummysizes.c new/src/libscotch/dummysizes.c
+diff -rc src/src/libscotch/common_integer.c new2/src/libscotch/common_integer.c
+*** src/src/libscotch/common_integer.c	2009-01-21 01:32:32.000000000 -0800
+--- new2/src/libscotch/common_integer.c	2010-04-27 11:27:22.228561248 -0700
+***************
+*** 205,210 ****
+--- 205,211 ----
+  void
+  intRandInit (void)
+  {
++   printf("intRandInit begin -- intrandflag=%d,intrandseed=%d\n",intrandflag,intrandseed);
+    if (intrandflag == 0) {                         /* If generator not yet initialized */
+  #if ! ((defined COMMON_DEBUG) || (defined COMMON_RANDOM_FIXED_SEED) || (defined SCOTCH_DETERMINISTIC))
+      intrandseed = time (NULL);                    /* Set random seed if needed */
+***************
+*** 216,221 ****
+--- 217,223 ----
+  #endif /* COMMON_RANDOM_RAND */
+      intrandflag = 1;                              /* Generator has been initialized */
+    }
++   printf("intRandInit end   -- intrandflag=%d,intrandseed=%d\n",intrandflag,intrandseed);
+  }
+  
+  /* This routine reinitializes the pseudo-random
+***************
+*** 228,233 ****
+--- 230,236 ----
+  void
+  intRandReset (void)
+  {
++   printf("intRandReset begin -- intrandflag=%d,intrandseed=%d\n",intrandflag,intrandseed);
+    if (intrandflag != 0) {                         /* Keep seed computed during first initialization */
+  #ifdef COMMON_RANDOM_RAND
+      srand (intrandseed);
+***************
+*** 237,242 ****
+--- 240,246 ----
+    }
+    else
+      intRandInit ();
++   printf("intRandReset end   -- intrandflag=%d,intrandseed=%d\n",intrandflag,intrandseed);
+  }
+  
+  /*********************/
+Only in new2/src/libscotch: common_integer_old.c
+diff -rc src/src/libscotch/common_memory.c new2/src/libscotch/common_memory.c
+*** src/src/libscotch/common_memory.c	2009-01-03 02:16:11.000000000 -0800
+--- new2/src/libscotch/common_memory.c	2010-04-29 14:32:20.883655193 -0700
+***************
+*** 87,93 ****
+--- 87,95 ----
+    size_t              newadd;
+    byte *              newptr;
+  
++   printf("memAllocRecord begin -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax);
+  #if (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD))
++   printf("memAllocRecord begin -- muteflag=%d,mutelocdat=%p\n",muteflag,mutelocdat);
+    if (muteflag != 0) {                            /* Unsafe code with respect to race conditions but should work as first allocs are sequential */
+      muteflag = 0;
+      pthread_mutex_init (&mutelocdat, NULL);       /* Initialize local mutex */
+***************
+*** 109,116 ****
+--- 111,120 ----
+  
+  #if (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD))
+    pthread_mutex_unlock (&mutelocdat);             /* Unlock local mutex */
++   printf("memAllocRecord end   -- muteflag=%d,mutelocdat=%p\n",muteflag,mutelocdat);
+  #endif /* (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD)) */
+  
++   printf("memAllocRecord end   -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax);
+    return ((void *) newptr);                       /* Return skewed pointer or NULL */
+  }
+  
+***************
+*** 124,133 ****
+--- 128,139 ----
+    size_t              oldsiz;
+    size_t              newadd;
+  
++   printf("memReallocRecord begin -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax);
+    tmpptr = ((byte *) oldptr) - COMMON_MEMORY_SKEW;
+    oldsiz = *((size_t *) tmpptr);
+  
+  #if (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD))
++   printf("memReallocRecord begin -- muteflag=%d,mutelocdat=%p\n",muteflag,mutelocdat);
+    pthread_mutex_lock (&mutelocdat);               /* Lock local mutex */
+  #endif /* (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD)) */
+  
+***************
+*** 145,152 ****
+--- 151,160 ----
+  
+  #if (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD))
+    pthread_mutex_unlock (&mutelocdat);             /* Unlock local mutex */
++   printf("memReallocRecord end   -- muteflag=%d,mutelocdat=%p\n",muteflag,mutelocdat);
+  #endif /* (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD)) */
+  
++   printf("memReallocRecord end   -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax);
+    return ((void *) newptr);                       /* Return skewed pointer or NULL */
+  }
+  
+***************
+*** 157,166 ****
+--- 165,176 ----
+    byte *              tmpptr;
+    size_t              oldsiz;
+  
++   printf("memFreeRecord begin -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax);
+    tmpptr = ((byte *) oldptr) - COMMON_MEMORY_SKEW;
+    oldsiz = *((size_t *) tmpptr);
+  
+  #if (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD))
++   printf("memFreeRecord begin -- muteflag=%d,mutelocdat=%p\n",muteflag,mutelocdat);
+    pthread_mutex_lock (&mutelocdat);               /* Lock local mutex */
+  #endif /* (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD)) */
+  
+***************
+*** 169,175 ****
+--- 179,187 ----
+  
+  #if (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD))
+    pthread_mutex_unlock (&mutelocdat);             /* Unlock local mutex */
++   printf("memFreeRecord end   -- muteflag=%d,mutelocdat=%p\n",muteflag,mutelocdat);
+  #endif /* (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD)) */
++   printf("memFreeRecord end   -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax);
+  }
+  
+  size_t
+***************
+*** 177,183 ****
+--- 189,197 ----
+  {
+    size_t              curmax;
+  
++   printf("memMax begin -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax);
+  #if (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD))
++   printf("memMax begin -- muteflag=%d,mutelocdat=%p\n",muteflag,mutelocdat);
+    pthread_mutex_lock (&mutelocdat);               /* Lock local mutex */
+  #endif /* (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD)) */
+  
+***************
+*** 185,192 ****
+--- 199,208 ----
+  
+  #if (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD))
+    pthread_mutex_unlock (&mutelocdat);             /* Unlock local mutex */
++   printf("memMax end   -- muteflag=%d,mutelocdat=%p\n",muteflag,mutelocdat);
+  #endif /* (defined (COMMON_PTHREAD) || defined (SCOTCH_PTHREAD)) */
+  
++   printf("memMax end   -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax);
+    return (curmax);
+  }
+  #endif /* COMMON_MEMORY_TRACE */
+Only in new2/src/libscotch: common_memory_old.c
+diff -rc src/src/libscotch/dummysizes.c new2/src/libscotch/dummysizes.c
 *** src/src/libscotch/dummysizes.c	2009-05-09 16:08:02.000000000 -0700
---- new/src/libscotch/dummysizes.c	2010-04-06 15:51:57.611253453 -0700
+--- new2/src/libscotch/dummysizes.c	2010-04-26 10:35:09.912996659 -0700
 ***************
 *** 267,271 ****
@@ -769,7 +922,7 @@
 + #endif /* MATLAB */
   }
-diff -rc src/src/libscotch/graph.c new/src/libscotch/graph.c
+diff -rc src/src/libscotch/graph.c new2/src/libscotch/graph.c
 *** src/src/libscotch/graph.c	2008-05-22 06:44:42.000000000 -0700
---- new/src/libscotch/graph.c	2010-04-06 15:51:57.618253461 -0700
+--- new2/src/libscotch/graph.c	2010-04-26 10:35:09.920996666 -0700
 ***************
 *** 135,141 ****
@@ -792,7 +945,7 @@
       if ((grafptr->edlotax != NULL) &&
           ((grafptr->flagval & GRAPHEDGEGROUP) == 0))
-diff -rc src/src/libscotch/graph.h new/src/libscotch/graph.h
+diff -rc src/src/libscotch/graph.h new2/src/libscotch/graph.h
 *** src/src/libscotch/graph.h	2008-06-01 02:49:11.000000000 -0700
---- new/src/libscotch/graph.h	2010-04-06 15:51:57.624253469 -0700
+--- new2/src/libscotch/graph.h	2010-04-26 10:35:09.927996672 -0700
 ***************
 *** 159,165 ****
@@ -809,7 +962,7 @@
   int                         graphSave           (const Graph * const, FILE * const);
   Gnum                        graphBase           (Graph * const, const Gnum);
-diff -rc src/src/libscotch/graph_io.c new/src/libscotch/graph_io.c
+diff -rc src/src/libscotch/graph_io.c new2/src/libscotch/graph_io.c
 *** src/src/libscotch/graph_io.c	2008-05-22 06:44:42.000000000 -0700
---- new/src/libscotch/graph_io.c	2010-04-06 15:51:57.632253478 -0700
+--- new2/src/libscotch/graph_io.c	2010-04-26 10:35:09.936996680 -0700
 ***************
 *** 86,92 ****
@@ -1047,7 +1200,7 @@
     }
   
-diff -rc src/src/libscotch/graph_io_scot.c new/src/libscotch/graph_io_scot.c
+diff -rc src/src/libscotch/graph_io_scot.c new2/src/libscotch/graph_io_scot.c
 *** src/src/libscotch/graph_io_scot.c	2008-05-22 06:44:42.000000000 -0700
---- new/src/libscotch/graph_io_scot.c	2010-04-06 15:51:57.638253486 -0700
+--- new2/src/libscotch/graph_io_scot.c	2010-04-26 10:35:09.944996687 -0700
 ***************
 *** 89,95 ****
@@ -1064,7 +1217,7 @@
     }
   
-diff -rc src/src/libscotch/library_arch.c new/src/libscotch/library_arch.c
+diff -rc src/src/libscotch/library_arch.c new2/src/libscotch/library_arch.c
 *** src/src/libscotch/library_arch.c	2008-05-22 06:44:42.000000000 -0700
---- new/src/libscotch/library_arch.c	2010-04-06 15:51:57.644253493 -0700
+--- new2/src/libscotch/library_arch.c	2010-04-26 10:35:09.952996693 -0700
 ***************
 *** 120,128 ****
@@ -1099,7 +1252,7 @@
   
   /*+ This routine saves the given opaque
-diff -rc src/src/libscotch/library_arch_f.c new/src/libscotch/library_arch_f.c
+diff -rc src/src/libscotch/library_arch_f.c new2/src/libscotch/library_arch_f.c
 *** src/src/libscotch/library_arch_f.c	2008-05-22 06:44:42.000000000 -0700
---- new/src/libscotch/library_arch_f.c	2010-04-06 15:51:57.651253502 -0700
+--- new2/src/libscotch/library_arch_f.c	2010-04-26 10:35:09.959996699 -0700
 ***************
 *** 121,127 ****
@@ -1116,7 +1269,7 @@
     fclose (stream);                                /* This closes filenum too */
   
-diff -rc src/src/libscotch/library_error_exit.c new/src/libscotch/library_error_exit.c
+diff -rc src/src/libscotch/library_error_exit.c new2/src/libscotch/library_error_exit.c
 *** src/src/libscotch/library_error_exit.c	2009-01-20 00:36:33.000000000 -0800
---- new/src/libscotch/library_error_exit.c	2010-04-06 15:51:57.657253509 -0700
+--- new2/src/libscotch/library_error_exit.c	2010-04-26 10:35:09.966996705 -0700
 ***************
 *** 114,119 ****
@@ -1191,7 +1344,7 @@
 + #endif /* MATLAB */
   }
-diff -rc src/src/libscotch/library_graph.c new/src/libscotch/library_graph.c
+diff -rc src/src/libscotch/library_graph.c new2/src/libscotch/library_graph.c
 *** src/src/libscotch/library_graph.c	2008-05-22 07:28:12.000000000 -0700
---- new/src/libscotch/library_graph.c	2010-04-06 15:51:57.664253518 -0700
+--- new2/src/libscotch/library_graph.c	2010-04-26 10:35:09.973996711 -0700
 ***************
 *** 137,143 ****
@@ -1236,7 +1389,7 @@
   
   /*+ This routine saves the contents of the given
-diff -rc src/src/libscotch/library_graph_f.c new/src/libscotch/library_graph_f.c
+diff -rc src/src/libscotch/library_graph_f.c new2/src/libscotch/library_graph_f.c
 *** src/src/libscotch/library_graph_f.c	2008-05-22 06:44:43.000000000 -0700
---- new/src/libscotch/library_graph_f.c	2010-04-06 15:51:57.671253526 -0700
+--- new2/src/libscotch/library_graph_f.c	2010-04-26 10:35:09.981996718 -0700
 ***************
 *** 136,142 ****
@@ -1253,7 +1406,7 @@
     fclose (stream);                                /* This closes filenum too */
   
-diff -rc src/src/libscotch/library_graph_map.c new/src/libscotch/library_graph_map.c
+diff -rc src/src/libscotch/library_graph_map.c new2/src/libscotch/library_graph_map.c
 *** src/src/libscotch/library_graph_map.c	2008-09-28 04:04:05.000000000 -0700
---- new/src/libscotch/library_graph_map.c	2010-04-06 15:51:57.678253535 -0700
+--- new2/src/libscotch/library_graph_map.c	2010-04-06 15:51:57.678253000 -0700
 ***************
 *** 182,192 ****
@@ -1278,7 +1431,7 @@
   
   /*+ This routine computes a mapping
-diff -rc src/src/libscotch/library_graph_map_f.c new/src/libscotch/library_graph_map_f.c
+diff -rc src/src/libscotch/library_graph_map_f.c new2/src/libscotch/library_graph_map_f.c
 *** src/src/libscotch/library_graph_map_f.c	2008-06-28 03:44:26.000000000 -0700
---- new/src/libscotch/library_graph_map_f.c	2010-04-06 15:51:57.684253542 -0700
+--- new2/src/libscotch/library_graph_map_f.c	2010-04-26 10:35:09.995996730 -0700
 ***************
 *** 183,189 ****
@@ -1295,7 +1448,8 @@
     fclose (stream);                                /* This closes filenum too */
   
-diff -rc src/src/libscotch/library.h new/src/libscotch/library.h
+Only in new2/src/libscotch: library_graph_map_save.c
+diff -rc src/src/libscotch/library.h new2/src/libscotch/library.h
 *** src/src/libscotch/library.h	2009-05-09 16:08:03.000000000 -0700
---- new/src/libscotch/library.h	2010-04-06 15:51:57.691253550 -0700
+--- new2/src/libscotch/library.h	2010-04-26 10:35:10.002996736 -0700
 ***************
 *** 134,140 ****
@@ -1340,7 +1494,7 @@
   int                         SCOTCH_graphMapCompute (const SCOTCH_Graph * const, SCOTCH_Mapping * const, const SCOTCH_Strat * const);
   int                         SCOTCH_graphMap     (const SCOTCH_Graph * const, const SCOTCH_Arch * const, const SCOTCH_Strat * const, SCOTCH_Num * const);
-diff -rc src/src/libscotch/Makefile new/src/libscotch/Makefile
+diff -rc src/src/libscotch/Makefile new2/src/libscotch/Makefile
 *** src/src/libscotch/Makefile	2009-05-09 16:08:04.000000000 -0700
---- new/src/libscotch/Makefile	2010-04-06 15:51:57.700253561 -0700
+--- new2/src/libscotch/Makefile	2010-04-26 10:35:10.011996000 -0700
 ***************
 *** 49,55 ****
@@ -1379,7 +1533,8 @@
   					-$(CP) scotch.h scotchf.h $(includedir)
   					-$(CP) libscotch$(LIB) libscotcherr*$(LIB) $(libdir)
-diff -rc src/src/libscotch/mapping.h new/src/libscotch/mapping.h
+Only in new2/src/libscotch: Makefile_save
+diff -rc src/src/libscotch/mapping.h new2/src/libscotch/mapping.h
 *** src/src/libscotch/mapping.h	2008-10-27 08:27:47.000000000 -0700
---- new/src/libscotch/mapping.h	2010-04-06 15:51:57.708253571 -0700
+--- new2/src/libscotch/mapping.h	2010-04-26 10:35:10.019996751 -0700
 ***************
 *** 106,112 ****
@@ -1396,7 +1551,7 @@
   
   #undef static
-diff -rc src/src/libscotch/mapping_io.c new/src/libscotch/mapping_io.c
+diff -rc src/src/libscotch/mapping_io.c new2/src/libscotch/mapping_io.c
 *** src/src/libscotch/mapping_io.c	2008-05-22 06:44:43.000000000 -0700
---- new/src/libscotch/mapping_io.c	2010-04-06 15:51:57.714253579 -0700
+--- new2/src/libscotch/mapping_io.c	2010-04-26 10:35:10.026996757 -0700
 ***************
 *** 199,204 ****
@@ -1485,7 +1640,7 @@
     return (0);
   }
-diff -rc src/src/libscotch/mesh_io_scot.c new/src/libscotch/mesh_io_scot.c
+diff -rc src/src/libscotch/mesh_io_scot.c new2/src/libscotch/mesh_io_scot.c
 *** src/src/libscotch/mesh_io_scot.c	2008-05-22 06:44:43.000000000 -0700
---- new/src/libscotch/mesh_io_scot.c	2010-04-06 15:51:57.721253587 -0700
+--- new2/src/libscotch/mesh_io_scot.c	2010-04-26 10:35:10.033996763 -0700
 ***************
 *** 85,91 ****
@@ -1502,7 +1657,75 @@
     }
   
-diff -rc src/src/Makefile new/src/Makefile
+diff -rc src/src/libscotch/parser_ll.l new2/src/libscotch/parser_ll.l
+*** src/src/libscotch/parser_ll.l	2008-05-22 06:44:43.000000000 -0700
+--- new2/src/libscotch/parser_ll.l	2010-04-29 14:45:27.766400063 -0700
+***************
+*** 192,197 ****
+--- 192,214 ----
+  stratParserInit (
+  const char * const          string)               /*+ Strategy string to parse +*/
+  {
++ /*  reset static variables from previous runs (jes, 4/29/10)  */
++   yy_current_buffer = 0;
++   yy_hold_char = (char) 0;
++   yy_n_chars=0;          /* number of characters read into yy_ch_buf */
++   yy_c_buf_p = (char *) 0;
++   yy_init = 1;         /* whether we need to initialize */
++   yy_start = 0;        /* start state number */
++   yy_did_buffer_switch_on_eof=0;
++   yy_last_accepting_state=0;
++   yy_last_accepting_cpos = (char *) 0;
++   stratparserstringptr = (char *) 0; /* Pointer to the string to parse */
++ #if YY_STACK_USED
++   yy_start_stack_ptr = 0;
++   yy_start_stack_depth = 0;
++   yy_start_stack = 0;
++ #endif
++ 
+  #ifdef FLEX_SCANNER
+    yyrestart (yyin);                               /* (Re-)initialize the parser */
+  #endif /* FLEX_SCANNER */
+Only in new2/src/libscotch: parser_ll_save.c
+Only in new2/src/libscotch: parser_yy_save.c
+diff -rc src/src/libscotch/parser_yy.y new2/src/libscotch/parser_yy.y
+*** src/src/libscotch/parser_yy.y	2008-10-22 15:12:48.000000000 -0700
+--- new2/src/libscotch/parser_yy.y	2010-04-29 11:48:09.378829347 -0700
+***************
+*** 774,779 ****
+--- 774,780 ----
+    stratParserInit (string);                       /* Initialize the lexical parser           */
+    parserstrattab  = strattab;                     /* Point to the parsing tables             */
+    parserstratcurr = NULL;                         /* Clear up the temporary strategy pointer */
++   parserparamcurr = NULL;                         /* reset the last static (jes, 4/29/10)    */
+  
+    if (stratParserParse2 () != 0) {                /* Parse the strategy string */
+      if (parserstratcurr != NULL)
+diff -rc src/src/libscotch/vgraph_separate_vw.c new2/src/libscotch/vgraph_separate_vw.c
+*** src/src/libscotch/vgraph_separate_vw.c	2008-05-22 06:44:43.000000000 -0700
+--- new2/src/libscotch/vgraph_separate_vw.c	2010-04-27 11:34:15.756132566 -0700
+***************
+*** 83,88 ****
+--- 83,89 ----
+    FILE * restrict     fileptr;
+    Gnum                vertnum;                    /* Vertex number */
+  
++   printf("vgraphSeparateVw begin -- vgraphseparatevwfilenum=%d\n",vgraphseparatevwfilenum);
+    sprintf (nametab, "vgraphseparatevw_output_%08d.map", vgraphseparatevwfilenum ++);
+    if ((fileptr = fopen (nametab, "w+")) == NULL) {
+      errorPrint ("vgraphSeparateVw: cannot open partition file");
+***************
+*** 102,106 ****
+--- 103,108 ----
+      }
+    }
+  
++   printf("vgraphSeparateVw end   -- vgraphseparatevwfilenum=%d\n",vgraphseparatevwfilenum);
+    return (0);
+  }
+Only in new2/src/libscotch: .vgraph_separate_vw.c.swp
+Only in new2/src/libscotch: vgraph_separate_vw_old.c
+diff -rc src/src/Makefile new2/src/Makefile
 *** src/src/Makefile	2008-09-15 05:50:51.000000000 -0700
---- new/src/Makefile	2010-04-06 15:51:57.728253596 -0700
+--- new2/src/Makefile	2010-04-26 10:35:10.040996769 -0700
 ***************
 *** 97,102 ****
@@ -1518,11 +1741,10 @@
   					-$(CP) -f ../bin/[agm]*$(EXE) $(bindir)
   					-$(CP) -f ../include/*scotch*.h $(includedir)
-Only in new/src: Makefile.inc
-Only in new/src/scotch: gmap_mex.c
-Only in new/src/scotch: gmap_mex_save.c
-Only in new/src/scotch: gmapx.c
-diff -rc src/src/scotch/Makefile new/src/scotch/Makefile
+Only in new2/src: Makefile.inc
+Only in new2/src/scotch: gmap_mex.c
+Only in new2/src/scotch: gmapx.c
+diff -rc src/src/scotch/Makefile new2/src/scotch/Makefile
 *** src/src/scotch/Makefile	2009-04-27 02:19:43.000000000 -0700
---- new/src/scotch/Makefile	2010-04-22 15:56:37.518839458 -0700
+--- new2/src/scotch/Makefile	2010-04-26 10:35:10.048996776 -0700
 ***************
 *** 49,59 ****
@@ -1605,3 +1827,2 @@
 + 					$(libdir)/libscotcherrexit$(LIB)	\
 + 					gmap.h
-Only in new/src/scotch: Makefile_save
Index: /issm/trunk/externalpackages/scotch/scotch_jes_notes.txt
===================================================================
--- /issm/trunk/externalpackages/scotch/scotch_jes_notes.txt	(revision 3638)
+++ /issm/trunk/externalpackages/scotch/scotch_jes_notes.txt	(revision 3639)
@@ -293,2 +293,10 @@
 - separated gmap_mex.c driver into gmap_mex.c matlab-layer (independent of scotch) and gmapx.c x-layer (independent of matlab).
 
+4/29/10:
+
+- made changes to gmapx.c, parser_yy.y/stratParserParse, and
+  parser_ll.l/stratParserInit to reset static variables from previous runs.
+also inserted print statements into common_integer.c/intRand*,
+common_memory.c/mem*, and vgraph_separate_vw.c/vgraphSeparateVw to monitor
+static variables in case those have to be reset.
+
