Index: /issm/trunk/externalpackages/scotch/gmap.m
===================================================================
--- /issm/trunk/externalpackages/scotch/gmap.m	(revision 3647)
+++ /issm/trunk/externalpackages/scotch/gmap.m	(revision 3648)
@@ -2,6 +2,6 @@
 %  function to call the gmap module of the scotch partitioner.
 %
-%  [status,maptab]=gmap(adj_mat,vlist,vwgt,ewgt,atype,apar,...
-%                       options)
+%  [maptab]=gmap(adj_mat,vlist,vwgt,ewgt,atype,apar,...
+%                options)
 %
 %  where the required input is:
@@ -30,5 +30,4 @@
 %
 %  the required output is:
-%    status     (double, return code from gmap)
 %    maptab     (double [nv x 2], vertex labels and partitions)
 %
@@ -48,6 +47,6 @@
 %               "See default strategy with option '-vs'"
 %
-function [status,maptab]=gmap(adj_mat,vlist,vwgt,ewgt,atype,apars,...
-                              varargin)
+function [maptab]=gmap(adj_mat,vlist,vwgt,ewgt,atype,apars,...
+                       varargin)
 
 if ~nargin
@@ -59,7 +58,8 @@
 clear gmap_mex
 
-[status,maptab]=gmap_mex(adj_mat,vlist,vwgt,ewgt,atype,apars,...
-                         varargin{:});
+[maptab]=gmap_mex(adj_mat,vlist,vwgt,ewgt,atype,apars,...
+                  varargin{:});
 
+%  doesn't hurt to clear out after every run, too
 clear gmap_mex
 
Index: /issm/trunk/externalpackages/scotch/gmap_mex.c
===================================================================
--- /issm/trunk/externalpackages/scotch/gmap_mex.c	(revision 3647)
+++ /issm/trunk/externalpackages/scotch/gmap_mex.c	(revision 3648)
@@ -33,6 +33,5 @@
 /* Output Arguments */
 
-#define RETURN_OUT plhs[0]
-#define MAPTAB_OUT plhs[1]
+#define MAPTAB_OUT plhs[0]
 
 
@@ -82,5 +81,5 @@
 		return;
 	}
-	else if (nrhs <  6 || nlhs >  2) {
+	else if (nrhs <  6 || nlhs >  1) {
 		GmapUsage();
 		mexErrMsgTxt(" ");
@@ -237,4 +236,7 @@
 		free(maptabi);
 	}
+	else {
+		MAPTAB_OUT=mxCreateDoubleMatrix(0, 2, mxREAL);
+	}
 
 	if (argvm)
@@ -249,7 +251,4 @@
 	if (adjir)   free(adjir);
 
-	RETURN_OUT=mxCreateDoubleMatrix(1, 1, mxREAL);
-	*mxGetPr(RETURN_OUT)=ierr;
-
 	return;
 }
@@ -259,6 +258,6 @@
 
     mexPrintf("\n");
-    mexPrintf("Usage: [return,maptab]=Gmap_mex(adjmat,vertlb,vertwt,edgewt,archtyp,archpar,\n");
-    mexPrintf("                                Scotch-specific parameters);\n");
+    mexPrintf("Usage: [maptab]=Gmap_mex(adjmat,vertlb,vertwt,edgewt,archtyp,archpar,\n");
+    mexPrintf("                         Scotch-specific parameters);\n");
     mexPrintf("\n");
 
