Index: /issm/trunk/externalpackages/scotch/scotch.patch
===================================================================
--- /issm/trunk/externalpackages/scotch/scotch.patch	(revision 4649)
+++ /issm/trunk/externalpackages/scotch/scotch.patch	(revision 4650)
@@ -1,26 +1,10 @@
-Only in new4: bin
-Only in new4: include
-Only in new4: lib
-diff -rc src/src/libscotch/arch.c new4/src/libscotch/arch.c
-*** src/src/libscotch/arch.c	2008-09-27 07:48:01.000000000 -0700
---- new4/src/libscotch/arch.c	2010-05-03 15:37:55.104089848 -0700
-***************
-*** 173,187 ****
-  int
-  archLoad (
-  Arch * restrict const       archptr,
-! FILE * const                stream)
-  {
-    const ArchClass * restrict  class;              /* Pointer to architecture class */
-    char                        name[256];          /* Architecture name string      */
-  
-    if (fscanf (stream, "%255s", name) != 1) {      /* Read architecture name */
-      errorPrint ("archLoad: cannot load architecture type");
-      return     (1);
-    }
-    name[255] = '\0';                               /* Set end of string */
-  
-    if ((class = archClass (name)) == NULL) {       /* Get class from its name */
---- 173,203 ----
+Only in src: bin
+Only in src: include
+Only in src: lib
+diff -rc src/src/libscotch/arch.c old/src/libscotch/arch.c
+*** src/src/libscotch/arch.c	2010-07-19 10:53:22.888731718 -0700
+--- old/src/libscotch/arch.c	2008-09-27 07:48:01.000000000 -0700
+***************
+*** 173,203 ****
   int
   archLoad (
@@ -38,50 +22,55 @@
     char                        name[256];          /* Architecture name string      */
   
-+ #ifdef MATLAB
-+   printf("archLoad - stream=%p; archtyp=\"%s\"\n",stream,archtyp);
-+   printf("archLoad - napar=%d,archpar=%p\n",napar,archpar);
-+ #endif /* MATLAB */
-+ 
-+ #ifndef MATLAB
+- #ifdef MATLAB
+-   printf("archLoad - stream=%p; archtyp=\"%s\"\n",stream,archtyp);
+-   printf("archLoad - napar=%d,archpar=%p\n",napar,archpar);
+- #endif /* MATLAB */
+- 
+- #ifndef MATLAB
     if (fscanf (stream, "%255s", name) != 1) {      /* Read architecture name */
       errorPrint ("archLoad: cannot load architecture type");
       return     (1);
     }
-+ #else /* MATLAB */
-+   strcpy(name,archtyp);
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+-   strcpy(name,archtyp);
+- #endif /* MATLAB */
     name[255] = '\0';                               /* Set end of string */
   
     if ((class = archClass (name)) == NULL) {       /* Get class from its name */
-***************
-*** 190,196 ****
---- 206,216 ----
+--- 173,187 ----
+  int
+  archLoad (
+  Arch * restrict const       archptr,
+! FILE * const                stream)
+  {
+    const ArchClass * restrict  class;              /* Pointer to architecture class */
+    char                        name[256];          /* Architecture name string      */
+  
+    if (fscanf (stream, "%255s", name) != 1) {      /* Read architecture name */
+      errorPrint ("archLoad: cannot load architecture type");
+      return     (1);
+    }
+    name[255] = '\0';                               /* Set end of string */
+  
+    if ((class = archClass (name)) == NULL) {       /* Get class from its name */
+***************
+*** 206,216 ****
     }
   
     if (class->archLoad != NULL) {                  /* If class has loading function */
-+ #ifndef MATLAB
+- #ifndef MATLAB
       if (class->archLoad (&archptr->data, stream) != 0) { /* Load class data        */
-+ #else /* MATLAB */
-+     if (class->archLoad (&archptr->data, stream, napar, archpar) != 0) { /* Load class data        */
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+-     if (class->archLoad (&archptr->data, stream, napar, archpar) != 0) { /* Load class data        */
+- #endif /* MATLAB */
         errorPrint ("archLoad: cannot load architecture data");
         memset     (archptr, 0, sizeof (Arch));     /* Initialize architecture body */
         return     (1);
-diff -rc src/src/libscotch/arch_cmplt.c new4/src/libscotch/arch_cmplt.c
-*** src/src/libscotch/arch_cmplt.c	2008-05-22 06:44:41.000000000 -0700
---- new4/src/libscotch/arch_cmplt.c	2010-05-03 15:37:55.111089854 -0700
-***************
-*** 90,99 ****
-  int
-  archCmpltArchLoad (
-  ArchCmplt * restrict const  archptr,
-! FILE * restrict const       stream)
-  {
-    long                numnbr;
-  
-  #ifdef SCOTCH_DEBUG_ARCH1
-    if ((sizeof (ArchCmplt)    > sizeof (ArchDummy)) ||
-        (sizeof (ArchCmpltDom) > sizeof (ArchDomDummy))) {
---- 90,109 ----
+--- 190,196 ----
+diff -rc src/src/libscotch/arch_cmplt.c old/src/libscotch/arch_cmplt.c
+*** src/src/libscotch/arch_cmplt.c	2010-07-19 10:53:22.891731738 -0700
+--- old/src/libscotch/arch_cmplt.c	2008-05-22 06:44:41.000000000 -0700
+***************
+*** 90,109 ****
   int
   archCmpltArchLoad (
@@ -97,62 +86,60 @@
     long                numnbr;
   
-+ #ifdef MATLAB
-+   printf("archCmpltArchLoad - napar=%d,archpar=%p\n",napar,archpar);
-+ #endif /* MATLAB */
-+ 
+- #ifdef MATLAB
+-   printf("archCmpltArchLoad - napar=%d,archpar=%p\n",napar,archpar);
+- #endif /* MATLAB */
+- 
   #ifdef SCOTCH_DEBUG_ARCH1
     if ((sizeof (ArchCmplt)    > sizeof (ArchDummy)) ||
         (sizeof (ArchCmpltDom) > sizeof (ArchDomDummy))) {
-***************
-*** 102,109 ****
---- 112,124 ----
+--- 90,99 ----
+  int
+  archCmpltArchLoad (
+  ArchCmplt * restrict const  archptr,
+! FILE * restrict const       stream)
+  {
+    long                numnbr;
+  
+  #ifdef SCOTCH_DEBUG_ARCH1
+    if ((sizeof (ArchCmplt)    > sizeof (ArchDummy)) ||
+        (sizeof (ArchCmpltDom) > sizeof (ArchDomDummy))) {
+***************
+*** 112,124 ****
     }
   #endif /* SCOTCH_DEBUG_ARCH1 */
   
-+ #ifndef MATLAB
+- #ifndef MATLAB
     if ((fscanf (stream, "%ld", &numnbr) != 1) ||
         (numnbr < 1)) {
-+ #else /* MATLAB */
-+   if ((napar < 1) ||
-+       ((numnbr=(long)archpar[0]) < 1)) {
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+-   if ((napar < 1) ||
+-       ((numnbr=(long)archpar[0]) < 1)) {
+- #endif /* MATLAB */
       errorPrint ("archCmpltArchLoad: bad input");
       return     (1);
     }
-diff -rc src/src/libscotch/arch_cmplt.h new4/src/libscotch/arch_cmplt.h
-*** src/src/libscotch/arch_cmplt.h	2008-05-22 06:44:41.000000000 -0700
---- new4/src/libscotch/arch_cmplt.h	2010-05-03 15:37:55.118089860 -0700
-***************
-*** 87,93 ****
---- 87,97 ----
+--- 102,109 ----
+diff -rc src/src/libscotch/arch_cmplt.h old/src/libscotch/arch_cmplt.h
+*** src/src/libscotch/arch_cmplt.h	2010-07-19 10:53:22.893731751 -0700
+--- old/src/libscotch/arch_cmplt.h	2008-05-22 06:44:41.000000000 -0700
+***************
+*** 87,97 ****
   #define static
   #endif
   
-+ #ifndef MATLAB
+- #ifndef MATLAB
   int                         archCmpltArchLoad   (ArchCmplt * restrict const, FILE * restrict const);
-+ #else /* MATLAB */
-+ int                         archCmpltArchLoad   (ArchCmplt * restrict const, FILE * restrict const, const Anum, const Anum *);
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+- int                         archCmpltArchLoad   (ArchCmplt * restrict const, FILE * restrict const, const Anum, const Anum *);
+- #endif /* MATLAB */
   int                         archCmpltArchSave   (const ArchCmplt * const, FILE * restrict const);
   #define archCmpltArchFree           NULL
   ArchDomNum                  archCmpltDomNum     (const ArchCmplt * const, const ArchCmpltDom * const);
-diff -rc src/src/libscotch/arch_cmpltw.c new4/src/libscotch/arch_cmpltw.c
-*** src/src/libscotch/arch_cmpltw.c	2008-08-27 14:22:22.000000000 -0700
---- new4/src/libscotch/arch_cmpltw.c	2010-05-03 15:37:55.126089866 -0700
-***************
-*** 200,211 ****
-  int
-  archCmpltwArchLoad (
-  ArchCmpltw * restrict const  archptr,
-! FILE * restrict const       stream)
-  {
-    long                vertnbr;
-    Gnum                velosum;
-    Anum                vertnum;
-  
-  #ifdef SCOTCH_DEBUG_ARCH1
-    if ((sizeof (ArchCmpltw)    > sizeof (ArchDummy)) ||
-        (sizeof (ArchCmpltwDom) > sizeof (ArchDomDummy))) {
---- 200,221 ----
+--- 87,93 ----
+diff -rc src/src/libscotch/arch_cmpltw.c old/src/libscotch/arch_cmpltw.c
+*** src/src/libscotch/arch_cmpltw.c	2010-07-19 10:53:22.896731770 -0700
+--- old/src/libscotch/arch_cmpltw.c	2008-08-27 14:22:22.000000000 -0700
+***************
+*** 200,221 ****
   int
   archCmpltwArchLoad (
@@ -170,73 +157,78 @@
     Anum                vertnum;
   
-+ #ifdef MATLAB
-+   printf("archCmpltwArchLoad - napar=%d,archpar=%p\n",napar,archpar);
-+ #endif /* MATLAB */
-+ 
+- #ifdef MATLAB
+-   printf("archCmpltwArchLoad - napar=%d,archpar=%p\n",napar,archpar);
+- #endif /* MATLAB */
+- 
   #ifdef SCOTCH_DEBUG_ARCH1
     if ((sizeof (ArchCmpltw)    > sizeof (ArchDummy)) ||
         (sizeof (ArchCmpltwDom) > sizeof (ArchDomDummy))) {
-***************
-*** 214,221 ****
---- 224,236 ----
+--- 200,211 ----
+  int
+  archCmpltwArchLoad (
+  ArchCmpltw * restrict const  archptr,
+! FILE * restrict const       stream)
+  {
+    long                vertnbr;
+    Gnum                velosum;
+    Anum                vertnum;
+  
+  #ifdef SCOTCH_DEBUG_ARCH1
+    if ((sizeof (ArchCmpltw)    > sizeof (ArchDummy)) ||
+        (sizeof (ArchCmpltwDom) > sizeof (ArchDomDummy))) {
+***************
+*** 224,236 ****
     }
   #endif /* SCOTCH_DEBUG_ARCH1 */
   
-+ #ifndef MATLAB
+- #ifndef MATLAB
     if ((fscanf (stream, "%ld", &vertnbr) != 1) ||
         (vertnbr < 1)) {
-+ #else /* MATLAB */
-+   if ((napar < 1) ||
-+       ((vertnbr=(long)archpar[0]) < 1)) {
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+-   if ((napar < 1) ||
+-       ((vertnbr=(long)archpar[0]) < 1)) {
+- #endif /* MATLAB */
       errorPrint ("archCmpltwArchLoad: bad input (1)");
       return     (1);
     }
-***************
-*** 230,237 ****
---- 245,257 ----
+--- 214,221 ----
+***************
+*** 245,257 ****
       long                veloval;
       Gnum                velotmp;
   
-+ #ifndef MATLAB
+- #ifndef MATLAB
       if ((fscanf (stream, "%ld", &veloval) != 1) ||
           (veloval < 1)) {
-+ #else /* MATLAB */
-+     if ((napar < 1+(vertnum+1)) ||
-+         ((veloval=(long)archpar[1+(vertnum+1)]) < 1)) {
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+-     if ((napar < 1+(vertnum+1)) ||
+-         ((veloval=(long)archpar[1+(vertnum+1)]) < 1)) {
+- #endif /* MATLAB */
         errorPrint ("archCmpltwArchLoad: bad input (2)");
         return     (1);
       }
-diff -rc src/src/libscotch/arch_cmpltw.h new4/src/libscotch/arch_cmpltw.h
-*** src/src/libscotch/arch_cmpltw.h	2008-05-22 06:44:41.000000000 -0700
---- new4/src/libscotch/arch_cmpltw.h	2010-05-03 15:37:55.133089872 -0700
-***************
-*** 86,92 ****
---- 86,96 ----
+--- 230,237 ----
+diff -rc src/src/libscotch/arch_cmpltw.h old/src/libscotch/arch_cmpltw.h
+*** src/src/libscotch/arch_cmpltw.h	2010-07-19 10:53:22.899731789 -0700
+--- old/src/libscotch/arch_cmpltw.h	2008-05-22 06:44:41.000000000 -0700
+***************
+*** 86,96 ****
   #endif
   
   int                         archCmpltwArchBuild (ArchCmpltw * restrict const archptr, const Gnum, const Gnum * restrict const);
-+ #ifndef MATLAB
+- #ifndef MATLAB
   int                         archCmpltwArchLoad  (ArchCmpltw * restrict const, FILE * restrict const);
-+ #else /* MATLAB */
-+ int                         archCmpltwArchLoad  (ArchCmpltw * restrict const, FILE * restrict const, const Anum, const Anum *);
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+- int                         archCmpltwArchLoad  (ArchCmpltw * restrict const, FILE * restrict const, const Anum, const Anum *);
+- #endif /* MATLAB */
   int                         archCmpltwArchSave  (const ArchCmpltw * const, FILE * restrict const);
   int                         archCmpltwArchFree  (ArchCmpltw * restrict const);
   ArchDomNum                  archCmpltwDomNum    (const ArchCmpltw * const, const ArchCmpltwDom * const);
-diff -rc src/src/libscotch/arch_deco.c new4/src/libscotch/arch_deco.c
-*** src/src/libscotch/arch_deco.c	2008-09-28 06:35:27.000000000 -0700
---- new4/src/libscotch/arch_deco.c	2010-05-03 15:37:55.180089911 -0700
-***************
-*** 211,217 ****
-  int
-  archDecoArchLoad (
-  ArchDeco * restrict const   archptr,
-! FILE * restrict const       stream)
-  {
-    INT                         decotype;           /* Type of decomposition                            */
-    INT                         termdomnbr;         /* Number of terminal domains (ie processors)       */
---- 211,223 ----
+--- 86,92 ----
+diff -rc src/src/libscotch/arch_deco.c old/src/libscotch/arch_deco.c
+*** src/src/libscotch/arch_deco.c	2010-07-19 10:53:22.902731808 -0700
+--- old/src/libscotch/arch_deco.c	2008-09-28 06:35:27.000000000 -0700
+***************
+*** 211,223 ****
   int
   archDecoArchLoad (
@@ -252,67 +244,66 @@
     INT                         decotype;           /* Type of decomposition                            */
     INT                         termdomnbr;         /* Number of terminal domains (ie processors)       */
-***************
-*** 220,225 ****
---- 226,237 ----
+--- 211,217 ----
+  int
+  archDecoArchLoad (
+  ArchDeco * restrict const   archptr,
+! FILE * restrict const       stream)
+  {
+    INT                         decotype;           /* Type of decomposition                            */
+    INT                         termdomnbr;         /* Number of terminal domains (ie processors)       */
+***************
+*** 226,237 ****
     Anum * restrict             termdisttab;        /* Table of terminal-to-terminal distances          */
     INT                         i, j;
   
-+ #ifdef MATLAB
-+   printf("archDecoArchLoad - napar=%d,archpar=%p\n",napar,archpar);
-+   errorPrint ("archDecoArchLoad - not yet converted to matlab matrices");
-+   return     (1);
-+ #endif /* MATLAB */
-+ 
+- #ifdef MATLAB
+-   printf("archDecoArchLoad - napar=%d,archpar=%p\n",napar,archpar);
+-   errorPrint ("archDecoArchLoad - not yet converted to matlab matrices");
+-   return     (1);
+- #endif /* MATLAB */
+- 
   #ifdef SCOTCH_DEBUG_ARCH1
     if ((sizeof (ArchDeco)    > sizeof (ArchDummy)) ||
         (sizeof (ArchDecoDom) > sizeof (ArchDomDummy))) {
-diff -rc src/src/libscotch/arch_deco.h new4/src/libscotch/arch_deco.h
-*** src/src/libscotch/arch_deco.h	2008-09-27 07:49:46.000000000 -0700
---- new4/src/libscotch/arch_deco.h	2010-05-03 15:37:55.187089917 -0700
-***************
-*** 113,119 ****
---- 113,123 ----
+--- 220,225 ----
+diff -rc src/src/libscotch/arch_deco.h old/src/libscotch/arch_deco.h
+*** src/src/libscotch/arch_deco.h	2010-07-19 10:53:22.904731821 -0700
+--- old/src/libscotch/arch_deco.h	2008-09-27 07:49:46.000000000 -0700
+***************
+*** 113,123 ****
   #endif
   
   int                         archDecoArchBuild   (ArchDeco * const, const Anum, const Anum, const ArchDecoTermVert * const, const Anum  * const);
-+ #ifndef MATLAB
+- #ifndef MATLAB
   int                         archDecoArchLoad    (ArchDeco * const, FILE * restrict const);
-+ #else /* MATLAB */
-+ int                         archDecoArchLoad    (ArchDeco * const, FILE * restrict const, const Anum, const Anum *);
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+- int                         archDecoArchLoad    (ArchDeco * const, FILE * restrict const, const Anum, const Anum *);
+- #endif /* MATLAB */
   int                         archDecoArchSave    (const ArchDeco * const, FILE * restrict const);
   int                         archDecoArchFree    (ArchDeco * const);
   Anum                        archDecoArchSize    (ArchDeco * const, const Anum);
-diff -rc src/src/libscotch/arch.h new4/src/libscotch/arch.h
-*** src/src/libscotch/arch.h	2009-04-28 08:11:27.000000000 -0700
---- new4/src/libscotch/arch.h	2010-05-03 15:37:55.194089922 -0700
-***************
-*** 175,181 ****
---- 175,185 ----
+--- 113,119 ----
+diff -rc src/src/libscotch/arch.h old/src/libscotch/arch.h
+*** src/src/libscotch/arch.h	2010-07-19 10:53:22.907731841 -0700
+--- old/src/libscotch/arch.h	2009-04-28 08:11:27.000000000 -0700
+***************
+*** 175,185 ****
   int                         archInit            (Arch * restrict const);
   int                         archExit            (Arch * restrict const);
   int                         archFree            (Arch * restrict const);
-+ #ifndef MATLAB
+- #ifndef MATLAB
   int                         archLoad            (Arch * restrict const, FILE * const);
-+ #else /* MATLAB */
-+ int                         archLoad            (Arch * restrict const, FILE * const, const char *, const Anum, const Anum *);
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+- int                         archLoad            (Arch * restrict const, FILE * const, const char *, const Anum, const Anum *);
+- #endif /* MATLAB */
   int                         archSave            (const Arch * const, FILE * const);
   char *                      archName            (const Arch * const);
   const ArchClass *           archClass           (const char * const);
-diff -rc src/src/libscotch/arch_hcub.c new4/src/libscotch/arch_hcub.c
-*** src/src/libscotch/arch_hcub.c	2008-05-22 06:44:41.000000000 -0700
---- new4/src/libscotch/arch_hcub.c	2010-05-03 15:37:55.201089928 -0700
-***************
-*** 88,95 ****
-  int
-  archHcubArchLoad (
-  ArchHcub * restrict const   archptr,
-! FILE * restrict const       stream)
-! {
-  #ifdef SCOTCH_DEBUG_ARCH1
-    if ((sizeof (ArchHcub)    > sizeof (ArchDummy)) ||
-        (sizeof (ArchHcubDom) > sizeof (ArchDomDummy))) {
---- 88,105 ----
+--- 175,181 ----
+diff -rc src/src/libscotch/arch_hcub.c old/src/libscotch/arch_hcub.c
+*** src/src/libscotch/arch_hcub.c	2010-07-19 10:53:22.910731860 -0700
+--- old/src/libscotch/arch_hcub.c	2008-05-22 06:44:41.000000000 -0700
+***************
+*** 88,105 ****
   int
   archHcubArchLoad (
@@ -333,51 +324,51 @@
     if ((sizeof (ArchHcub)    > sizeof (ArchDummy)) ||
         (sizeof (ArchHcubDom) > sizeof (ArchDomDummy))) {
-***************
-*** 98,105 ****
---- 108,120 ----
+--- 88,95 ----
+  int
+  archHcubArchLoad (
+  ArchHcub * restrict const   archptr,
+! FILE * restrict const       stream)
+! {
+  #ifdef SCOTCH_DEBUG_ARCH1
+    if ((sizeof (ArchHcub)    > sizeof (ArchDummy)) ||
+        (sizeof (ArchHcubDom) > sizeof (ArchDomDummy))) {
+***************
+*** 108,120 ****
     }
   #endif /* SCOTCH_DEBUG_ARCH1 */
   
-+ #ifndef MATLAB
+- #ifndef MATLAB
     if ((intLoad (stream, &archptr->dimmax) != 1) ||
         (archptr->dimmax < 1)                     ||
-+ #else /* MATLAB */
-+   if ((napar < 1)                        ||
-+       ((archptr->dimmax=archpar[0]) < 1) ||
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+-   if ((napar < 1)                        ||
+-       ((archptr->dimmax=archpar[0]) < 1) ||
+- #endif /* MATLAB */
         (archptr->dimmax > (sizeof (archptr->dimmax) << 3))) {
       errorPrint ("archHcubArchLoad: bad input");
       return     (1);
-diff -rc src/src/libscotch/arch_hcub.h new4/src/libscotch/arch_hcub.h
-*** src/src/libscotch/arch_hcub.h	2008-05-22 06:44:41.000000000 -0700
---- new4/src/libscotch/arch_hcub.h	2010-05-03 15:37:55.208089934 -0700
-***************
-*** 85,91 ****
---- 85,95 ----
+--- 98,105 ----
+diff -rc src/src/libscotch/arch_hcub.h old/src/libscotch/arch_hcub.h
+*** src/src/libscotch/arch_hcub.h	2010-07-19 10:53:22.912731873 -0700
+--- old/src/libscotch/arch_hcub.h	2008-05-22 06:44:41.000000000 -0700
+***************
+*** 85,95 ****
   #define static
   #endif
   
-+ #ifndef MATLAB
+- #ifndef MATLAB
   int                         archHcubArchLoad    (ArchHcub * restrict const, FILE * restrict const);
-+ #else /* MATLAB */
-+ int                         archHcubArchLoad    (ArchHcub * restrict const, FILE * restrict const, const Anum, const Anum *);
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+- int                         archHcubArchLoad    (ArchHcub * restrict const, FILE * restrict const, const Anum, const Anum *);
+- #endif /* MATLAB */
   int                         archHcubArchSave    (const ArchHcub * const, FILE * restrict const);
   #define archHcubArchFree            NULL
   ArchDomNum                  archHcubDomNum      (const ArchHcub * const, const ArchHcubDom * const);
-diff -rc src/src/libscotch/arch_mesh.c new4/src/libscotch/arch_mesh.c
-*** src/src/libscotch/arch_mesh.c	2008-05-22 06:44:41.000000000 -0700
---- new4/src/libscotch/arch_mesh.c	2010-05-03 15:37:55.215089940 -0700
-***************
-*** 96,103 ****
-  int
-  archMesh2ArchLoad (
-  ArchMesh2 * restrict const  archptr,
-! FILE * restrict const       stream)
-! {
-  #ifdef SCOTCH_DEBUG_ARCH1
-    if ((sizeof (ArchMesh2)    > sizeof (ArchDummy)) ||
-        (sizeof (ArchMesh2Dom) > sizeof (ArchDomDummy))) {
---- 96,113 ----
+--- 85,91 ----
+diff -rc src/src/libscotch/arch_mesh.c old/src/libscotch/arch_mesh.c
+*** src/src/libscotch/arch_mesh.c	2010-07-19 10:53:22.915731892 -0700
+--- old/src/libscotch/arch_mesh.c	2008-05-22 06:44:41.000000000 -0700
+***************
+*** 96,113 ****
   int
   archMesh2ArchLoad (
@@ -398,33 +389,33 @@
     if ((sizeof (ArchMesh2)    > sizeof (ArchDummy)) ||
         (sizeof (ArchMesh2Dom) > sizeof (ArchDomDummy))) {
-***************
-*** 106,114 ****
---- 116,130 ----
+--- 96,103 ----
+  int
+  archMesh2ArchLoad (
+  ArchMesh2 * restrict const  archptr,
+! FILE * restrict const       stream)
+! {
+  #ifdef SCOTCH_DEBUG_ARCH1
+    if ((sizeof (ArchMesh2)    > sizeof (ArchDummy)) ||
+        (sizeof (ArchMesh2Dom) > sizeof (ArchDomDummy))) {
+***************
+*** 116,130 ****
     }
   #endif /* SCOTCH_DEBUG_ARCH1 */
   
-+ #ifndef MATLAB
+- #ifndef MATLAB
     if ((intLoad (stream, &archptr->c[0]) != 1) ||
         (intLoad (stream, &archptr->c[1]) != 1) ||
         (archptr->c[0] < 1) || (archptr->c[1] < 1)) {
-+ #else /* MATLAB */
-+   if ((napar < 2)                      ||
-+       ((archptr->c[0]=archpar[0]) < 1) ||
-+       ((archptr->c[1]=archpar[1]) < 1)) {
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+-   if ((napar < 2)                      ||
+-       ((archptr->c[0]=archpar[0]) < 1) ||
+-       ((archptr->c[1]=archpar[1]) < 1)) {
+- #endif /* MATLAB */
       errorPrint ("archMesh2ArchLoad: bad input");
       return     (1);
     }
-***************
-*** 421,428 ****
-  int
-  archMesh3ArchLoad (
-  ArchMesh3 * restrict const  archptr,
-! FILE * restrict const       stream)
-! {
-  #ifdef SCOTCH_DEBUG_ARCH1
-    if ((sizeof (ArchMesh3)    > sizeof (ArchDummy)) ||
-        (sizeof (ArchMesh3Dom) > sizeof (ArchDomDummy))) {
---- 437,454 ----
+--- 106,114 ----
+***************
+*** 437,454 ****
   int
   archMesh3ArchLoad (
@@ -445,69 +436,69 @@
     if ((sizeof (ArchMesh3)    > sizeof (ArchDummy)) ||
         (sizeof (ArchMesh3Dom) > sizeof (ArchDomDummy))) {
-***************
-*** 431,440 ****
---- 457,473 ----
+--- 421,428 ----
+  int
+  archMesh3ArchLoad (
+  ArchMesh3 * restrict const  archptr,
+! FILE * restrict const       stream)
+! {
+  #ifdef SCOTCH_DEBUG_ARCH1
+    if ((sizeof (ArchMesh3)    > sizeof (ArchDummy)) ||
+        (sizeof (ArchMesh3Dom) > sizeof (ArchDomDummy))) {
+***************
+*** 457,473 ****
     }
   #endif /* SCOTCH_DEBUG_ARCH1 */
   
-+ #ifndef MATLAB
+- #ifndef MATLAB
     if ((intLoad (stream, &archptr->c[0]) != 1) ||
         (intLoad (stream, &archptr->c[1]) != 1) ||
         (intLoad (stream, &archptr->c[2]) != 1) ||
         (archptr->c[0] < 1) || (archptr->c[1] < 1) || (archptr->c[2] < 1)) {
-+ #else /* MATLAB */
-+   if ((napar < 3)                      ||
-+       ((archptr->c[0]=archpar[0]) < 1) ||
-+       ((archptr->c[1]=archpar[1]) < 1) ||
-+       ((archptr->c[2]=archpar[2]) < 1)) {
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+-   if ((napar < 3)                      ||
+-       ((archptr->c[0]=archpar[0]) < 1) ||
+-       ((archptr->c[1]=archpar[1]) < 1) ||
+-       ((archptr->c[2]=archpar[2]) < 1)) {
+- #endif /* MATLAB */
       errorPrint ("archMesh3ArchLoad: bad input");
       return     (1);
     }
-diff -rc src/src/libscotch/arch_mesh.h new4/src/libscotch/arch_mesh.h
-*** src/src/libscotch/arch_mesh.h	2008-05-22 06:44:41.000000000 -0700
---- new4/src/libscotch/arch_mesh.h	2010-05-03 15:37:55.221089945 -0700
-***************
-*** 96,102 ****
---- 96,106 ----
+--- 431,440 ----
+diff -rc src/src/libscotch/arch_mesh.h old/src/libscotch/arch_mesh.h
+*** src/src/libscotch/arch_mesh.h	2010-07-19 10:53:22.918731911 -0700
+--- old/src/libscotch/arch_mesh.h	2008-05-22 06:44:41.000000000 -0700
+***************
+*** 96,106 ****
   #define static
   #endif
   
-+ #ifndef MATLAB
+- #ifndef MATLAB
   int                         archMesh2ArchLoad   (ArchMesh2 * restrict const, FILE * restrict const);
-+ #else /* MATLAB */
-+ int                         archMesh2ArchLoad   (ArchMesh2 * restrict const, FILE * restrict const, const Anum, const Anum *);
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+- int                         archMesh2ArchLoad   (ArchMesh2 * restrict const, FILE * restrict const, const Anum, const Anum *);
+- #endif /* MATLAB */
   int                         archMesh2ArchSave   (const ArchMesh2 * const, FILE * restrict const);
   #define archMesh2ArchFree           NULL
   ArchDomNum                  archMesh2DomNum     (const ArchMesh2 * const, const ArchMesh2Dom * const);
-***************
-*** 114,120 ****
---- 118,128 ----
+--- 96,102 ----
+***************
+*** 118,128 ****
   int                         archMesh2DomMpiType (const ArchMesh2 * const, MPI_Datatype * const);
   #endif /* SCOTCH_PTSCOTCH */
   
-+ #ifndef MATLAB
+- #ifndef MATLAB
   int                         archMesh3ArchLoad   (ArchMesh3 * restrict const, FILE * restrict const);
-+ #else /* MATLAB */
-+ int                         archMesh3ArchLoad   (ArchMesh3 * restrict const, FILE * restrict const, const Anum, const Anum *);
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+- int                         archMesh3ArchLoad   (ArchMesh3 * restrict const, FILE * restrict const, const Anum, const Anum *);
+- #endif /* MATLAB */
   int                         archMesh3ArchSave   (const ArchMesh3 * const, FILE * restrict const);
   #define archMesh3ArchFree           NULL
   ArchDomNum                  archMesh3DomNum     (const ArchMesh3 * const, const ArchMesh3Dom * const);
-diff -rc src/src/libscotch/arch_tleaf.c new4/src/libscotch/arch_tleaf.c
-*** src/src/libscotch/arch_tleaf.c	2008-05-22 06:44:41.000000000 -0700
---- new4/src/libscotch/arch_tleaf.c	2010-05-03 15:37:55.228089950 -0700
-***************
-*** 92,99 ****
-  int
-  archTleafArchLoad (
-  ArchTleaf * restrict const  archptr,
-! FILE * restrict const       stream)
-! {
-  #ifdef SCOTCH_DEBUG_ARCH1
-    if ((sizeof (ArchTleaf)    > sizeof (ArchDummy)) ||
-        (sizeof (ArchTleafDom) > sizeof (ArchDomDummy))) {
---- 92,109 ----
+--- 114,120 ----
+diff -rc src/src/libscotch/arch_tleaf.c old/src/libscotch/arch_tleaf.c
+*** src/src/libscotch/arch_tleaf.c	2010-07-19 10:53:22.920731924 -0700
+--- old/src/libscotch/arch_tleaf.c	2008-05-22 06:44:41.000000000 -0700
+***************
+*** 92,109 ****
   int
   archTleafArchLoad (
@@ -528,61 +519,61 @@
     if ((sizeof (ArchTleaf)    > sizeof (ArchDummy)) ||
         (sizeof (ArchTleafDom) > sizeof (ArchDomDummy))) {
-***************
-*** 102,107 ****
---- 112,118 ----
+--- 92,99 ----
+  int
+  archTleafArchLoad (
+  ArchTleaf * restrict const  archptr,
+! FILE * restrict const       stream)
+! {
+  #ifdef SCOTCH_DEBUG_ARCH1
+    if ((sizeof (ArchTleaf)    > sizeof (ArchDummy)) ||
+        (sizeof (ArchTleafDom) > sizeof (ArchDomDummy))) {
+***************
+*** 112,118 ****
     }
   #endif /* SCOTCH_DEBUG_ARCH1 */
   
-+ #ifndef MATLAB
+- #ifndef MATLAB
     if ((intLoad (stream, &archptr->leafdep) != 1) ||
         (intLoad (stream, &archptr->clusdep) != 1) ||
         (intLoad (stream, &archptr->linkval) != 1) ||
-***************
-*** 109,114 ****
---- 120,132 ----
+--- 102,107 ----
+***************
+*** 120,132 ****
         (archptr->clusdep < 0)                     ||
         (archptr->clusdep > archptr->leafdep)      ||
         (archptr->linkval < 1)) {
-+ #else /* MATLAB */
-+   if ((napar < 3)                            ||
-+       ((archptr->leafdep=archpar[0]) < 1)    ||
-+       ((archptr->clusdep=archpar[1]) < 0)    ||
-+       ( archptr->clusdep > archptr->leafdep) ||
-+       ((archptr->linkval=archpar[2]) < 1)) {
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+-   if ((napar < 3)                            ||
+-       ((archptr->leafdep=archpar[0]) < 1)    ||
+-       ((archptr->clusdep=archpar[1]) < 0)    ||
+-       ( archptr->clusdep > archptr->leafdep) ||
+-       ((archptr->linkval=archpar[2]) < 1)) {
+- #endif /* MATLAB */
       errorPrint ("archTleafArchLoad: bad input");
       return     (1);
     }
-diff -rc src/src/libscotch/arch_tleaf.h new4/src/libscotch/arch_tleaf.h
-*** src/src/libscotch/arch_tleaf.h	2008-05-22 06:44:41.000000000 -0700
---- new4/src/libscotch/arch_tleaf.h	2010-05-03 15:37:55.235089956 -0700
-***************
-*** 89,95 ****
---- 89,99 ----
+--- 109,114 ----
+diff -rc src/src/libscotch/arch_tleaf.h old/src/libscotch/arch_tleaf.h
+*** src/src/libscotch/arch_tleaf.h	2010-07-19 10:53:22.923731944 -0700
+--- old/src/libscotch/arch_tleaf.h	2008-05-22 06:44:41.000000000 -0700
+***************
+*** 89,99 ****
   #define static
   #endif
   
-+ #ifndef MATLAB
+- #ifndef MATLAB
   int                         archTleafArchLoad   (ArchTleaf * restrict const, FILE * restrict const);
-+ #else /* MATLAB */
-+ int                         archTleafArchLoad   (ArchTleaf * restrict const, FILE * restrict const, const Anum, const Anum *);
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+- int                         archTleafArchLoad   (ArchTleaf * restrict const, FILE * restrict const, const Anum, const Anum *);
+- #endif /* MATLAB */
   int                         archTleafArchSave   (const ArchTleaf * const, FILE * restrict const);
   #define archTleafArchFree           NULL
   ArchDomNum                  archTleafDomNum     (const ArchTleaf * const, const ArchTleafDom * const);
-diff -rc src/src/libscotch/arch_torus.c new4/src/libscotch/arch_torus.c
-*** src/src/libscotch/arch_torus.c	2008-05-22 06:44:41.000000000 -0700
---- new4/src/libscotch/arch_torus.c	2010-05-03 15:37:55.242089962 -0700
-***************
-*** 90,97 ****
-  int
-  archTorus2ArchLoad (
-  ArchTorus2 * restrict const archptr,
-! FILE * restrict const       stream)
-! {
-  #ifdef SCOTCH_DEBUG_ARCH1
-    if ((sizeof (ArchTorus2)    > sizeof (ArchDummy)) ||
-        (sizeof (ArchTorus2Dom) > sizeof (ArchDomDummy))) {
---- 90,107 ----
+--- 89,95 ----
+diff -rc src/src/libscotch/arch_torus.c old/src/libscotch/arch_torus.c
+*** src/src/libscotch/arch_torus.c	2010-07-19 10:53:22.926731963 -0700
+--- old/src/libscotch/arch_torus.c	2008-05-22 06:44:41.000000000 -0700
+***************
+*** 90,107 ****
   int
   archTorus2ArchLoad (
@@ -603,33 +594,33 @@
     if ((sizeof (ArchTorus2)    > sizeof (ArchDummy)) ||
         (sizeof (ArchTorus2Dom) > sizeof (ArchDomDummy))) {
-***************
-*** 100,108 ****
---- 110,124 ----
+--- 90,97 ----
+  int
+  archTorus2ArchLoad (
+  ArchTorus2 * restrict const archptr,
+! FILE * restrict const       stream)
+! {
+  #ifdef SCOTCH_DEBUG_ARCH1
+    if ((sizeof (ArchTorus2)    > sizeof (ArchDummy)) ||
+        (sizeof (ArchTorus2Dom) > sizeof (ArchDomDummy))) {
+***************
+*** 110,124 ****
     }
   #endif /* SCOTCH_DEBUG_ARCH1 */
   
-+ #ifndef MATLAB
+- #ifndef MATLAB
     if ((intLoad (stream, &archptr->c[0]) != 1) ||
         (intLoad (stream, &archptr->c[1]) != 1) ||
         (archptr->c[0] < 1) || (archptr->c[1] < 1)) {
-+ #else /* MATLAB */
-+   if ((napar < 2)                      ||
-+       ((archptr->c[0]=archpar[0]) < 1) ||
-+       ((archptr->c[1]=archpar[1]) < 1)) {
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+-   if ((napar < 2)                      ||
+-       ((archptr->c[0]=archpar[0]) < 1) ||
+-       ((archptr->c[1]=archpar[1]) < 1)) {
+- #endif /* MATLAB */
       errorPrint ("archTorus2ArchLoad: bad input");
       return     (1);
     }
-***************
-*** 363,370 ****
-  int
-  archTorus3ArchLoad (
-  ArchTorus3 * restrict const archptr,
-! FILE * restrict const       stream)
-! {
-  #ifdef SCOTCH_DEBUG_ARCH1
-    if ((sizeof (ArchTorus3)    > sizeof (ArchDummy)) ||
-        (sizeof (ArchTorus3Dom) > sizeof (ArchDomDummy))) {
---- 379,396 ----
+--- 100,108 ----
+***************
+*** 379,396 ****
   int
   archTorus3ArchLoad (
@@ -650,315 +641,316 @@
     if ((sizeof (ArchTorus3)    > sizeof (ArchDummy)) ||
         (sizeof (ArchTorus3Dom) > sizeof (ArchDomDummy))) {
-***************
-*** 373,382 ****
---- 399,415 ----
+--- 363,370 ----
+  int
+  archTorus3ArchLoad (
+  ArchTorus3 * restrict const archptr,
+! FILE * restrict const       stream)
+! {
+  #ifdef SCOTCH_DEBUG_ARCH1
+    if ((sizeof (ArchTorus3)    > sizeof (ArchDummy)) ||
+        (sizeof (ArchTorus3Dom) > sizeof (ArchDomDummy))) {
+***************
+*** 399,415 ****
     }
   #endif /* SCOTCH_DEBUG_ARCH1 */
   
-+ #ifndef MATLAB
+- #ifndef MATLAB
     if ((intLoad (stream, &archptr->c[0]) != 1) ||
         (intLoad (stream, &archptr->c[1]) != 1) ||
         (intLoad (stream, &archptr->c[2]) != 1) ||
         (archptr->c[0] < 1) || (archptr->c[1] < 1) || (archptr->c[2] < 1)) {
-+ #else /* MATLAB */
-+   if ((napar < 3)                      ||
-+       ((archptr->c[0]=archpar[0]) < 1) ||
-+       ((archptr->c[1]=archpar[1]) < 1) ||
-+       ((archptr->c[2]=archpar[2]) < 1)) {
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+-   if ((napar < 3)                      ||
+-       ((archptr->c[0]=archpar[0]) < 1) ||
+-       ((archptr->c[1]=archpar[1]) < 1) ||
+-       ((archptr->c[2]=archpar[2]) < 1)) {
+- #endif /* MATLAB */
       errorPrint ("archTorus3ArchLoad: bad input");
       return     (1);
     }
-diff -rc src/src/libscotch/arch_torus.h new4/src/libscotch/arch_torus.h
-*** src/src/libscotch/arch_torus.h	2008-05-22 06:44:41.000000000 -0700
---- new4/src/libscotch/arch_torus.h	2010-05-03 15:37:55.248089967 -0700
-***************
-*** 96,102 ****
---- 96,106 ----
+--- 373,382 ----
+diff -rc src/src/libscotch/arch_torus.h old/src/libscotch/arch_torus.h
+*** src/src/libscotch/arch_torus.h	2010-07-19 10:53:22.928731976 -0700
+--- old/src/libscotch/arch_torus.h	2008-05-22 06:44:41.000000000 -0700
+***************
+*** 96,106 ****
   #define static
   #endif
   
-+ #ifndef MATLAB
+- #ifndef MATLAB
   int                         archTorus2ArchLoad  (ArchTorus2 * restrict const, FILE * restrict const);
-+ #else /* MATLAB */
-+ int                         archTorus2ArchLoad  (ArchTorus2 * restrict const, FILE * restrict const, const Anum, const Anum *);
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+- int                         archTorus2ArchLoad  (ArchTorus2 * restrict const, FILE * restrict const, const Anum, const Anum *);
+- #endif /* MATLAB */
   int                         archTorus2ArchSave  (const ArchTorus2 * const, FILE * restrict const);
   #define archTorus2ArchFree          NULL
   ArchDomNum                  archTorus2DomNum    (const ArchTorus2 * const, const ArchTorus2Dom * const);
-***************
-*** 114,120 ****
---- 118,128 ----
+--- 96,102 ----
+***************
+*** 118,128 ****
   int                         archTorus2DomMpiType (const ArchTorus2 * const, MPI_Datatype * const);
   #endif /* SCOTCH_PTSCOTCH */
   
-+ #ifndef MATLAB
+- #ifndef MATLAB
   int                         archTorus3ArchLoad  (ArchTorus3 * restrict const, FILE * restrict const);
-+ #else /* MATLAB */
-+ int                         archTorus3ArchLoad  (ArchTorus3 * restrict const, FILE * restrict const, const Anum, const Anum *);
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+- int                         archTorus3ArchLoad  (ArchTorus3 * restrict const, FILE * restrict const, const Anum, const Anum *);
+- #endif /* MATLAB */
   int                         archTorus3ArchSave  (const ArchTorus3 * const, FILE * restrict const);
   #define archTorus3ArchFree          NULL
   ArchDomNum                  archTorus3DomNum    (const ArchTorus3 * const, const ArchTorus3Dom * const);
-diff -rc src/src/libscotch/common.c new4/src/libscotch/common.c
-*** src/src/libscotch/common.c	2008-05-22 06:44:41.000000000 -0700
---- new4/src/libscotch/common.c	2010-05-03 15:37:55.254089972 -0700
-***************
-*** 100,106 ****
---- 100,112 ----
+--- 114,120 ----
+diff -rc src/src/libscotch/common.c old/src/libscotch/common.c
+*** src/src/libscotch/common.c	2010-07-19 10:53:22.931731995 -0700
+--- old/src/libscotch/common.c	2008-05-22 06:44:41.000000000 -0700
+***************
+*** 100,112 ****
   {
     const char **       cptr;
   
-+ #ifndef MATLAB
+- #ifndef MATLAB
     fprintf (stream, "Usage is:\n");
     for (cptr = data; *cptr != NULL; cptr ++)
       fprintf (stream, "  %s\n", *cptr);
-+ #else /* MATLAB */
-+   mexPrintf ("Usage is:\n");
-+   for (cptr = data; *cptr != NULL; cptr ++)
-+     mexPrintf ("  %s\n", *cptr);
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+-   mexPrintf ("Usage is:\n");
+-   for (cptr = data; *cptr != NULL; cptr ++)
+-     mexPrintf ("  %s\n", *cptr);
+- #endif /* MATLAB */
   }
-diff -rc src/src/libscotch/common.h new4/src/libscotch/common.h
-*** src/src/libscotch/common.h	2009-02-06 14:20:55.000000000 -0800
---- new4/src/libscotch/common.h	2010-05-03 15:37:55.261089978 -0700
-***************
-*** 66,71 ****
---- 66,72 ----
+--- 100,106 ----
+diff -rc src/src/libscotch/common.h old/src/libscotch/common.h
+*** src/src/libscotch/common.h	2010-07-19 10:53:22.933732008 -0700
+--- old/src/libscotch/common.h	2009-02-06 14:20:55.000000000 -0800
+***************
+*** 66,72 ****
   #include            <stdio.h>
   #include            <stdarg.h>
   #include            <stdlib.h>
-+ #include            <stdint.h>                    /* added for intptr_t */
+- #include            <stdint.h>                    /* added for intptr_t */
   #ifdef HAVE_MALLOC_H
   #include            <malloc.h>                    /* Deprecated, but required on some old systems */
   #endif /* HAVE_MALLOC_H */
-***************
-*** 88,93 ****
---- 89,108 ----
+--- 66,71 ----
+***************
+*** 89,108 ****
   #include            <pthread.h>
   #endif /* ((defined COMMON_PTHREAD) || (defined SCOTCH_PTHREAD)) */
   
-+ #ifdef MATLAB
-+     #include "mat.h"
-+     #include "mex.h"
-+     #include "matrix.h"
-+ 
-+     #define printf mexPrintf
-+     #define fprintf(file,...) (file == stdout || file == stderr ? mexPrintf(__VA_ARGS__) : fprintf(file,__VA_ARGS__))
-+     #define malloc mxMalloc
-+     #define calloc mxCalloc
-+     #define realloc mxRealloc
-+     #define free mxFree
-+     #define exit(status) mexErrMsgTxt("exit=" #status)
-+ #endif
-+ 
+- #ifdef MATLAB
+-     #include "mat.h"
+-     #include "mex.h"
+-     #include "matrix.h"
+- 
+-     #define printf mexPrintf
+-     #define fprintf(file,...) (file == stdout || file == stderr ? mexPrintf(__VA_ARGS__) : fprintf(file,__VA_ARGS__))
+-     #define malloc mxMalloc
+-     #define calloc mxCalloc
+-     #define realloc mxRealloc
+-     #define free mxFree
+-     #define exit(status) mexErrMsgTxt("exit=" #status)
+- #endif
+- 
   /*
   **  Working definitions.
   */
-***************
-*** 209,214 ****
---- 224,230 ----
+--- 88,93 ----
+***************
+*** 224,230 ****
   int                         intSave             (FILE * const, const INT);
   void                        intAscn             (INT * const, const INT, const INT);
   void                        intPerm             (INT * const, const INT);
-+ void                        intRandResetStatic  (void);
+- void                        intRandResetStatic  (void);
   void                        intRandReset        (void);
   void                        intRandInit         (void);
   INT                         intRandVal          (INT);
-diff -rc src/src/libscotch/common_integer.c new4/src/libscotch/common_integer.c
-*** src/src/libscotch/common_integer.c	2009-01-21 01:32:32.000000000 -0800
---- new4/src/libscotch/common_integer.c	2010-05-03 15:37:55.268089983 -0700
-***************
-*** 191,196 ****
---- 191,205 ----
+--- 209,214 ----
+diff -rc src/src/libscotch/common_integer.c old/src/libscotch/common_integer.c
+*** src/src/libscotch/common_integer.c	2010-07-19 10:53:22.936732027 -0700
+--- old/src/libscotch/common_integer.c	2009-01-21 01:32:32.000000000 -0800
+***************
+*** 191,205 ****
   static volatile int intrandflag = 0;              /*+ Flag set if generator already initialized +*/
   static unsigned int intrandseed = 1;              /*+ Random seed                               +*/
   
-+ void
-+ intRandResetStatic (void)
-+ {
-+   printf("intRandResetStatic begin -- intrandflag=%d,intrandseed=%d\n",intrandflag,intrandseed);
-+   intrandflag = 0;              /*+ Flag set if generator already initialized +*/
-+   intrandseed = 1;              /*+ Random seed                               +*/
-+   printf("intRandResetStatic end   -- intrandflag=%d,intrandseed=%d\n",intrandflag,intrandseed);
-+ }
-+ 
+- void
+- intRandResetStatic (void)
+- {
+-   printf("intRandResetStatic begin -- intrandflag=%d,intrandseed=%d\n",intrandflag,intrandseed);
+-   intrandflag = 0;              /*+ Flag set if generator already initialized +*/
+-   intrandseed = 1;              /*+ Random seed                               +*/
+-   printf("intRandResetStatic end   -- intrandflag=%d,intrandseed=%d\n",intrandflag,intrandseed);
+- }
+- 
   /* This routine initializes the pseudo-random
   ** generator if necessary. In order for multi-sequential
   ** programs to have exactly the same behavior on any
-***************
-*** 205,210 ****
---- 214,220 ----
+--- 191,196 ----
+***************
+*** 214,220 ****
   void
   intRandInit (void)
   {
-+   printf("intRandInit begin -- intrandflag=%d,intrandseed=%d\n",intrandflag,intrandseed);
+-   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 ****
---- 226,232 ----
+--- 205,210 ----
+***************
+*** 226,232 ****
   #endif /* COMMON_RANDOM_RAND */
       intrandflag = 1;                              /* Generator has been initialized */
     }
-+   printf("intRandInit end   -- intrandflag=%d,intrandseed=%d\n",intrandflag,intrandseed);
+-   printf("intRandInit end   -- intrandflag=%d,intrandseed=%d\n",intrandflag,intrandseed);
   }
   
   /* This routine reinitializes the pseudo-random
-***************
-*** 228,233 ****
---- 239,245 ----
+--- 216,221 ----
+***************
+*** 239,245 ****
   void
   intRandReset (void)
   {
-+   printf("intRandReset begin -- intrandflag=%d,intrandseed=%d\n",intrandflag,intrandseed);
+-   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 ****
---- 249,255 ----
+--- 228,233 ----
+***************
+*** 249,255 ****
     }
     else
       intRandInit ();
-+   printf("intRandReset end   -- intrandflag=%d,intrandseed=%d\n",intrandflag,intrandseed);
+-   printf("intRandReset end   -- intrandflag=%d,intrandseed=%d\n",intrandflag,intrandseed);
   }
   
   /*********************/
-diff -rc src/src/libscotch/common_memory.c new4/src/libscotch/common_memory.c
-*** src/src/libscotch/common_memory.c	2009-01-03 02:16:11.000000000 -0800
---- new4/src/libscotch/common_memory.c	2010-05-03 15:37:55.275089989 -0700
-***************
-*** 87,93 ****
---- 87,95 ----
+--- 237,242 ----
+diff -rc src/src/libscotch/common_memory.c old/src/libscotch/common_memory.c
+*** src/src/libscotch/common_memory.c	2010-07-19 10:53:22.939732046 -0700
+--- old/src/libscotch/common_memory.c	2009-01-03 02:16:11.000000000 -0800
+***************
+*** 87,95 ****
     size_t              newadd;
     byte *              newptr;
   
-+   printf("memAllocRecord begin -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax);
+-   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);
+-   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 ----
+--- 87,93 ----
+***************
+*** 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);
+-   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);
+-   printf("memAllocRecord end   -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax);
     return ((void *) newptr);                       /* Return skewed pointer or NULL */
   }
   
-***************
-*** 124,133 ****
---- 128,139 ----
+--- 109,116 ----
+***************
+*** 128,139 ****
     size_t              oldsiz;
     size_t              newadd;
   
-+   printf("memReallocRecord begin -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax);
+-   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);
+-   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 ----
+--- 124,133 ----
+***************
+*** 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);
+-   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);
+-   printf("memReallocRecord end   -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax);
     return ((void *) newptr);                       /* Return skewed pointer or NULL */
   }
   
-***************
-*** 157,166 ****
---- 165,176 ----
+--- 145,152 ----
+***************
+*** 165,176 ****
     byte *              tmpptr;
     size_t              oldsiz;
   
-+   printf("memFreeRecord begin -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax);
+-   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);
+-   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 ----
+--- 157,166 ----
+***************
+*** 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);
+-   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);
+-   printf("memFreeRecord end   -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax);
   }
   
   size_t
-***************
-*** 177,183 ****
---- 189,197 ----
+--- 169,175 ----
+***************
+*** 189,197 ****
   {
     size_t              curmax;
   
-+   printf("memMax begin -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax);
+-   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);
+-   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 ----
+--- 177,183 ----
+***************
+*** 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);
+-   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);
+-   printf("memMax end   -- memorysiz=%d,memorymax=%d\n",memorysiz,memorymax);
     return (curmax);
   }
   #endif /* COMMON_MEMORY_TRACE */
-diff -rc src/src/libscotch/dummysizes.c new4/src/libscotch/dummysizes.c
-*** src/src/libscotch/dummysizes.c	2009-05-09 16:08:02.000000000 -0700
---- new4/src/libscotch/dummysizes.c	2010-05-03 15:37:55.282089995 -0700
-***************
-*** 267,271 ****
---- 267,273 ----
+--- 185,192 ----
+diff -rc src/src/libscotch/dummysizes.c old/src/libscotch/dummysizes.c
+*** src/src/libscotch/dummysizes.c	2010-07-19 10:53:22.941732059 -0700
+--- old/src/libscotch/dummysizes.c	2009-05-09 16:08:02.000000000 -0700
+***************
+*** 267,273 ****
     }
   #endif /* SCOTCH_DEBUG_MAIN1 */
   
-+ #ifndef MATLAB
+- #ifndef MATLAB
     exit (0);
-+ #endif /* MATLAB */
+- #endif /* MATLAB */
   }
-diff -rc src/src/libscotch/graph.c new4/src/libscotch/graph.c
-*** src/src/libscotch/graph.c	2008-05-22 06:44:42.000000000 -0700
---- new4/src/libscotch/graph.c	2010-05-03 15:37:55.288090000 -0700
-***************
-*** 135,141 ****
-      if ((grafptr->velotax != NULL) &&             /* Free graph tables             */
-          ((grafptr->flagval & GRAPHVERTGROUP) == 0))
-        memFree (grafptr->velotax + grafptr->baseval);
-!     if (grafptr->vlbltax != NULL)
-        memFree (grafptr->vlbltax + grafptr->baseval);
-      if ((grafptr->edlotax != NULL) &&
-          ((grafptr->flagval & GRAPHEDGEGROUP) == 0))
---- 135,144 ----
+--- 267,271 ----
+diff -rc src/src/libscotch/graph.c old/src/libscotch/graph.c
+*** src/src/libscotch/graph.c	2010-07-19 10:53:22.943732072 -0700
+--- old/src/libscotch/graph.c	2008-05-22 06:44:42.000000000 -0700
+***************
+*** 135,144 ****
       if ((grafptr->velotax != NULL) &&             /* Free graph tables             */
           ((grafptr->flagval & GRAPHVERTGROUP) == 0))
@@ -971,34 +963,34 @@
       if ((grafptr->edlotax != NULL) &&
           ((grafptr->flagval & GRAPHEDGEGROUP) == 0))
-diff -rc src/src/libscotch/graph.h new4/src/libscotch/graph.h
-*** src/src/libscotch/graph.h	2008-06-01 02:49:11.000000000 -0700
---- new4/src/libscotch/graph.h	2010-05-03 15:37:55.295090006 -0700
-***************
-*** 159,165 ****
---- 159,169 ----
+--- 135,141 ----
+      if ((grafptr->velotax != NULL) &&             /* Free graph tables             */
+          ((grafptr->flagval & GRAPHVERTGROUP) == 0))
+        memFree (grafptr->velotax + grafptr->baseval);
+!     if (grafptr->vlbltax != NULL)
+        memFree (grafptr->vlbltax + grafptr->baseval);
+      if ((grafptr->edlotax != NULL) &&
+          ((grafptr->flagval & GRAPHEDGEGROUP) == 0))
+diff -rc src/src/libscotch/graph.h old/src/libscotch/graph.h
+*** src/src/libscotch/graph.h	2010-07-19 10:53:22.946732092 -0700
+--- old/src/libscotch/graph.h	2008-06-01 02:49:11.000000000 -0700
+***************
+*** 159,169 ****
   int                         graphInit           (Graph * const);
   void                        graphExit           (Graph * const);
   void                        graphFree           (Graph * const);
-+ #ifndef MATLAB
+- #ifndef MATLAB
   int                         graphLoad           (Graph * const, FILE * const, const Gnum, const GraphFlag);
-+ #else /* MATLAB */
-+ int                         graphLoad           (Graph * const, FILE * const, const Gnum, const GraphFlag, const Gnum, const Gnum, const Gnum*, const Gnum*, const Gnum*, const Gnum*, const Gnum*);
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+- int                         graphLoad           (Graph * const, FILE * const, const Gnum, const GraphFlag, const Gnum, const Gnum, const Gnum*, const Gnum*, const Gnum*, const Gnum*, const Gnum*);
+- #endif /* MATLAB */
   int                         graphLoad2          (const Gnum, const Gnum, const Gnum * const, const Gnum * const, Gnum * restrict const, const Gnum, const Gnum * const);
   int                         graphSave           (const Graph * const, FILE * const);
   Gnum                        graphBase           (Graph * const, const Gnum);
-diff -rc src/src/libscotch/graph_io.c new4/src/libscotch/graph_io.c
-*** src/src/libscotch/graph_io.c	2008-05-22 06:44:42.000000000 -0700
---- new4/src/libscotch/graph_io.c	2010-05-03 15:37:55.303090012 -0700
-***************
-*** 86,92 ****
-  Graph * restrict const      grafptr,              /* Graph structure to fill              */
-  FILE * const                stream,               /* Stream from which to read graph data */
-  const Gnum                  baseval,              /* Base value (-1 means keep file base) */
-! const GraphFlag             flagval)              /* Graph loading flags                  */
-  {
-    Gnum                edgenum;                    /* Number of edges really allocated */
-    Gnum                edgennd;
---- 86,103 ----
+--- 159,165 ----
+diff -rc src/src/libscotch/graph_io.c old/src/libscotch/graph_io.c
+*** src/src/libscotch/graph_io.c	2010-07-19 10:53:22.949732111 -0700
+--- old/src/libscotch/graph_io.c	2008-05-22 06:44:42.000000000 -0700
+***************
+*** 86,103 ****
   Graph * restrict const      grafptr,              /* Graph structure to fill              */
   FILE * const                stream,               /* Stream from which to read graph data */
@@ -1019,25 +1011,32 @@
     Gnum                edgenum;                    /* Number of edges really allocated */
     Gnum                edgennd;
-***************
-*** 104,120 ****
---- 115,141 ----
+--- 86,92 ----
+  Graph * restrict const      grafptr,              /* Graph structure to fill              */
+  FILE * const                stream,               /* Stream from which to read graph data */
+  const Gnum                  baseval,              /* Base value (-1 means keep file base) */
+! const GraphFlag             flagval)              /* Graph loading flags                  */
+  {
+    Gnum                edgenum;                    /* Number of edges really allocated */
+    Gnum                edgennd;
+***************
+*** 115,141 ****
     char                proptab[4];
     Gnum                vertnum;
   
-+ #ifdef MATLAB
-+   printf("graphLoad - stream=%p; nvert=%d,nedge2=%d\n",stream,nvert,nedge2);
-+   printf("graphLoad - adjir=%p,adjjc=%p,vertlab=%p,vertwgt=%p,edgewgt=%p\n",
-+          adjir,adjjc,vertlab,vertwgt,edgewgt);
-+ #endif /* MATLAB */
+- #ifdef MATLAB
+-   printf("graphLoad - stream=%p; nvert=%d,nedge2=%d\n",stream,nvert,nedge2);
+-   printf("graphLoad - adjir=%p,adjjc=%p,vertlab=%p,vertwgt=%p,edgewgt=%p\n",
+-          adjir,adjjc,vertlab,vertwgt,edgewgt);
+- #endif /* MATLAB */
     memSet (grafptr, 0, sizeof (Graph));
   
-+ #ifndef MATLAB
+- #ifndef MATLAB
     if (intLoad (stream, &versval) != 1) {          /* Read version number */
       errorPrint ("graphLoad: bad input (1)");
       return     (1);
     }
-+ #else /* MATLAB */
-+   versval=0;
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+-   versval=0;
+- #endif /* MATLAB */
     if (versval != 0) {                             /* If version not zero */
       errorPrint ("graphLoad: old-style graph format no longer supported");
@@ -1045,46 +1044,46 @@
     }
   
-+ #ifndef MATLAB
+- #ifndef MATLAB
     if ((intLoad (stream, &grafptr->vertnbr) != 1) || /* Read rest of header */
         (intLoad (stream, &grafptr->edgenbr) != 1) ||
         (intLoad (stream, &baseadj)          != 1) ||
-***************
-*** 124,129 ****
---- 145,159 ----
+--- 104,120 ----
+***************
+*** 145,159 ****
       errorPrint ("graphLoad: bad input (2)");
       return     (1);
     }
-+ #else /* MATLAB */
-+   grafptr->vertnbr=nvert;
-+   grafptr->edgenbr=nedge2;
-+   baseadj=1;
-+   propval=0;
-+   if (vertlab) propval+=100;
-+   if (edgewgt) propval+= 10;
-+   if (vertwgt) propval+=  1;
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+-   grafptr->vertnbr=nvert;
+-   grafptr->edgenbr=nedge2;
+-   baseadj=1;
+-   propval=0;
+-   if (vertlab) propval+=100;
+-   if (edgewgt) propval+= 10;
+-   if (vertwgt) propval+=  1;
+- #endif /* MATLAB */
     sprintf (proptab, "%3.3d", (int) propval);      /* Compute file properties */
     proptab[0] -= '0';                              /* Vertex labels flag      */
     proptab[1] -= '0';                              /* Edge weights flag       */
-***************
-*** 140,145 ****
---- 170,179 ----
+--- 124,129 ----
+***************
+*** 170,179 ****
     }
     if (proptab[0] != 0)                            /* If vertex labels, no base adjust */
       baseadj = 0;
-+ #ifdef MATLAB
-+   printf("graphLoad - baseadj=%d,baseval=%d,grafptr->baseval=%d\n",
-+          baseadj,baseval,grafptr->baseval);
-+ #endif /* MATLAB */
+- #ifdef MATLAB
+-   printf("graphLoad - baseadj=%d,baseval=%d,grafptr->baseval=%d\n",
+-          baseadj,baseval,grafptr->baseval);
+- #endif /* MATLAB */
   
     velonbr = ((proptab[2] != 0) && ((flagval & GRAPHIONOLOADVERT) == 0)) ? grafptr->vertnbr : 0;
     vlblnbr = (proptab[0] != 0) ? grafptr->vertnbr : 0;
-***************
-*** 178,188 ****
---- 212,226 ----
+--- 140,145 ----
+***************
+*** 212,226 ****
       if (grafptr->vlbltax != NULL) {               /* If must read label               */
         Gnum                vlblval;                /* Value where to read vertex label */
   
-+ #ifndef MATLAB
+- #ifndef MATLAB
         if (intLoad (stream, &vlblval) != 1) {      /* Read label data */
           errorPrint ("graphLoad: bad input (3)");
@@ -1092,17 +1091,17 @@
           return     (1);
         }
-+ #else /* MATLAB */
-+       vlblval=vertlab[vertnum-grafptr->baseval];
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+-       vlblval=vertlab[vertnum-grafptr->baseval];
+- #endif /* MATLAB */
         grafptr->vlbltax[vertnum] = vlblval;
         if (grafptr->vlbltax[vertnum] > vlblmax)    /* Get maximum vertex label */
           vlblmax = grafptr->vlbltax[vertnum];
-***************
-*** 190,209 ****
---- 228,257 ----
+--- 178,188 ----
+***************
+*** 228,257 ****
       if (proptab[2] != 0) {                        /* If must read vertex load        */
         Gnum                veloval;                /* Value where to read vertex load */
   
-+ #ifndef MATLAB
+- #ifndef MATLAB
         if (intLoad (stream, &veloval) != 1) {      /* Read vertex load data    */
           errorPrint ("graphLoad: bad input (4)");
@@ -1110,12 +1109,12 @@
           return     (1);
         }
-+ #else /* MATLAB */
-+       veloval=vertwgt[vertnum-grafptr->baseval];
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+-       veloval=vertwgt[vertnum-grafptr->baseval];
+- #endif /* MATLAB */
         if (grafptr->velotax != NULL)
           velosum                  +=
           grafptr->velotax[vertnum] = veloval;
       }
-+ #ifndef MATLAB
+- #ifndef MATLAB
       if (intLoad (stream, &degrval) != 1) {        /* Read vertex degree */
         errorPrint ("graphLoad: bad input (5)");
@@ -1123,19 +1122,19 @@
         return     (1);
       }
-+ #else /* MATLAB */
-+ //    printf("old degrval=%d; new degrval=%d\n",
-+ //           degrval,adjjc[vertnum-grafptr->baseval+1]-adjjc[vertnum-grafptr->baseval]);
-+     degrval=adjjc[vertnum-grafptr->baseval+1]-adjjc[vertnum-grafptr->baseval];
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+- //    printf("old degrval=%d; new degrval=%d\n",
+- //           degrval,adjjc[vertnum-grafptr->baseval+1]-adjjc[vertnum-grafptr->baseval]);
+-     degrval=adjjc[vertnum-grafptr->baseval+1]-adjjc[vertnum-grafptr->baseval];
+- #endif /* MATLAB */
       if (degrmax < degrval)                        /* Set maximum degree */
         degrmax = degrval;
   
-***************
-*** 219,238 ****
---- 267,301 ----
+--- 190,209 ----
+***************
+*** 267,301 ****
         if (proptab[1] != 0) {                      /* If must read edge load        */
           Gnum                edloval;              /* Value where to read edge load */
   
-+ #ifndef MATLAB
+- #ifndef MATLAB
           if (intLoad (stream, &edloval) != 1) {    /* Read edge load data    */
             errorPrint ("graphLoad: bad input (6)");
@@ -1143,12 +1142,12 @@
             return     (1);
           }
-+ #else /* MATLAB */
-+         edloval=edgewgt[edgenum-grafptr->baseval];
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+-         edloval=edgewgt[edgenum-grafptr->baseval];
+- #endif /* MATLAB */
           if (grafptr->edlotax != NULL)
             edlosum                  +=
             grafptr->edlotax[edgenum] = (Gnum) edloval;
         }
-+ #ifndef MATLAB
+- #ifndef MATLAB
         if (intLoad (stream, &edgeval) != 1) {      /* Read edge data */
           errorPrint ("graphLoad: bad input (7)");
@@ -1156,106 +1155,97 @@
           return     (1);
         }
-+ #else /* MATLAB */
-+ //      printf("edgenum=%d: old edgeval=%d; new edgeval[%d]=%d\n",
-+ //            edgenum,edgeval,edgenum-grafptr->baseval,adjir[edgenum-grafptr->baseval]+1);
-+ /*  if vertex labels are supplied, they must be referenced  (jes, 1/05/10)  */
-+ //      edgeval=adjir[edgenum-grafptr->baseval]+1;
-+       if (vertlab)
-+         edgeval=vertlab[adjir[edgenum-grafptr->baseval]  ];
-+       else
-+         edgeval=        adjir[edgenum-grafptr->baseval]+1;
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+- //      printf("edgenum=%d: old edgeval=%d; new edgeval[%d]=%d\n",
+- //            edgenum,edgeval,edgenum-grafptr->baseval,adjir[edgenum-grafptr->baseval]+1);
+- /*  if vertex labels are supplied, they must be referenced  (jes, 1/05/10)  */
+- //      edgeval=adjir[edgenum-grafptr->baseval]+1;
+-       if (vertlab)
+-         edgeval=vertlab[adjir[edgenum-grafptr->baseval]  ];
+-       else
+-         edgeval=        adjir[edgenum-grafptr->baseval]+1;
+- #endif /* MATLAB */
         grafptr->edgetax[edgenum] = edgeval + baseadj;
       }
     }
-***************
-*** 279,284 ****
---- 342,351 ----
+--- 219,238 ----
+***************
+*** 342,351 ****
     Gnum                vertnum;                    /* Number of current vertex        */
     Gnum * restrict     indxtab;                    /* Vertex label/number index table */
   
-+ #ifdef MATLAB
-+   printf("graphLoad2 - baseval=%d,vertnnd=%d,vlblmax=%d\n",
-+          baseval,vertnnd,vlblmax);
-+ #endif /* MATLAB */
+- #ifdef MATLAB
+-   printf("graphLoad2 - baseval=%d,vertnnd=%d,vlblmax=%d\n",
+-          baseval,vertnnd,vlblmax);
+- #endif /* MATLAB */
     if ((indxtab = (Gnum *) memAlloc ((vlblmax + 1) * sizeof (Gnum))) == NULL) {
       errorPrint  ("graphLoad2: out of memory");
       return      (1);
-***************
-*** 286,291 ****
---- 353,362 ----
+--- 279,284 ----
+***************
+*** 353,362 ****
   
     memSet (indxtab, ~0, (vlblmax + 1) * sizeof (Gnum)); /* Assume labels not used */
     for (vertnum = baseval; vertnum < vertnnd; vertnum ++) {
-+ #ifdef MATLAB
-+ //    printf("graphLoad2 - vertnum=%d; vlbltax=%d,indxtab=%d\n",
-+ //           vertnum,vlbltax[vertnum],indxtab[vlbltax[vertnum]]);
-+ #endif /* MATLAB */
+- #ifdef MATLAB
+- //    printf("graphLoad2 - vertnum=%d; vlbltax=%d,indxtab=%d\n",
+- //           vertnum,vlbltax[vertnum],indxtab[vlbltax[vertnum]]);
+- #endif /* MATLAB */
       if (indxtab[vlbltax[vertnum]] != ~0) {        /* If vertex label already used */
         errorPrint  ("graphLoad2: duplicate vertex label");
         memFree     (indxtab);
-***************
-*** 294,299 ****
---- 365,374 ----
+--- 286,291 ----
+***************
+*** 365,374 ****
       indxtab[vlbltax[vertnum]] = vertnum;          /* Set vertex number index */
     }
     for (vertnum = baseval; vertnum < vertnnd; vertnum ++) {
-+ #ifdef MATLAB
-+ //    printf("graphLoad2 - vertnum=%d; vlbltax=%d,indxtab=%d\n",
-+ //           vertnum,vlbltax[vertnum],indxtab[vlbltax[vertnum]]);
-+ #endif /* MATLAB */
+- #ifdef MATLAB
+- //    printf("graphLoad2 - vertnum=%d; vlbltax=%d,indxtab=%d\n",
+- //           vertnum,vlbltax[vertnum],indxtab[vlbltax[vertnum]]);
+- #endif /* MATLAB */
       Gnum                edgenum;                  /* Number of current edge */
   
       for (edgenum = verttax[vertnum]; edgenum < vendtax[vertnum]; edgenum ++) {
-***************
-*** 307,313 ****
---- 382,396 ----
+--- 294,299 ----
+***************
+*** 382,396 ****
           memFree    (indxtab);
           return     (1);
         }
-+ #ifdef MATLAB
-+ //      printf("graphLoad2 - edgenum=%d; old edgetax=%d,",
-+ //             edgenum,edgetax[edgenum]);
-+ #endif /* MATLAB */
+- #ifdef MATLAB
+- //      printf("graphLoad2 - edgenum=%d; old edgetax=%d,",
+- //             edgenum,edgetax[edgenum]);
+- #endif /* MATLAB */
         edgetax[edgenum] = indxtab[edgetax[edgenum]]; /* Replace label by number */
-+ #ifdef MATLAB
-+ //      printf("new edgetax=%d\n",
-+ //             edgetax[edgenum]);
-+ #endif /* MATLAB */
+- #ifdef MATLAB
+- //      printf("new edgetax=%d\n",
+- //             edgetax[edgenum]);
+- #endif /* MATLAB */
       }
     }
   
-diff -rc src/src/libscotch/graph_io_scot.c new4/src/libscotch/graph_io_scot.c
-*** src/src/libscotch/graph_io_scot.c	2008-05-22 06:44:42.000000000 -0700
---- new4/src/libscotch/graph_io_scot.c	2010-05-03 15:37:55.310090018 -0700
-***************
-*** 89,95 ****
---- 89,99 ----
+--- 307,313 ----
+diff -rc src/src/libscotch/graph_io_scot.c old/src/libscotch/graph_io_scot.c
+*** src/src/libscotch/graph_io_scot.c	2010-07-19 10:53:22.952732130 -0700
+--- old/src/libscotch/graph_io_scot.c	2008-05-22 06:44:42.000000000 -0700
+***************
+*** 89,99 ****
     int                           o;
   
     if (filesrcptr != NULL) {
-+ #ifndef MATLAB
+- #ifndef MATLAB
       if (graphLoad (grafptr, filesrcptr, -1, 0) != 0)
-+ #else /* MATLAB */
-+     if (graphLoad (grafptr, filesrcptr, -1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL) != 0)
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+-     if (graphLoad (grafptr, filesrcptr, -1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL) != 0)
+- #endif /* MATLAB */
         return (1);
     }
   
-diff -rc src/src/libscotch/library_arch.c new4/src/libscotch/library_arch.c
-*** src/src/libscotch/library_arch.c	2008-05-22 06:44:42.000000000 -0700
---- new4/src/libscotch/library_arch.c	2010-05-03 15:37:55.317090024 -0700
-***************
-*** 120,128 ****
-  int
-  SCOTCH_archLoad (
-  SCOTCH_Arch * const         archptr,
-! FILE * const                stream)
-  {
-    return (archLoad ((Arch *) archptr, stream));
-  }
-  
-  /*+ This routine saves the given opaque
---- 120,139 ----
+--- 89,95 ----
+diff -rc src/src/libscotch/library_arch.c old/src/libscotch/library_arch.c
+*** src/src/libscotch/library_arch.c	2010-07-19 10:53:22.954732143 -0700
+--- old/src/libscotch/library_arch.c	2008-05-22 06:44:42.000000000 -0700
+***************
+*** 120,139 ****
   int
   SCOTCH_archLoad (
@@ -1270,117 +1260,119 @@
 !                                    )
   {
-+ #ifndef MATLAB
+- #ifndef MATLAB
     return (archLoad ((Arch *) archptr, stream));
-+ #else /* MATLAB */
-+   return (archLoad ((Arch *) archptr, stream, archtyp, napar, archpar));
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+-   return (archLoad ((Arch *) archptr, stream, archtyp, napar, archpar));
+- #endif /* MATLAB */
   }
   
   /*+ This routine saves the given opaque
-diff -rc src/src/libscotch/library_arch_f.c new4/src/libscotch/library_arch_f.c
-*** src/src/libscotch/library_arch_f.c	2008-05-22 06:44:42.000000000 -0700
---- new4/src/libscotch/library_arch_f.c	2010-05-03 15:37:55.323090029 -0700
-***************
-*** 121,127 ****
---- 121,131 ----
+--- 120,128 ----
+  int
+  SCOTCH_archLoad (
+  SCOTCH_Arch * const         archptr,
+! FILE * const                stream)
+  {
+    return (archLoad ((Arch *) archptr, stream));
+  }
+  
+  /*+ This routine saves the given opaque
+diff -rc src/src/libscotch/library_arch_f.c old/src/libscotch/library_arch_f.c
+*** src/src/libscotch/library_arch_f.c	2010-07-19 10:53:22.956732156 -0700
+--- old/src/libscotch/library_arch_f.c	2008-05-22 06:44:42.000000000 -0700
+***************
+*** 121,131 ****
     }
     setbuf (stream, NULL);                          /* Do not buffer on input */
   
-+ #ifndef MATLAB
+- #ifndef MATLAB
     o = SCOTCH_archLoad (archptr, stream);
-+ #else /* MATLAB */
-+   o = SCOTCH_archLoad (archptr, stream, "", 0, NULL);
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+-   o = SCOTCH_archLoad (archptr, stream, "", 0, NULL);
+- #endif /* MATLAB */
   
     fclose (stream);                                /* This closes filenum too */
   
-diff -rc src/src/libscotch/library_error_exit.c new4/src/libscotch/library_error_exit.c
-*** src/src/libscotch/library_error_exit.c	2009-01-20 00:36:33.000000000 -0800
---- new4/src/libscotch/library_error_exit.c	2010-05-03 15:37:55.330090035 -0700
-***************
-*** 114,119 ****
---- 114,120 ----
+--- 121,127 ----
+diff -rc src/src/libscotch/library_error_exit.c old/src/libscotch/library_error_exit.c
+*** src/src/libscotch/library_error_exit.c	2010-07-19 10:53:22.959732175 -0700
+--- old/src/libscotch/library_error_exit.c	2009-01-20 00:36:33.000000000 -0800
+***************
+*** 114,120 ****
     int                 proclocnum;
   #endif /* SCOTCH_PTSCOTCH */
   
-+ #ifndef MATLAB
+- #ifndef MATLAB
     fprintf  (stderr, "%s", _SCOTCHerrorProgName);
   #ifdef SCOTCH_PTSCOTCH
     if ((MPI_Initialized (&proclocnum) == MPI_SUCCESS) &&
-***************
-*** 131,136 ****
---- 132,155 ----
+--- 114,119 ----
+***************
+*** 132,155 ****
     fprintf  (stderr, "\n");
     fflush   (stderr);                              /* In case it has been set to buffered mode */
   
-+ #else /* MATLAB */
-+   mexPrintf  ("%s", _SCOTCHerrorProgName);
-+ #ifdef SCOTCH_PTSCOTCH
-+   if ((MPI_Initialized (&proclocnum) == MPI_SUCCESS) &&
-+       (proclocnum != 0)                              &&
-+       (MPI_Comm_rank (MPI_COMM_WORLD, &proclocnum) == MPI_SUCCESS))
-+     mexPrintf ("(%d): ", proclocnum);
-+ #else /* SCOTCH_PTSCOTCH */
-+   if (_SCOTCHerrorProgName[0] != '\0')
-+     mexPrintf  (": ");
-+ #endif /* SCOTCH_PTSCOTCH */
-+   mexPrintf  ("ERROR: ");
-+   va_start (errlist, errstr);
-+   mexPrintf (errstr, errlist);             /* Print arguments */
-+   va_end   (errlist);
-+   mexPrintf  ("\n");
-+ #endif /* MATLAB */
-+ 
+- #else /* MATLAB */
+-   mexPrintf  ("%s", _SCOTCHerrorProgName);
+- #ifdef SCOTCH_PTSCOTCH
+-   if ((MPI_Initialized (&proclocnum) == MPI_SUCCESS) &&
+-       (proclocnum != 0)                              &&
+-       (MPI_Comm_rank (MPI_COMM_WORLD, &proclocnum) == MPI_SUCCESS))
+-     mexPrintf ("(%d): ", proclocnum);
+- #else /* SCOTCH_PTSCOTCH */
+-   if (_SCOTCHerrorProgName[0] != '\0')
+-     mexPrintf  (": ");
+- #endif /* SCOTCH_PTSCOTCH */
+-   mexPrintf  ("ERROR: ");
+-   va_start (errlist, errstr);
+-   mexPrintf (errstr, errlist);             /* Print arguments */
+-   va_end   (errlist);
+-   mexPrintf  ("\n");
+- #endif /* MATLAB */
+- 
   #ifdef SCOTCH_ERROR_SLEEP
     sleep (SCOTCH_ERROR_SLEEP);                     /* Wait for messages to be propagated */
   #endif /* SCOTCH_ERROR_SLEEP */
-***************
-*** 155,160 ****
---- 174,180 ----
+--- 131,136 ----
+***************
+*** 174,180 ****
     int                 proclocnum;
   #endif /* SCOTCH_PTSCOTCH */
   
-+ #ifndef MATLAB
+- #ifndef MATLAB
     fprintf  (stderr, "%s", _SCOTCHerrorProgName);
   #ifdef SCOTCH_PTSCOTCH
     if ((MPI_Initialized (&proclocnum) == MPI_SUCCESS) &&
-***************
-*** 171,174 ****
---- 191,212 ----
+--- 155,160 ----
+***************
+*** 191,212 ****
     va_end   (errlist);
     fprintf  (stderr, "\n");
     fflush   (stderr);                              /* In case it has been set to buffered mode */
-+ 
-+ #else /* MATLAB */
-+   mexPrintf  ("%s", _SCOTCHerrorProgName);
-+ #ifdef SCOTCH_PTSCOTCH
-+   if ((MPI_Initialized (&proclocnum) == MPI_SUCCESS) &&
-+       (proclocnum != 0)                              &&
-+       (MPI_Comm_rank (MPI_COMM_WORLD, &proclocnum) == MPI_SUCCESS))
-+     mexPrintf ("(%d): ", proclocnum);
-+ #else /* SCOTCH_PTSCOTCH */
-+   if (_SCOTCHerrorProgName[0] != '\0')
-+     mexPrintf  (": ");
-+ #endif /* SCOTCH_PTSCOTCH */
-+   mexPrintf  ("WARNING: ");
-+   va_start (errlist, errstr);
-+   mexPrintf (errstr, errlist);             /* Print arguments */
-+   va_end   (errlist);
-+   mexPrintf  ("\n");
-+ #endif /* MATLAB */
+- 
+- #else /* MATLAB */
+-   mexPrintf  ("%s", _SCOTCHerrorProgName);
+- #ifdef SCOTCH_PTSCOTCH
+-   if ((MPI_Initialized (&proclocnum) == MPI_SUCCESS) &&
+-       (proclocnum != 0)                              &&
+-       (MPI_Comm_rank (MPI_COMM_WORLD, &proclocnum) == MPI_SUCCESS))
+-     mexPrintf ("(%d): ", proclocnum);
+- #else /* SCOTCH_PTSCOTCH */
+-   if (_SCOTCHerrorProgName[0] != '\0')
+-     mexPrintf  (": ");
+- #endif /* SCOTCH_PTSCOTCH */
+-   mexPrintf  ("WARNING: ");
+-   va_start (errlist, errstr);
+-   mexPrintf (errstr, errlist);             /* Print arguments */
+-   va_end   (errlist);
+-   mexPrintf  ("\n");
+- #endif /* MATLAB */
   }
-diff -rc src/src/libscotch/library_graph.c new4/src/libscotch/library_graph.c
-*** src/src/libscotch/library_graph.c	2008-05-22 07:28:12.000000000 -0700
---- new4/src/libscotch/library_graph.c	2010-05-03 15:37:55.337090040 -0700
-***************
-*** 137,143 ****
-  SCOTCH_Graph * const        grafptr,
-  FILE * const                stream,
-  const SCOTCH_Num            baseval,
-! const SCOTCH_Num            flagval)
-  {
-    GraphFlag           srcgrafflag;                /* Graph flags */
-  
---- 137,154 ----
+--- 171,174 ----
+diff -rc src/src/libscotch/library_graph.c old/src/libscotch/library_graph.c
+*** src/src/libscotch/library_graph.c	2010-07-19 10:53:22.962732194 -0700
+--- old/src/libscotch/library_graph.c	2008-05-22 07:28:12.000000000 -0700
+***************
+*** 137,154 ****
   SCOTCH_Graph * const        grafptr,
   FILE * const                stream,
@@ -1401,125 +1393,133 @@
     GraphFlag           srcgrafflag;                /* Graph flags */
   
-***************
-*** 153,159 ****
---- 164,174 ----
+--- 137,143 ----
+  SCOTCH_Graph * const        grafptr,
+  FILE * const                stream,
+  const SCOTCH_Num            baseval,
+! const SCOTCH_Num            flagval)
+  {
+    GraphFlag           srcgrafflag;                /* Graph flags */
+  
+***************
+*** 164,174 ****
     srcgrafflag = (((flagval & 1) != 0) ? GRAPHIONOLOADVERT : 0) +
                   (((flagval & 2) != 0) ? GRAPHIONOLOADEDGE : 0);
   
-+ #ifndef MATLAB
+- #ifndef MATLAB
     return (graphLoad ((Graph * const) grafptr, stream, (Gnum) baseval, srcgrafflag));
-+ #else /* MATLAB */
-+   return (graphLoad ((Graph * const) grafptr, stream, (Gnum) baseval, srcgrafflag, (const Gnum) nvert, (const Gnum) nedge2, (const Gnum *) adjir, (const Gnum *) adjjc, (const Gnum *) vertlab, (const Gnum *) vertwgt, (const Gnum *) edgewgt));
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+-   return (graphLoad ((Graph * const) grafptr, stream, (Gnum) baseval, srcgrafflag, (const Gnum) nvert, (const Gnum) nedge2, (const Gnum *) adjir, (const Gnum *) adjjc, (const Gnum *) vertlab, (const Gnum *) vertwgt, (const Gnum *) edgewgt));
+- #endif /* MATLAB */
   }
   
   /*+ This routine saves the contents of the given
-diff -rc src/src/libscotch/library_graph_f.c new4/src/libscotch/library_graph_f.c
-*** src/src/libscotch/library_graph_f.c	2008-05-22 06:44:43.000000000 -0700
---- new4/src/libscotch/library_graph_f.c	2010-05-03 15:37:55.344090046 -0700
-***************
-*** 136,142 ****
---- 136,146 ----
+--- 153,159 ----
+diff -rc src/src/libscotch/library_graph_f.c old/src/libscotch/library_graph_f.c
+*** src/src/libscotch/library_graph_f.c	2010-07-19 10:53:22.964732207 -0700
+--- old/src/libscotch/library_graph_f.c	2008-05-22 06:44:43.000000000 -0700
+***************
+*** 136,146 ****
     }
     setbuf (stream, NULL);                          /* Do not buffer on input */
   
-+ #ifndef MATLAB
+- #ifndef MATLAB
     o = SCOTCH_graphLoad (grafptr, stream, *baseptr, *flagptr);
-+ #else /* MATLAB */
-+   o = SCOTCH_graphLoad (grafptr, stream, *baseptr, *flagptr, 0, 0, NULL, NULL, NULL, NULL, NULL);
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+-   o = SCOTCH_graphLoad (grafptr, stream, *baseptr, *flagptr, 0, 0, NULL, NULL, NULL, NULL, NULL);
+- #endif /* MATLAB */
   
     fclose (stream);                                /* This closes filenum too */
   
-diff -rc src/src/libscotch/library_graph_map.c new4/src/libscotch/library_graph_map.c
-*** src/src/libscotch/library_graph_map.c	2008-09-28 04:04:05.000000000 -0700
---- new4/src/libscotch/library_graph_map.c	2010-05-03 15:37:55.350090051 -0700
-***************
-*** 182,192 ****
---- 182,200 ----
+--- 136,142 ----
+diff -rc src/src/libscotch/library_graph_map.c old/src/libscotch/library_graph_map.c
+*** src/src/libscotch/library_graph_map.c	2010-07-19 10:53:22.967732227 -0700
+--- old/src/libscotch/library_graph_map.c	2008-09-28 04:04:05.000000000 -0700
+***************
+*** 182,200 ****
   
   int
   SCOTCH_graphMapSave (
-+ #ifdef MATLAB
-+ Gnum *pnvert,
-+ Gnum (**pmaptab)[2],
-+ #endif /* MATLAB */
+- #ifdef MATLAB
+- Gnum *pnvert,
+- Gnum (**pmaptab)[2],
+- #endif /* MATLAB */
   const SCOTCH_Graph * const    grafptr,            /*+ Graph to order  +*/
   const SCOTCH_Mapping * const  mappptr,            /*+ Mapping to save +*/
   FILE * const                  stream)             /*+ Output stream   +*/
   {
-+ #ifndef MATLAB
+- #ifndef MATLAB
     return (mapSave (&((LibMapping *) mappptr)->m, ((Graph *) grafptr)->vlbltax, stream));
-+ #else /* MATLAB */
-+   return (mapSave (pnvert, pmaptab, &((LibMapping *) mappptr)->m, ((Graph *) grafptr)->vlbltax, stream));
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+-   return (mapSave (pnvert, pmaptab, &((LibMapping *) mappptr)->m, ((Graph *) grafptr)->vlbltax, stream));
+- #endif /* MATLAB */
   }
   
   /*+ This routine computes a mapping
-diff -rc src/src/libscotch/library_graph_map_f.c new4/src/libscotch/library_graph_map_f.c
-*** src/src/libscotch/library_graph_map_f.c	2008-06-28 03:44:26.000000000 -0700
---- new4/src/libscotch/library_graph_map_f.c	2010-05-03 15:37:55.357090057 -0700
-***************
-*** 183,189 ****
---- 183,193 ----
+--- 182,192 ----
+diff -rc src/src/libscotch/library_graph_map_f.c old/src/libscotch/library_graph_map_f.c
+*** src/src/libscotch/library_graph_map_f.c	2010-07-19 10:53:22.969732239 -0700
+--- old/src/libscotch/library_graph_map_f.c	2008-06-28 03:44:26.000000000 -0700
+***************
+*** 183,193 ****
       return;
     }
   
-+ #ifndef MATLAB
+- #ifndef MATLAB
     o = SCOTCH_graphMapSave (grafptr, mapptr, stream);
-+ #else /* MATLAB */
-+   o = SCOTCH_graphMapSave (NULL, NULL, grafptr, mapptr, stream);
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+-   o = SCOTCH_graphMapSave (NULL, NULL, grafptr, mapptr, stream);
+- #endif /* MATLAB */
   
     fclose (stream);                                /* This closes filenum too */
   
-diff -rc src/src/libscotch/library.h new4/src/libscotch/library.h
-*** src/src/libscotch/library.h	2009-05-09 16:08:03.000000000 -0700
---- new4/src/libscotch/library.h	2010-05-03 15:37:55.365090063 -0700
-***************
-*** 134,140 ****
---- 134,144 ----
+--- 183,189 ----
+diff -rc src/src/libscotch/library.h old/src/libscotch/library.h
+*** src/src/libscotch/library.h	2010-07-19 10:53:22.972732259 -0700
+--- old/src/libscotch/library.h	2009-05-09 16:08:03.000000000 -0700
+***************
+*** 134,144 ****
   
   int                         SCOTCH_archInit     (SCOTCH_Arch * const);
   void                        SCOTCH_archExit     (SCOTCH_Arch * const);
-+ #ifndef MATLAB
+- #ifndef MATLAB
   int                         SCOTCH_archLoad     (SCOTCH_Arch * const, FILE * const);
-+ #else /* MATLAB */
-+ int                         SCOTCH_archLoad     (SCOTCH_Arch * const, FILE * const, const char *, const SCOTCH_Num, const SCOTCH_Num *);
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+- int                         SCOTCH_archLoad     (SCOTCH_Arch * const, FILE * const, const char *, const SCOTCH_Num, const SCOTCH_Num *);
+- #endif /* MATLAB */
   int                         SCOTCH_archSave     (const SCOTCH_Arch * const, FILE * const);
   int                         SCOTCH_archBuild    (SCOTCH_Arch * const, const SCOTCH_Graph * const, const SCOTCH_Num, const SCOTCH_Num * const, const SCOTCH_Strat * const);
   int                         SCOTCH_archCmplt    (SCOTCH_Arch * const, const SCOTCH_Num);
-***************
-*** 191,197 ****
---- 195,205 ----
+--- 134,140 ----
+***************
+*** 195,205 ****
   int                         SCOTCH_graphInit    (SCOTCH_Graph * const);
   void                        SCOTCH_graphExit    (SCOTCH_Graph * const);
   void                        SCOTCH_graphFree    (SCOTCH_Graph * const);
-+ #ifndef MATLAB
+- #ifndef MATLAB
   int                         SCOTCH_graphLoad    (SCOTCH_Graph * const, FILE * const, const SCOTCH_Num, const SCOTCH_Num);
-+ #else /* MATLAB */
-+ int                         SCOTCH_graphLoad    (SCOTCH_Graph * const, FILE * const, const SCOTCH_Num, const SCOTCH_Num, const SCOTCH_Num, const SCOTCH_Num, const SCOTCH_Num *, const SCOTCH_Num *, const SCOTCH_Num *, const SCOTCH_Num *, const SCOTCH_Num *);
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+- int                         SCOTCH_graphLoad    (SCOTCH_Graph * const, FILE * const, const SCOTCH_Num, const SCOTCH_Num, const SCOTCH_Num, const SCOTCH_Num, const SCOTCH_Num *, const SCOTCH_Num *, const SCOTCH_Num *, const SCOTCH_Num *, const SCOTCH_Num *);
+- #endif /* MATLAB */
   int                         SCOTCH_graphSave    (const SCOTCH_Graph * const, FILE * const);
   int                         SCOTCH_graphBuild   (SCOTCH_Graph * const, const SCOTCH_Num, const SCOTCH_Num, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num * const, const SCOTCH_Num, const SCOTCH_Num * const, const SCOTCH_Num * const);
   SCOTCH_Num                  SCOTCH_graphBase    (SCOTCH_Graph * const, const SCOTCH_Num baseval);
-***************
-*** 210,216 ****
---- 218,228 ----
+--- 191,197 ----
+***************
+*** 218,228 ****
   int                         SCOTCH_graphMapInit (const SCOTCH_Graph * const, SCOTCH_Mapping * const, const SCOTCH_Arch * const, SCOTCH_Num * const);
   void                        SCOTCH_graphMapExit (const SCOTCH_Graph * const, SCOTCH_Mapping * const);
   int                         SCOTCH_graphMapLoad (const SCOTCH_Graph * const, const SCOTCH_Mapping * const, FILE * const);
-+ #ifndef MATLAB
+- #ifndef MATLAB
   int                         SCOTCH_graphMapSave (const SCOTCH_Graph * const, const SCOTCH_Mapping * const, FILE * const);
-+ #else /* MATLAB */
-+ int                         SCOTCH_graphMapSave (SCOTCH_Num *, SCOTCH_Num (**)[2], const SCOTCH_Graph * const, const SCOTCH_Mapping * const, FILE * const);
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+- int                         SCOTCH_graphMapSave (SCOTCH_Num *, SCOTCH_Num (**)[2], const SCOTCH_Graph * const, const SCOTCH_Mapping * const, FILE * const);
+- #endif /* MATLAB */
   int                         SCOTCH_graphMapView (const SCOTCH_Graph * const, const SCOTCH_Mapping * const, FILE * const);
   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 new4/src/libscotch/Makefile
-*** src/src/libscotch/Makefile	2009-05-09 16:08:04.000000000 -0700
---- new4/src/libscotch/Makefile	2010-06-17 09:55:33.101320246 -0700
+--- 210,216 ----
+diff -rc src/src/libscotch/Makefile old/src/libscotch/Makefile
+*** src/src/libscotch/Makefile	2010-07-19 10:53:22.977732291 -0700
+--- old/src/libscotch/Makefile	2009-05-09 16:08:04.000000000 -0700
 ***************
 *** 49,55 ****
@@ -1527,5 +1527,5 @@
   ##
   
-! .PHONY				:	ptscotch	scotch	ptinstall	install	clean	realclean
+! .PHONY				:	ptscotch	scotch	mexscotch	ptinstall	install	clean	realclean
   
   scotch				:	clean
@@ -1535,306 +1535,283 @@
   ##
   
-! .PHONY				:	ptscotch	scotch	mexscotch	ptinstall	install	clean	realclean
+! .PHONY				:	ptscotch	scotch	ptinstall	install	clean	realclean
   
   scotch				:	clean
   					$(MAKE) CC="$(CCS)" CCD="$(CCS)" SCOTCHLIB=scotch	\
 ***************
-*** 68,73 ****
---- 68,83 ----
+*** 68,83 ****
   					libptscotcherr$(LIB)								\
   					libptscotcherrexit$(LIB)
   
-+ mexscotch			:	clean
-+ 					$(MAKE) CFLAGS="$(CFLAGS)" CC="$(CCS)" CCD="$(CCS)" LDFLAGS="$(LDFLAGS)" SCOTCHLIB=scotch	\
-+ 					dummysizes$(EXE)
-+ 					$(MAKE) CFLAGS="$(CFLAGS) -DMATLAB -I${MATLAB_DIR}/extern/include" CC="$(CCS)" CCD="$(CCS)" LDFLAGS="$(LDFLAGS) -Wl,-rpath-link,${MATLAB_DIR}/bin/glnxa64 -L${MATLAB_DIR}/bin/glnxa64 -lmex -lmat" SCOTCHLIB=scotch	\
-+ 					scotch.h						\
-+ 					scotchf.h						\
-+ 					libmexscotch$(LIB)						\
-+ 					libmexscotcherr$(LIB)					\
-+ 					libmexscotcherrexit$(LIB)
-+ 
+- mexscotch			:	clean
+- 					$(MAKE) CFLAGS="$(CFLAGS)" CC="$(CCS)" CCD="$(CCS)" LDFLAGS="$(LDFLAGS)" SCOTCHLIB=scotch	\
+- 					dummysizes$(EXE)
+- 					$(MAKE) CFLAGS="$(CFLAGS) -DMATLAB -I${MATLAB_DIR}/extern/include" CC="$(CCS)" CCD="$(CCS)" LDFLAGS="$(LDFLAGS) -Wl,-rpath-link,${MATLAB_DIR}/bin/glnxa64 -L${MATLAB_DIR}/bin/glnxa64 -lmex -lmat" SCOTCHLIB=scotch	\
+- 					scotch.h						\
+- 					scotchf.h						\
+- 					libmexscotch$(LIB)						\
+- 					libmexscotcherr$(LIB)					\
+- 					libmexscotcherrexit$(LIB)
+- 
   install				:
   					-$(CP) scotch.h scotchf.h $(includedir)
   					-$(CP) libscotch$(LIB) libscotcherr*$(LIB) $(libdir)
-***************
-*** 77,82 ****
---- 87,96 ----
+--- 68,73 ----
+***************
+*** 87,96 ****
   					-$(CP) scotchf.h $(includedir)/ptscotchf.h
   					-$(CP) libptscotch*$(LIB) $(libdir)
   
-+ mexinstall				:
-+ 					-$(CP) scotch.h scotchf.h $(includedir)
-+ 					-$(CP) libmexscotch$(LIB) libmexscotcherr*$(LIB) $(libdir)
-+ 
+- mexinstall				:
+- 					-$(CP) scotch.h scotchf.h $(includedir)
+- 					-$(CP) libmexscotch$(LIB) libmexscotcherr*$(LIB) $(libdir)
+- 
   clean				:
   					-$(RM) *~ *$(OBJ) lib*$(LIB) common2* parser_yy.c parser_ly.h parser_ll.c *scotch.h *scotchf.h y.output dummysizes$(EXE)
   
-***************
-*** 2452,2457 ****
---- 2466,2632 ----
+--- 77,82 ----
+***************
+*** 2466,2632 ****
   					$(AR) $(ARFLAGS) lib$(SCOTCHLIB)$(LIB) $(?)
   					-$(RANLIB) lib$(SCOTCHLIB)$(LIB)
   
-+ libmexscotch$(LIB)			:	arch$(OBJ)				\
-+ 					arch_build$(OBJ)			\
-+ 					arch_cmplt$(OBJ)			\
-+ 					arch_cmpltw$(OBJ)			\
-+ 					arch_deco$(OBJ)				\
-+ 					arch_hcub$(OBJ)				\
-+ 					arch_mesh$(OBJ)				\
-+ 					arch_tleaf$(OBJ)			\
-+ 					arch_torus$(OBJ)			\
-+ 					arch_vcmplt$(OBJ)			\
-+ 					arch_vhcub$(OBJ)			\
-+ 					bgraph$(OBJ)				\
-+ 					bgraph_bipart_bd$(OBJ)			\
-+ 					bgraph_bipart_df$(OBJ)			\
-+ 					bgraph_bipart_ex$(OBJ)			\
-+ 					bgraph_bipart_fm$(OBJ)			\
-+ 					bgraph_bipart_gg$(OBJ)			\
-+ 					bgraph_bipart_gp$(OBJ)			\
-+ 					bgraph_bipart_ml$(OBJ)			\
-+ 					bgraph_bipart_st$(OBJ)			\
-+ 					bgraph_bipart_zr$(OBJ)			\
-+ 					bgraph_check$(OBJ)			\
-+ 					bgraph_store$(OBJ)			\
-+ 					common$(OBJ)				\
-+ 					common_file$(OBJ)			\
-+ 					common_file_compress$(OBJ)		\
-+ 					common_file_uncompress$(OBJ)		\
-+ 					common_integer$(OBJ)			\
-+ 					common_memory$(OBJ)			\
-+ 					common_stub$(OBJ)			\
-+ 					gain$(OBJ)				\
-+ 					geom$(OBJ)				\
-+ 					graph$(OBJ)				\
-+ 					graph_base$(OBJ)			\
-+ 					graph_check$(OBJ)			\
-+ 					graph_coarsen$(OBJ)			\
-+ 					graph_induce$(OBJ)			\
-+ 					graph_io$(OBJ)				\
-+ 					graph_io_chac$(OBJ)			\
-+ 					graph_io_habo$(OBJ)			\
-+ 					graph_io_mmkt$(OBJ)			\
-+ 					graph_io_scot$(OBJ)			\
-+ 					graph_list$(OBJ)			\
-+ 					hall_order_hd$(OBJ)			\
-+ 					hall_order_hf$(OBJ)			\
-+ 					hall_order_hx$(OBJ)			\
-+ 					hgraph$(OBJ)				\
-+ 					hgraph_check$(OBJ)			\
-+ 					hgraph_induce$(OBJ)			\
-+ 					hgraph_order_bl$(OBJ)			\
-+ 					hgraph_order_cp$(OBJ)			\
-+ 					hgraph_order_gp$(OBJ)			\
-+ 					hgraph_order_hd$(OBJ)			\
-+ 					hgraph_order_hf$(OBJ)			\
-+ 					hgraph_order_hx$(OBJ)			\
-+ 					hgraph_order_nd$(OBJ)			\
-+ 					hgraph_order_si$(OBJ)			\
-+ 					hgraph_order_st$(OBJ)			\
-+ 					hmesh$(OBJ)				\
-+ 					hmesh_check$(OBJ)			\
-+ 					hmesh_hgraph$(OBJ)			\
-+ 					hmesh_induce$(OBJ)			\
-+ 					hmesh_mesh$(OBJ)			\
-+ 					hmesh_order_bl$(OBJ)			\
-+ 					hmesh_order_cp$(OBJ)			\
-+ 					hmesh_order_gr$(OBJ)			\
-+ 					hmesh_order_gp$(OBJ)			\
-+ 					hmesh_order_hd$(OBJ)			\
-+ 					hmesh_order_hf$(OBJ)			\
-+ 					hmesh_order_hx$(OBJ)			\
-+ 					hmesh_order_nd$(OBJ)			\
-+ 					hmesh_order_si$(OBJ)			\
-+ 					hmesh_order_st$(OBJ)			\
-+ 					kgraph$(OBJ)				\
-+ 					kgraph_map_rb$(OBJ)			\
-+ 					kgraph_map_rb_map$(OBJ)			\
-+ 					kgraph_map_rb_part$(OBJ)		\
-+ 					kgraph_map_st$(OBJ)			\
-+ 					library_arch$(OBJ)			\
-+ 					library_arch_f$(OBJ)			\
-+ 					library_arch_build$(OBJ)		\
-+ 					library_arch_build_f$(OBJ)		\
-+ 					library_arch_cmpltw$(OBJ)		\
-+ 					library_arch_cmpltw_f$(OBJ)		\
-+ 					library_geom$(OBJ)			\
-+ 					library_geom_f$(OBJ)			\
-+ 					library_graph$(OBJ)			\
-+ 					library_graph_f$(OBJ)			\
-+ 					library_graph_base$(OBJ)		\
-+ 					library_graph_base_f$(OBJ)		\
-+ 					library_graph_check$(OBJ)		\
-+ 					library_graph_check_f$(OBJ)		\
-+ 					library_graph_io_chac$(OBJ)		\
-+ 					library_graph_io_chac_f$(OBJ)		\
-+ 					library_graph_io_habo$(OBJ)		\
-+ 					library_graph_io_habo_f$(OBJ)		\
-+ 					library_graph_io_mmkt$(OBJ)		\
-+ 					library_graph_io_mmkt_f$(OBJ)		\
-+ 					library_graph_io_scot$(OBJ)		\
-+ 					library_graph_io_scot_f$(OBJ)		\
-+ 					library_graph_map$(OBJ)			\
-+ 					library_graph_map_f$(OBJ)		\
-+ 					library_graph_map_view$(OBJ)		\
-+ 					library_graph_map_view_f$(OBJ)		\
-+ 					library_graph_order$(OBJ)		\
-+ 					library_graph_order_f$(OBJ)		\
-+ 					library_mesh$(OBJ)			\
-+ 					library_mesh_f$(OBJ)			\
-+ 					library_mesh_graph$(OBJ)		\
-+ 					library_mesh_graph_f$(OBJ)		\
-+ 					library_mesh_io_habo$(OBJ)		\
-+ 					library_mesh_io_habo_f$(OBJ)		\
-+ 					library_mesh_io_scot$(OBJ)		\
-+ 					library_mesh_io_scot_f$(OBJ)		\
-+ 					library_mesh_order$(OBJ)		\
-+ 					library_mesh_order_f$(OBJ)		\
-+ 					library_parser$(OBJ)			\
-+ 					library_parser_f$(OBJ)			\
-+ 					library_random$(OBJ)			\
-+ 					library_random_f$(OBJ)			\
-+ 					mapping$(OBJ)				\
-+ 					mapping_io$(OBJ)			\
-+ 					mesh$(OBJ)				\
-+ 					mesh_check$(OBJ)			\
-+ 					mesh_coarsen$(OBJ)			\
-+ 					mesh_graph$(OBJ)			\
-+ 					mesh_induce_sepa$(OBJ)			\
-+ 					mesh_io$(OBJ)				\
-+ 					mesh_io_habo$(OBJ)			\
-+ 					mesh_io_scot$(OBJ)			\
-+ 					order$(OBJ)				\
-+ 					order_check$(OBJ)			\
-+ 					order_io$(OBJ)				\
-+ 					parser$(OBJ)				\
-+ 					parser_ll$(OBJ)				\
-+ 					parser_yy$(OBJ)				\
-+ 					vgraph$(OBJ)				\
-+ 					vgraph_check$(OBJ)			\
-+ 					vgraph_separate_bd$(OBJ)		\
-+ 					vgraph_separate_es$(OBJ)		\
-+ 					vgraph_separate_fm$(OBJ)		\
-+ 					vgraph_separate_gg$(OBJ)		\
-+ 					vgraph_separate_gp$(OBJ)		\
-+ 					vgraph_separate_ml$(OBJ)		\
-+ 					vgraph_separate_st$(OBJ)		\
-+ 					vgraph_separate_th$(OBJ)		\
-+ 					vgraph_separate_vw$(OBJ)		\
-+ 					vgraph_separate_zr$(OBJ)		\
-+ 					vgraph_store$(OBJ)			\
-+ 					vmesh$(OBJ)				\
-+ 					vmesh_check$(OBJ)			\
-+ 					vmesh_separate_fm$(OBJ)			\
-+ 					vmesh_separate_gg$(OBJ)			\
-+ 					vmesh_separate_gr$(OBJ)			\
-+ 					vmesh_separate_ml$(OBJ)			\
-+ 					vmesh_separate_zr$(OBJ)			\
-+ 					vmesh_separate_st$(OBJ)			\
-+ 					vmesh_store$(OBJ)
-+ 					$(AR) $(ARFLAGS) $(@) $(?)
-+ 					-$(RANLIB) $(@)
-+ 
+- libmexscotch$(LIB)			:	arch$(OBJ)				\
+- 					arch_build$(OBJ)			\
+- 					arch_cmplt$(OBJ)			\
+- 					arch_cmpltw$(OBJ)			\
+- 					arch_deco$(OBJ)				\
+- 					arch_hcub$(OBJ)				\
+- 					arch_mesh$(OBJ)				\
+- 					arch_tleaf$(OBJ)			\
+- 					arch_torus$(OBJ)			\
+- 					arch_vcmplt$(OBJ)			\
+- 					arch_vhcub$(OBJ)			\
+- 					bgraph$(OBJ)				\
+- 					bgraph_bipart_bd$(OBJ)			\
+- 					bgraph_bipart_df$(OBJ)			\
+- 					bgraph_bipart_ex$(OBJ)			\
+- 					bgraph_bipart_fm$(OBJ)			\
+- 					bgraph_bipart_gg$(OBJ)			\
+- 					bgraph_bipart_gp$(OBJ)			\
+- 					bgraph_bipart_ml$(OBJ)			\
+- 					bgraph_bipart_st$(OBJ)			\
+- 					bgraph_bipart_zr$(OBJ)			\
+- 					bgraph_check$(OBJ)			\
+- 					bgraph_store$(OBJ)			\
+- 					common$(OBJ)				\
+- 					common_file$(OBJ)			\
+- 					common_file_compress$(OBJ)		\
+- 					common_file_uncompress$(OBJ)		\
+- 					common_integer$(OBJ)			\
+- 					common_memory$(OBJ)			\
+- 					common_stub$(OBJ)			\
+- 					gain$(OBJ)				\
+- 					geom$(OBJ)				\
+- 					graph$(OBJ)				\
+- 					graph_base$(OBJ)			\
+- 					graph_check$(OBJ)			\
+- 					graph_coarsen$(OBJ)			\
+- 					graph_induce$(OBJ)			\
+- 					graph_io$(OBJ)				\
+- 					graph_io_chac$(OBJ)			\
+- 					graph_io_habo$(OBJ)			\
+- 					graph_io_mmkt$(OBJ)			\
+- 					graph_io_scot$(OBJ)			\
+- 					graph_list$(OBJ)			\
+- 					hall_order_hd$(OBJ)			\
+- 					hall_order_hf$(OBJ)			\
+- 					hall_order_hx$(OBJ)			\
+- 					hgraph$(OBJ)				\
+- 					hgraph_check$(OBJ)			\
+- 					hgraph_induce$(OBJ)			\
+- 					hgraph_order_bl$(OBJ)			\
+- 					hgraph_order_cp$(OBJ)			\
+- 					hgraph_order_gp$(OBJ)			\
+- 					hgraph_order_hd$(OBJ)			\
+- 					hgraph_order_hf$(OBJ)			\
+- 					hgraph_order_hx$(OBJ)			\
+- 					hgraph_order_nd$(OBJ)			\
+- 					hgraph_order_si$(OBJ)			\
+- 					hgraph_order_st$(OBJ)			\
+- 					hmesh$(OBJ)				\
+- 					hmesh_check$(OBJ)			\
+- 					hmesh_hgraph$(OBJ)			\
+- 					hmesh_induce$(OBJ)			\
+- 					hmesh_mesh$(OBJ)			\
+- 					hmesh_order_bl$(OBJ)			\
+- 					hmesh_order_cp$(OBJ)			\
+- 					hmesh_order_gr$(OBJ)			\
+- 					hmesh_order_gp$(OBJ)			\
+- 					hmesh_order_hd$(OBJ)			\
+- 					hmesh_order_hf$(OBJ)			\
+- 					hmesh_order_hx$(OBJ)			\
+- 					hmesh_order_nd$(OBJ)			\
+- 					hmesh_order_si$(OBJ)			\
+- 					hmesh_order_st$(OBJ)			\
+- 					kgraph$(OBJ)				\
+- 					kgraph_map_rb$(OBJ)			\
+- 					kgraph_map_rb_map$(OBJ)			\
+- 					kgraph_map_rb_part$(OBJ)		\
+- 					kgraph_map_st$(OBJ)			\
+- 					library_arch$(OBJ)			\
+- 					library_arch_f$(OBJ)			\
+- 					library_arch_build$(OBJ)		\
+- 					library_arch_build_f$(OBJ)		\
+- 					library_arch_cmpltw$(OBJ)		\
+- 					library_arch_cmpltw_f$(OBJ)		\
+- 					library_geom$(OBJ)			\
+- 					library_geom_f$(OBJ)			\
+- 					library_graph$(OBJ)			\
+- 					library_graph_f$(OBJ)			\
+- 					library_graph_base$(OBJ)		\
+- 					library_graph_base_f$(OBJ)		\
+- 					library_graph_check$(OBJ)		\
+- 					library_graph_check_f$(OBJ)		\
+- 					library_graph_io_chac$(OBJ)		\
+- 					library_graph_io_chac_f$(OBJ)		\
+- 					library_graph_io_habo$(OBJ)		\
+- 					library_graph_io_habo_f$(OBJ)		\
+- 					library_graph_io_mmkt$(OBJ)		\
+- 					library_graph_io_mmkt_f$(OBJ)		\
+- 					library_graph_io_scot$(OBJ)		\
+- 					library_graph_io_scot_f$(OBJ)		\
+- 					library_graph_map$(OBJ)			\
+- 					library_graph_map_f$(OBJ)		\
+- 					library_graph_map_view$(OBJ)		\
+- 					library_graph_map_view_f$(OBJ)		\
+- 					library_graph_order$(OBJ)		\
+- 					library_graph_order_f$(OBJ)		\
+- 					library_mesh$(OBJ)			\
+- 					library_mesh_f$(OBJ)			\
+- 					library_mesh_graph$(OBJ)		\
+- 					library_mesh_graph_f$(OBJ)		\
+- 					library_mesh_io_habo$(OBJ)		\
+- 					library_mesh_io_habo_f$(OBJ)		\
+- 					library_mesh_io_scot$(OBJ)		\
+- 					library_mesh_io_scot_f$(OBJ)		\
+- 					library_mesh_order$(OBJ)		\
+- 					library_mesh_order_f$(OBJ)		\
+- 					library_parser$(OBJ)			\
+- 					library_parser_f$(OBJ)			\
+- 					library_random$(OBJ)			\
+- 					library_random_f$(OBJ)			\
+- 					mapping$(OBJ)				\
+- 					mapping_io$(OBJ)			\
+- 					mesh$(OBJ)				\
+- 					mesh_check$(OBJ)			\
+- 					mesh_coarsen$(OBJ)			\
+- 					mesh_graph$(OBJ)			\
+- 					mesh_induce_sepa$(OBJ)			\
+- 					mesh_io$(OBJ)				\
+- 					mesh_io_habo$(OBJ)			\
+- 					mesh_io_scot$(OBJ)			\
+- 					order$(OBJ)				\
+- 					order_check$(OBJ)			\
+- 					order_io$(OBJ)				\
+- 					parser$(OBJ)				\
+- 					parser_ll$(OBJ)				\
+- 					parser_yy$(OBJ)				\
+- 					vgraph$(OBJ)				\
+- 					vgraph_check$(OBJ)			\
+- 					vgraph_separate_bd$(OBJ)		\
+- 					vgraph_separate_es$(OBJ)		\
+- 					vgraph_separate_fm$(OBJ)		\
+- 					vgraph_separate_gg$(OBJ)		\
+- 					vgraph_separate_gp$(OBJ)		\
+- 					vgraph_separate_ml$(OBJ)		\
+- 					vgraph_separate_st$(OBJ)		\
+- 					vgraph_separate_th$(OBJ)		\
+- 					vgraph_separate_vw$(OBJ)		\
+- 					vgraph_separate_zr$(OBJ)		\
+- 					vgraph_store$(OBJ)			\
+- 					vmesh$(OBJ)				\
+- 					vmesh_check$(OBJ)			\
+- 					vmesh_separate_fm$(OBJ)			\
+- 					vmesh_separate_gg$(OBJ)			\
+- 					vmesh_separate_gr$(OBJ)			\
+- 					vmesh_separate_ml$(OBJ)			\
+- 					vmesh_separate_zr$(OBJ)			\
+- 					vmesh_separate_st$(OBJ)			\
+- 					vmesh_store$(OBJ)
+- 					$(AR) $(ARFLAGS) $(@) $(?)
+- 					-$(RANLIB) $(@)
+- 
   libptscotcherr$(LIB)		:	library_error$(OBJ)
   					$(AR) $(ARFLAGS) $(@) $(?)
   					-$(RANLIB) $(@)
-***************
-*** 2467,2469 ****
---- 2642,2651 ----
+--- 2452,2457 ----
+***************
+*** 2642,2651 ****
   libscotcherrexit$(LIB)		:	library_error_exit$(OBJ)
   					$(AR) $(ARFLAGS) $(@) $(?)
   					-$(RANLIB) $(@)
-+ libmexscotcherr$(LIB)		:	library_error$(OBJ)
-+ 					$(AR) $(ARFLAGS) $(@) $(?)
-+ 					-$(RANLIB) $(@)
-+ 
-+ libmexscotcherrexit$(LIB)		:	library_error_exit$(OBJ)
-+ 					$(AR) $(ARFLAGS) $(@) $(?)
-+ 					-$(RANLIB) $(@)
-Only in new4/src/libscotch: Makefile_save
-diff -rc src/src/libscotch/mapping.h new4/src/libscotch/mapping.h
-*** src/src/libscotch/mapping.h	2008-10-27 08:27:47.000000000 -0700
---- new4/src/libscotch/mapping.h	2010-05-03 15:37:55.381090077 -0700
-***************
-*** 106,112 ****
---- 106,116 ----
+- libmexscotcherr$(LIB)		:	library_error$(OBJ)
+- 					$(AR) $(ARFLAGS) $(@) $(?)
+- 					-$(RANLIB) $(@)
+- 
+- libmexscotcherrexit$(LIB)		:	library_error_exit$(OBJ)
+- 					$(AR) $(ARFLAGS) $(@) $(?)
+- 					-$(RANLIB) $(@)
+--- 2467,2469 ----
+diff -rc src/src/libscotch/mapping.h old/src/libscotch/mapping.h
+*** src/src/libscotch/mapping.h	2010-07-19 10:53:22.980732310 -0700
+--- old/src/libscotch/mapping.h	2008-10-27 08:27:47.000000000 -0700
+***************
+*** 106,116 ****
   int                         mapInit2            (Mapping * restrict const, const Gnum, const Gnum, const Arch * restrict const, const ArchDom * restrict const);
   void                        mapExit             (Mapping * const);
   int                         mapLoad             (Mapping * restrict const, const Gnum * restrict const, FILE * restrict const);
-+ #ifndef MATLAB
+- #ifndef MATLAB
   int                         mapSave             (const Mapping * restrict const, const Gnum * restrict const, FILE * restrict const);
-+ #else /* MATLAB */
-+ int                         mapSave             (Gnum *, Gnum (**)[2], const Mapping * restrict const, const Gnum * restrict const, FILE * restrict const);
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+- int                         mapSave             (Gnum *, Gnum (**)[2], const Mapping * restrict const, const Gnum * restrict const, FILE * restrict const);
+- #endif /* MATLAB */
   int                         mapView             (const Mapping * restrict const, const Graph * restrict const, FILE * const);
   
   #undef static
-diff -rc src/src/libscotch/mapping_io.c new4/src/libscotch/mapping_io.c
-*** src/src/libscotch/mapping_io.c	2008-05-22 06:44:43.000000000 -0700
---- new4/src/libscotch/mapping_io.c	2010-05-03 15:37:55.388090082 -0700
-***************
-*** 199,204 ****
---- 199,208 ----
+--- 106,112 ----
+diff -rc src/src/libscotch/mapping_io.c old/src/libscotch/mapping_io.c
+*** src/src/libscotch/mapping_io.c	2010-07-19 10:53:22.983732330 -0700
+--- old/src/libscotch/mapping_io.c	2008-05-22 06:44:43.000000000 -0700
+***************
+*** 199,208 ****
   
   int
   mapSave (
-+ #ifdef MATLAB
-+ Gnum *pnvert,
-+ Gnum (**pmaptab)[2],
-+ #endif /* MATLAB */
+- #ifdef MATLAB
+- Gnum *pnvert,
+- Gnum (**pmaptab)[2],
+- #endif /* MATLAB */
   const Mapping * restrict const  mappptr,
   const Gnum * restrict const     vlbltab,
   FILE * restrict const           stream)
-***************
-*** 206,226 ****
+--- 199,204 ----
+***************
+*** 210,258 ****
     const Gnum * restrict vlbltax;
     Gnum                  vertnum;
   
+- #ifdef MATLAB
+-   printf("mapSave - stream=%p\n",stream);
+- #endif /* MATLAB */
     vlbltax = (vlbltab != NULL) ? (vlbltab - mappptr->baseval) : NULL;
   
+- #ifndef MATLAB
     if (fprintf (stream, "%ld\n", (long) mappptr->vertnbr) == EOF) {
       errorPrint ("mapSave: bad output (1)");
       return     (1);
     }
-  
-    for (vertnum = mappptr->baseval; vertnum < (mappptr->vertnbr + mappptr->baseval); vertnum ++) {
-      if (fprintf (stream, "%ld\t%ld\n",
-!                  (long) ((vlbltax != NULL) ? vlbltax[vertnum] : vertnum),
-                   (long) archDomNum (&mappptr->archdat, &mappptr->domntab[mappptr->parttax[vertnum]])) == EOF) {
-        errorPrint ("mapSave: bad output (2)");
-        return     (1);
-      }
-    }
-  
-    return (0);
-  }
---- 210,258 ----
-    const Gnum * restrict vlbltax;
-    Gnum                  vertnum;
-  
-+ #ifdef MATLAB
-+   printf("mapSave - stream=%p\n",stream);
-+ #endif /* MATLAB */
-    vlbltax = (vlbltab != NULL) ? (vlbltab - mappptr->baseval) : NULL;
-  
-+ #ifndef MATLAB
-    if (fprintf (stream, "%ld\n", (long) mappptr->vertnbr) == EOF) {
-      errorPrint ("mapSave: bad output (1)");
-      return     (1);
-    }
-+ #else /* MATLAB */
-+   if (pnvert) {
-+     *pnvert=mappptr->vertnbr;
-+     printf("mapSave - nvert=%d\n",*pnvert);
-+   }
-+   if (pmaptab) {
-+     *pmaptab = (Gnum (*)[2]) malloc(mappptr->vertnbr*2*sizeof(Gnum));
-+     printf("mapSave - maptab=%p\n",*pmaptab);
-+   }
-+ #endif /* MATLAB */
-  
-+ #ifndef MATLAB
+- #else /* MATLAB */
+-   if (pnvert) {
+-     *pnvert=mappptr->vertnbr;
+-     printf("mapSave - nvert=%d\n",*pnvert);
+-   }
+-   if (pmaptab) {
+-     *pmaptab = (Gnum (*)[2]) malloc(mappptr->vertnbr*2*sizeof(Gnum));
+-     printf("mapSave - maptab=%p\n",*pmaptab);
+-   }
+- #endif /* MATLAB */
+  
+- #ifndef MATLAB
     for (vertnum = mappptr->baseval; vertnum < (mappptr->vertnbr + mappptr->baseval); vertnum ++) {
       if (fprintf (stream, "%ld\t%ld\n",
@@ -1847,219 +1824,241 @@
       }
     }
-+ #else /* MATLAB */
-+   if (pmaptab && *pmaptab)
-+     for (vertnum = mappptr->baseval; vertnum < (mappptr->vertnbr + mappptr->baseval); vertnum ++) {
-+ /*  not sure why, but need to offset vlbltax in other direction (jes, 12/11/09)  */
-+ //      (*pmaptab)[vertnum-mappptr->baseval][0]=((vlbltax != NULL) ? vlbltax[vertnum] : vertnum);
-+       (*pmaptab)[vertnum-mappptr->baseval][0]=((vlbltax != NULL) ? vlbltax[vertnum+mappptr->baseval] : vertnum);
-+       (*pmaptab)[vertnum-mappptr->baseval][1]=archDomNum (&mappptr->archdat, &mappptr->domntab[mappptr->parttax[vertnum]]);
-+ //    printf("mapSave - vertnum=%d; vlbltax=%d,archDomNum=%d\n",
-+ //           vertnum,((vlbltax != NULL) ? vlbltax[vertnum+mappptr->baseval] : -1),archDomNum (&mappptr->archdat, &mappptr->domntab[mappptr->parttax[vertnum]]));
-+     }
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+-   if (pmaptab && *pmaptab)
+-     for (vertnum = mappptr->baseval; vertnum < (mappptr->vertnbr + mappptr->baseval); vertnum ++) {
+- /*  not sure why, but need to offset vlbltax in other direction (jes, 12/11/09)  */
+- //      (*pmaptab)[vertnum-mappptr->baseval][0]=((vlbltax != NULL) ? vlbltax[vertnum] : vertnum);
+-       (*pmaptab)[vertnum-mappptr->baseval][0]=((vlbltax != NULL) ? vlbltax[vertnum+mappptr->baseval] : vertnum);
+-       (*pmaptab)[vertnum-mappptr->baseval][1]=archDomNum (&mappptr->archdat, &mappptr->domntab[mappptr->parttax[vertnum]]);
+- //    printf("mapSave - vertnum=%d; vlbltax=%d,archDomNum=%d\n",
+- //           vertnum,((vlbltax != NULL) ? vlbltax[vertnum+mappptr->baseval] : -1),archDomNum (&mappptr->archdat, &mappptr->domntab[mappptr->parttax[vertnum]]));
+-     }
+- #endif /* MATLAB */
   
     return (0);
   }
-diff -rc src/src/libscotch/mesh_io_scot.c new4/src/libscotch/mesh_io_scot.c
-*** src/src/libscotch/mesh_io_scot.c	2008-05-22 06:44:43.000000000 -0700
---- new4/src/libscotch/mesh_io_scot.c	2010-05-03 15:37:55.394090087 -0700
-***************
-*** 85,91 ****
---- 85,95 ----
+--- 206,226 ----
+    const Gnum * restrict vlbltax;
+    Gnum                  vertnum;
+  
+    vlbltax = (vlbltab != NULL) ? (vlbltab - mappptr->baseval) : NULL;
+  
+    if (fprintf (stream, "%ld\n", (long) mappptr->vertnbr) == EOF) {
+      errorPrint ("mapSave: bad output (1)");
+      return     (1);
+    }
+  
+    for (vertnum = mappptr->baseval; vertnum < (mappptr->vertnbr + mappptr->baseval); vertnum ++) {
+      if (fprintf (stream, "%ld\t%ld\n",
+!                  (long) ((vlbltax != NULL) ? vlbltax[vertnum] : vertnum),
+                   (long) archDomNum (&mappptr->archdat, &mappptr->domntab[mappptr->parttax[vertnum]])) == EOF) {
+        errorPrint ("mapSave: bad output (2)");
+        return     (1);
+      }
+    }
+  
+    return (0);
+  }
+diff -rc src/src/libscotch/mesh_io_scot.c old/src/libscotch/mesh_io_scot.c
+*** src/src/libscotch/mesh_io_scot.c	2010-07-19 10:53:22.986732349 -0700
+--- old/src/libscotch/mesh_io_scot.c	2008-05-22 06:44:43.000000000 -0700
+***************
+*** 85,95 ****
     int                           o;
   
     if (filesrcptr != NULL) {
-+ #ifndef MATLAB
+- #ifndef MATLAB
       if (graphLoad (meshptr, filesrcptr, -1, 0) != 0)
-+ #else /* MATLAB */
-+     if (graphLoad (meshptr, filesrcptr, -1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL) != 0)
-+ #endif /* MATLAB */
+- #else /* MATLAB */
+-     if (graphLoad (meshptr, filesrcptr, -1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL) != 0)
+- #endif /* MATLAB */
         return (1);
     }
   
-diff -rc src/src/libscotch/module.h new4/src/libscotch/module.h
-*** src/src/libscotch/module.h	2009-04-26 23:07:14.000000000 -0700
---- new4/src/libscotch/module.h	2010-05-03 15:37:55.402090094 -0700
-***************
-*** 156,161 ****
---- 156,162 ----
+--- 85,91 ----
+diff -rc src/src/libscotch/module.h old/src/libscotch/module.h
+*** src/src/libscotch/module.h	2010-07-19 10:53:22.990732375 -0700
+--- old/src/libscotch/module.h	2009-04-26 23:07:14.000000000 -0700
+***************
+*** 156,162 ****
   #define intSave                     _SCOTCHintSave
   #define intAscn                     _SCOTCHintAscn
   #define intPerm                     _SCOTCHintPerm
-+ #define intRandResetStatic          _SCOTCHintRandResetStatic
+- #define intRandResetStatic          _SCOTCHintRandResetStatic
   #define intRandReset                _SCOTCHintRandReset
   #define intRandInit                 _SCOTCHintRandInit
   /* #define intRandVal               _SCOTCHintRandVal Already a macro */
-diff -rc src/src/libscotch/parser_ll.l new4/src/libscotch/parser_ll.l
-*** src/src/libscotch/parser_ll.l	2008-05-22 06:44:43.000000000 -0700
---- new4/src/libscotch/parser_ll.l	2010-05-03 15:37:55.410090101 -0700
-***************
-*** 192,197 ****
---- 192,214 ----
+--- 156,161 ----
+diff -rc src/src/libscotch/parser_ll.l old/src/libscotch/parser_ll.l
+*** src/src/libscotch/parser_ll.l	2010-07-19 10:53:22.993732394 -0700
+--- old/src/libscotch/parser_ll.l	2008-05-22 06:44:43.000000000 -0700
+***************
+*** 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
-+ 
+- /*  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 */
-diff -rc src/src/libscotch/parser_yy.y new4/src/libscotch/parser_yy.y
-*** src/src/libscotch/parser_yy.y	2008-10-22 15:12:48.000000000 -0700
---- new4/src/libscotch/parser_yy.y	2010-05-03 15:37:55.418090107 -0700
-***************
-*** 774,779 ****
---- 774,780 ----
+--- 192,197 ----
+diff -rc src/src/libscotch/parser_yy.y old/src/libscotch/parser_yy.y
+*** src/src/libscotch/parser_yy.y	2010-07-19 10:53:22.997732420 -0700
+--- old/src/libscotch/parser_yy.y	2008-10-22 15:12:48.000000000 -0700
+***************
+*** 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)    */
+-   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 new4/src/libscotch/vgraph_separate_vw.c
-*** src/src/libscotch/vgraph_separate_vw.c	2008-05-22 06:44:43.000000000 -0700
---- new4/src/libscotch/vgraph_separate_vw.c	2010-05-03 15:37:55.425090113 -0700
-***************
-*** 83,88 ****
---- 83,89 ----
+--- 774,779 ----
+diff -rc src/src/libscotch/vgraph_separate_vw.c old/src/libscotch/vgraph_separate_vw.c
+*** src/src/libscotch/vgraph_separate_vw.c	2010-07-19 10:53:22.999732432 -0700
+--- old/src/libscotch/vgraph_separate_vw.c	2008-05-22 06:44:43.000000000 -0700
+***************
+*** 83,89 ****
     FILE * restrict     fileptr;
     Gnum                vertnum;                    /* Vertex number */
   
-+   printf("vgraphSeparateVw begin -- vgraphseparatevwfilenum=%d\n",vgraphseparatevwfilenum);
+-   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 ----
+--- 83,88 ----
+***************
+*** 103,108 ****
       }
     }
   
-+   printf("vgraphSeparateVw end   -- vgraphseparatevwfilenum=%d\n",vgraphseparatevwfilenum);
+-   printf("vgraphSeparateVw end   -- vgraphseparatevwfilenum=%d\n",vgraphseparatevwfilenum);
     return (0);
   }
-diff -rc src/src/Makefile new4/src/Makefile
-*** src/src/Makefile	2008-09-15 05:50:51.000000000 -0700
---- new4/src/Makefile	2010-06-17 09:31:54.881418932 -0700
-***************
-*** 97,102 ****
---- 97,106 ----
+--- 102,106 ----
+diff -rc src/src/Makefile old/src/Makefile
+*** src/src/Makefile	2010-07-19 10:53:23.001732445 -0700
+--- old/src/Makefile	2008-09-15 05:50:51.000000000 -0700
+***************
+*** 97,106 ****
   					(cd scotch ;         $(MAKE) VERSION=\"$(VERSION)\" ptscotch && $(MAKE) ptinstall)
   					(cd libscotchmetis ; $(MAKE)                        ptscotch && $(MAKE) ptinstall)
   
-+ mexscotch			:	required
-+ 					(cd libscotch ;      $(MAKE) VERSION=\"$(VERSION)\" mexscotch && $(MAKE) mexinstall)
-+ 					(cd scotch ;         $(MAKE) VERSION=\"$(VERSION)\" mexscotch && $(MAKE) mexinstall)
-+ 
+- mexscotch			:	required
+- 					(cd libscotch ;      $(MAKE) VERSION=\"$(VERSION)\" mexscotch && $(MAKE) mexinstall)
+- 					(cd scotch ;         $(MAKE) VERSION=\"$(VERSION)\" mexscotch && $(MAKE) mexinstall)
+- 
   install				:	required	$(bindir)	$(includedir)	$(libdir)	$(mandir)/man1
   					-$(CP) -f ../bin/[agm]*$(EXE) $(bindir)
   					-$(CP) -f ../include/*scotch*.h $(includedir)
-Only in new4/src: Makefile.inc
-Only in new4/src/scotch: gmap_mex.c
-Only in new4/src/scotch: gmapx.c
-diff -rc src/src/scotch/Makefile new4/src/scotch/Makefile
-*** src/src/scotch/Makefile	2009-04-27 02:19:43.000000000 -0700
---- new4/src/scotch/Makefile	2010-06-17 10:09:39.718475100 -0700
-***************
-*** 49,59 ****
+--- 97,102 ----
+Only in src/src: Makefile.inc
+Only in src/src/scotch: gmap_mex.c
+Only in src/src/scotch: gmapx.c
+diff -rc src/src/scotch/Makefile old/src/scotch/Makefile
+*** src/src/scotch/Makefile	2010-07-19 10:53:23.004732465 -0700
+--- old/src/scotch/Makefile	2009-04-27 02:19:43.000000000 -0700
+***************
+*** 49,62 ****
   %$(EXE)	:	%.c
   		 		$(CC) $(CFLAGS) -I$(includedir) -I../libscotch -DSCOTCH_VERSION=\"$(VERSION)\" $(<) -o $(@) -L$(libdir) -l$(SCOTCHLIB) -l$(SCOTCHLIB)errexit $(LDFLAGS)
   
+- %$(MEX)	:	%.c
+- 		 		$(CCM) $(MFLAGS) -I$(includedir) -I../libscotch -DSCOTCH_VERSION=\"$(VERSION)\" $(<) -o $(@) -L$(libdir) -l$(SCOTCHLIB) -l$(SCOTCHLIB)errexit $(LDFLAGS)
+- 
   ##
   ##  Project rules.
   ##
   
-! .PHONY				:	ptscotch	scotch	ptinstall	install	clean	realclean
+! .PHONY				:	ptscotch	scotch	mexscotch	ptinstall	install	mexinstall	clean	realclean
   
   scotch				:	clean
   					$(MAKE) CC="$(CCS)" SCOTCHLIB=scotch	\
---- 49,62 ----
+--- 49,59 ----
   %$(EXE)	:	%.c
   		 		$(CC) $(CFLAGS) -I$(includedir) -I../libscotch -DSCOTCH_VERSION=\"$(VERSION)\" $(<) -o $(@) -L$(libdir) -l$(SCOTCHLIB) -l$(SCOTCHLIB)errexit $(LDFLAGS)
   
-+ %$(MEX)	:	%.c
-+ 		 		$(CCM) $(MFLAGS) -I$(includedir) -I../libscotch -DSCOTCH_VERSION=\"$(VERSION)\" $(<) -o $(@) -L$(libdir) -l$(SCOTCHLIB) -l$(SCOTCHLIB)errexit $(LDFLAGS)
-+ 
   ##
   ##  Project rules.
   ##
   
-! .PHONY				:	ptscotch	scotch	mexscotch	ptinstall	install	mexinstall	clean	realclean
+! .PHONY				:	ptscotch	scotch	ptinstall	install	clean	realclean
   
   scotch				:	clean
   					$(MAKE) CC="$(CCS)" SCOTCHLIB=scotch	\
 ***************
-*** 94,99 ****
---- 97,108 ----
+*** 97,108 ****
   					dgscat$(EXE)				\
   					dgtst$(EXE)
   
-+ mexscotch			:	clean
-+ 					$(MAKE) CFLAGS="$(CFLAGS) -DMATLAB -I${MATLAB_DIR}/extern/include" CC="$(CCS)" CCD="$(CCS)" LDFLAGS="$(LDFLAGS) -Wl,-rpath-link,${MATLAB_DIR}/bin/glnxa64 -L${MATLAB_DIR}/bin/glnxa64 -lmex -lmat" SCOTCHLIB=scotch \
-+                     gmapx$(OBJ)
-+ 					$(MAKE) CFLAGS="$(CFLAGS) -DMATLAB -I${MATLAB_DIR}/extern/include" CC="$(CCS)" LDFLAGS="$(LDFLAGS) -Wl,-rpath-link,${MATLAB_DIR}/bin/glnxa64 -L${MATLAB_DIR}/bin/glnxa64 -lmex -lmat gmapx$(OBJ)" SCOTCHLIB=scotch	\
-+ 					gmap_mex$(MEX)
-+ 
+- mexscotch			:	clean
+- 					$(MAKE) CFLAGS="$(CFLAGS) -DMATLAB -I${MATLAB_DIR}/extern/include" CC="$(CCS)" CCD="$(CCS)" LDFLAGS="$(LDFLAGS) -Wl,-rpath-link,${MATLAB_DIR}/bin/glnxa64 -L${MATLAB_DIR}/bin/glnxa64 -lmex -lmat" SCOTCHLIB=scotch \
+-                     gmapx$(OBJ)
+- 					$(MAKE) CFLAGS="$(CFLAGS) -DMATLAB -I${MATLAB_DIR}/extern/include" CC="$(CCS)" LDFLAGS="$(LDFLAGS) -Wl,-rpath-link,${MATLAB_DIR}/bin/glnxa64 -L${MATLAB_DIR}/bin/glnxa64 -lmex -lmat gmapx$(OBJ)" SCOTCHLIB=scotch	\
+- 					gmap_mex$(MEX)
+- 
   install				:
   					-$(CP) acpl$(EXE) amk_ccc$(EXE) amk_fft2$(EXE) amk_grf$(EXE) amk_hy$(EXE) amk_m2$(EXE) amk_p2$(EXE) atst$(EXE) gbase$(EXE) gcv$(EXE) gmap$(EXE) gmk_hy$(EXE) gmk_m2$(EXE) gmk_m3$(EXE) gmk_msh$(EXE) gmk_ub2$(EXE) gmtst$(EXE) gord$(EXE) gotst$(EXE) gout$(EXE) *gtst$(EXE) gscat$(EXE) mcv$(EXE) mmk_m2$(EXE) mmk_m3$(EXE) mord$(EXE) mtst$(EXE) $(bindir)
   					-$(RM) $(bindir)/gpart$(EXE)
-***************
-*** 104,111 ****
---- 113,126 ----
+--- 94,99 ----
+***************
+*** 113,126 ****
   					-$(RM) $(bindir)/dgpart$(EXE)
   					-$(LN) $(bindir)/dgmap$(EXE) $(bindir)/dgpart$(EXE)
   
-+ mexinstall			:
-+ 					-$(CP) gmap_mex$(MEX) $(bindir)
-+ 					-$(RM) $(bindir)/gpart_mex$(MEX)
-+ 					-$(LN) $(bindir)/gmap_mex$(MEX) $(bindir)/gpart_mex$(MEX)
-+ 
+- mexinstall			:
+- 					-$(CP) gmap_mex$(MEX) $(bindir)
+- 					-$(RM) $(bindir)/gpart_mex$(MEX)
+- 					-$(LN) $(bindir)/gmap_mex$(MEX) $(bindir)/gpart_mex$(MEX)
+- 
   clean				:
   					-$(RM) *~ *$(OBJ) acpl$(EXE) amk_ccc$(EXE) amk_fft2$(EXE) amk_grf$(EXE) amk_hy$(EXE) amk_m2$(EXE) amk_p2$(EXE) atst$(EXE) gbase$(EXE) gcv$(EXE) *gmap$(EXE) gmk_hy$(EXE) gmk_m2$(EXE) gmk_m3$(EXE) gmk_msh$(EXE) gmk_ub2$(EXE) gmtst$(EXE) *gord$(EXE) gotst$(EXE) gout$(EXE) *gpart$(EXE) *gscat$(EXE) *gtst$(EXE) mcv$(EXE) mmk_m2$(EXE) mmk_m3$(EXE) mord$(EXE) mtst$(EXE)
-+ 					-$(RM) gmap_mex$(MEX)
+- 					-$(RM) gmap_mex$(MEX)
   
   realclean			:	clean
   
-***************
-*** 365,367 ****
---- 380,403 ----
+--- 104,111 ----
+***************
+*** 380,403 ****
   					$(libdir)/libscotch$(LIB)		\
   					$(libdir)/libscotcherrexit$(LIB)	\
   					mtst.h
-+ 
-+ gmapx$(OBJ)			:	gmapx.c					\
-+ 					../libscotch/module.h			\
-+ 					../libscotch/common.h			\
-+ 					$(includedir)/scotch.h			\
-+ 					$(libdir)/libscotch$(LIB)		\
-+ 					$(libdir)/libscotcherrexit$(LIB)	\
-+ 					gmap.h
-+ 
-+ gmap_mex$(MEX)		:	gmap_mex.c					\
-+ 					../libscotch/module.h			\
-+ 					../libscotch/common.h			\
-+ 					$(includedir)/scotch.h			\
-+ 					$(libdir)/libscotch$(LIB)		\
-+ 					$(libdir)/libscotcherrexit$(LIB)	\
-+ 					gmap.h
-+ 
-+ gpart_mex$(MEX)			:	gmap_mex$(MEX)
-+ 					-$(RM) gpart_mex$(MEX)
-+ 					-$(LN) gmap_mex$(MEX) gpart_mex$(MEX)
-+ 
+- 
+- gmapx$(OBJ)			:	gmapx.c					\
+- 					../libscotch/module.h			\
+- 					../libscotch/common.h			\
+- 					$(includedir)/scotch.h			\
+- 					$(libdir)/libscotch$(LIB)		\
+- 					$(libdir)/libscotcherrexit$(LIB)	\
+- 					gmap.h
+- 
+- gmap_mex$(MEX)		:	gmap_mex.c					\
+- 					../libscotch/module.h			\
+- 					../libscotch/common.h			\
+- 					$(includedir)/scotch.h			\
+- 					$(libdir)/libscotch$(LIB)		\
+- 					$(libdir)/libscotcherrexit$(LIB)	\
+- 					gmap.h
+- 
+- gpart_mex$(MEX)			:	gmap_mex$(MEX)
+- 					-$(RM) gpart_mex$(MEX)
+- 					-$(LN) gmap_mex$(MEX) gpart_mex$(MEX)
+- 
+--- 365,367 ----
