Index: /issm/trunk/src/m/solutions/ice/BuildGridSets.m
===================================================================
--- /issm/trunk/src/m/solutions/ice/BuildGridSets.m	(revision 1622)
+++ /issm/trunk/src/m/solutions/ice/BuildGridSets.m	(revision 1623)
@@ -15,5 +15,4 @@
 %      BuildGridSets(grids,constraints)
 
-global cluster
 global gridset
 
@@ -56,39 +55,11 @@
 	if isempty(grid),continue;end;
 
-	if ~cluster,
-		%if dof 1 is spc'ed, put it in the sset, otherwise, in the fset
-		if ~isempty(findstr(grid.gridset,'1')), sset(grid.doflist(1))=1; else fset(grid.doflist(1))=1; end
-		if ~isempty(findstr(grid.gridset,'2')), sset(grid.doflist(2))=1; else fset(grid.doflist(2))=1; end
-		if ~isempty(findstr(grid.gridset,'3')), sset(grid.doflist(3))=1; else fset(grid.doflist(3))=1; end
-		if ~isempty(findstr(grid.gridset,'4')), sset(grid.doflist(4))=1; else fset(grid.doflist(4))=1; end
-		if ~isempty(findstr(grid.gridset,'5')), sset(grid.doflist(5))=1; else fset(grid.doflist(5))=1; end
-		if ~isempty(findstr(grid.gridset,'6')), sset(grid.doflist(6))=1; else fset(grid.doflist(6))=1; end
-	else
-		%same thing, except that if the grid is a border grid, we only carry out the inclusion on lab 1
-		if grid.border==1,
-			if labindex==1,
-				if ~isempty(findstr(grid.gridset,'1')), sset(grid.doflist(1))=1; else fset(grid.doflist(1))=1; end
-				if ~isempty(findstr(grid.gridset,'2')), sset(grid.doflist(2))=1; else fset(grid.doflist(2))=1; end
-				if ~isempty(findstr(grid.gridset,'3')), sset(grid.doflist(3))=1; else fset(grid.doflist(3))=1; end
-				if ~isempty(findstr(grid.gridset,'4')), sset(grid.doflist(4))=1; else fset(grid.doflist(4))=1; end
-				if ~isempty(findstr(grid.gridset,'5')), sset(grid.doflist(5))=1; else fset(grid.doflist(5))=1; end
-				if ~isempty(findstr(grid.gridset,'6')), sset(grid.doflist(6))=1; else fset(grid.doflist(6))=1; end
-			end
-		else
-			if ~isempty(findstr(grid.gridset,'1')), sset(grid.doflist(1))=1; else fset(grid.doflist(1))=1; end
-			if ~isempty(findstr(grid.gridset,'2')), sset(grid.doflist(2))=1; else fset(grid.doflist(2))=1; end
-			if ~isempty(findstr(grid.gridset,'3')), sset(grid.doflist(3))=1; else fset(grid.doflist(3))=1; end
-			if ~isempty(findstr(grid.gridset,'4')), sset(grid.doflist(4))=1; else fset(grid.doflist(4))=1; end
-			if ~isempty(findstr(grid.gridset,'5')), sset(grid.doflist(5))=1; else fset(grid.doflist(5))=1; end
-			if ~isempty(findstr(grid.gridset,'6')), sset(grid.doflist(6))=1; else fset(grid.doflist(6))=1; end
-		end
-	end
-end
-
-
-if cluster,
-	error('Not cool, broke it!');
-	sset=gplus(sset);
-	fset=gplus(fset);
+	%if dof 1 is spc'ed, put it in the sset, otherwise, in the fset
+	if ~isempty(findstr(grid.gridset,'1')), sset(grid.doflist(1))=1; else fset(grid.doflist(1))=1; end
+	if ~isempty(findstr(grid.gridset,'2')), sset(grid.doflist(2))=1; else fset(grid.doflist(2))=1; end
+	if ~isempty(findstr(grid.gridset,'3')), sset(grid.doflist(3))=1; else fset(grid.doflist(3))=1; end
+	if ~isempty(findstr(grid.gridset,'4')), sset(grid.doflist(4))=1; else fset(grid.doflist(4))=1; end
+	if ~isempty(findstr(grid.gridset,'5')), sset(grid.doflist(5))=1; else fset(grid.doflist(5))=1; end
+	if ~isempty(findstr(grid.gridset,'6')), sset(grid.doflist(6))=1; else fset(grid.doflist(6))=1; end
 end
 
Index: /issm/trunk/src/m/solutions/ice/DeviatoricStressCompute.m
===================================================================
--- /issm/trunk/src/m/solutions/ice/DeviatoricStressCompute.m	(revision 1622)
+++ /issm/trunk/src/m/solutions/ice/DeviatoricStressCompute.m	(revision 1623)
@@ -6,5 +6,5 @@
 
 %global variables
-global cluster gridset
+global gridset
 
 %recover fem model fields
Index: /issm/trunk/src/m/solutions/ice/Dof.m
===================================================================
--- /issm/trunk/src/m/solutions/ice/Dof.m	(revision 1622)
+++ /issm/trunk/src/m/solutions/ice/Dof.m	(revision 1623)
@@ -12,49 +12,9 @@
 %      grids=Dof(grids)
 
-global cluster
-
 dofcount=length(grids)*6;
 
-if ~cluster,
-	dof=1;
-	for i=1:length(grids),
-		grids(i).grid.doflist=dof:1:(dof+5);
-		dof=dof+6;
-	end
-else
-	borderdof=1;
-	dof=1;
-	for i=1:length(grids),
-		if ~isempty(grids(i).grid),
-			if ~grids(i).grid.border,
-				grids(i).grid.doflist=dof:1:(dof+5);
-				dof=dof+6;
-			else
-				grids(i).grid.doflist=borderdof:1:(borderdof+5);
-				borderdof=borderdof+6;
-			end
-		end
-	end
-	localdofcount=dof-1;
-	localborderdofcount=borderdof-1;
-
-	%Now, offset the border dofs so that they are lumped at the end of the dof list.
-	for i=1:length(grids),
-		if (~isempty(grids(i).grid) & grids(i).grid.border),
-			grids(i).grid.doflist=grids(i).grid.doflist+dofcount-localborderdofcount;
-		end
-	end
-
-	%Now, update the regular local grid dofs to account for other cpu grids.
-	alldofcounts=gcat(localdofcount); %this array holds the dof count for all cpus.
-	
-	%Determine offset for all grid dofs
-	dofoffset=sum(alldofcounts(1:labindex-1));
-	
-	%offset all grid dofs.
-	for i=1:length(grids),
-		if (~isempty(grids(i).grid) & ~grids(i).grid.border),
-			grids(i).grid.doflist=grids(i).grid.doflist+dofoffset;
-		end
-	end
+dof=1;
+for i=1:length(grids),
+	grids(i).grid.doflist=dof:1:(dof+5);
+	dof=dof+6;
 end
Index: /issm/trunk/src/m/solutions/ice/ModelProcessor.m
===================================================================
--- /issm/trunk/src/m/solutions/ice/ModelProcessor.m	(revision 1622)
+++ /issm/trunk/src/m/solutions/ice/ModelProcessor.m	(revision 1623)
@@ -11,5 +11,4 @@
 %      [elements,grids,loads,constraints,materials,part,tpart]=ModelProcessor(md,solutiontype)
 
-global cluster
 if strcmpi(solutiontype,'diagnostic_horiz'),
 	[elements,grids,loads,constraints,materials,part,tpart]=ModelProcessorDiagnosticHoriz(md);
Index: /issm/trunk/src/m/solutions/ice/ModelProcessorDiagnosticHoriz.m
===================================================================
--- /issm/trunk/src/m/solutions/ice/ModelProcessorDiagnosticHoriz.m	(revision 1622)
+++ /issm/trunk/src/m/solutions/ice/ModelProcessorDiagnosticHoriz.m	(revision 1623)
@@ -11,15 +11,4 @@
 %      [elements,grids,loads,constraints,materials,part,tpart]=ModelProcessorDiagnosticHoriz(md)
 
-global cluster
-
-if cluster,
-	%We are running in parallel, we need to partition the elements 
-	element_partitioning=MeshPartition(md,numlabs);
-else
-	%We are running in serial, all elements belong to the same partition.
-	element_partitioning=ones(md.numberofelements,1);
-	labindex=1; %older versions of matlab do not include the parallel toolbox labindex variable.
-end
-
 %Allocate grids and elements
 if strcmpi(md.type,'2d'),
@@ -30,9 +19,8 @@
 elements=struct('element',cell(numberofelements_horiz,1));
 materials=struct('material',cell(numberofelements_horiz+1,1));
-mygrids=zeros(md.numberofgrids,1); %this array determines grid partitioning.
 
 %Deal with 2d elements
 if strcmpi(md.type,'2d'),
-	el3pos=find((md.elements_type(:,1)==MacAyealEnum()) & (element_partitioning==labindex));
+	el3pos=find(md.elements_type(:,1)==MacAyealEnum);
 	if ~isempty(el3pos),
 		pos=[1:length(el3pos)]';
@@ -66,5 +54,5 @@
 	%3d elements
 	%First create penta elements (ie non hutter)
-	el6pos=find((md.elements_type(:,1)==MacAyealEnum() | md.elements_type(:,1)==PattynEnum()) & (element_partitioning==labindex));
+	el6pos=find(md.elements_type(:,1)==MacAyealEnum | md.elements_type(:,1)==PattynEnum);
 
 	if ~isempty(el6pos),
@@ -120,18 +108,4 @@
 materials(end)=SetStructureField(materials(end),'constants','thermal_exchange_velocity',md.thermal_exchange_velocity);
 
-if cluster, 
-	%For elements, the corresponding grids belong to this cpu. Keep track of it. 
-	mygrids(md.elements(el3pos,:))=1;
-	mygrids(md.elements(el6pos,:))=1;
-end
-
-if cluster, 
-	%Figure out which grids from the partitioning belong to different element partitions. We'll 
-	%call them 'border' grids.
-	bordergrids=double(gplus(mygrids)>1);
-else
-	bordergrids=zeros(md.numberofgrids,1); %no partitioning serially.
-end
-
 %Get the grids set up:
 grids=struct('grid',cell(md.numberofgrids,1));
@@ -145,5 +119,4 @@
 grids(pos)=SetStructureField(grids(pos),'grid','s',(md.z(pos)-md.bed(pos))./md.thickness(pos));
 grids(pos)=SetStructureField(grids(pos),'grid','onbed',md.gridonbed(pos));
-grids(pos)=SetStructureField(grids(pos),'grid','border',bordergrids(pos));
 
 %spc degrees of freedom:
@@ -190,8 +163,4 @@
 for i=1:size(md.segmentonneumann_diag,1),
 
-	if (element_partitioning(md.segmentonneumann_diag(i,end))~=labindex), %this load does not belong to this cpu element partition.
-		continue;
-	end
-
 	if strcmpi(md.type,'3d'),
 		if md.elements_type(md.segmentonneumann_diag(i,end))==MacAyealEnum(),
Index: /issm/trunk/src/m/solutions/ice/ModelProcessorDiagnosticHutter.m
===================================================================
--- /issm/trunk/src/m/solutions/ice/ModelProcessorDiagnosticHutter.m	(revision 1622)
+++ /issm/trunk/src/m/solutions/ice/ModelProcessorDiagnosticHutter.m	(revision 1623)
@@ -11,15 +11,4 @@
 %      [elements,grids,loads,constraints,materials,part,tpart]=ModelProcessorDiagnosticHutter(md);
 
-global cluster
-
-if cluster,
-	%We are running in parallel, we need to partition the elements 
-	element_partitioning=MeshPartition(md,numlabs);
-else
-	%We are running in serial, all elements belong to the same partition.
-	element_partitioning=ones(md.numberofelements,1);
-	labindex=1; %older versions of matlab do not include the parallel toolbox labindex variable.
-end
-
 %Allocate grids and elements
 if strcmpi(md.type,'2d'),
@@ -29,5 +18,4 @@
 	elements=struct('element',cell(length(pos),1));
 	materials=struct('material',cell(length(pos)+1,1));
-	mygrids=zeros(md.numberofgrids,1); %this array determines grid partitioning.
 	[elements(count).element]=deal(singelem);
 
@@ -51,5 +39,4 @@
 	elements=struct('element',cell(length(pos),1));
 	materials=struct('material',cell(length(pos)+1,1));
-	mygrids=zeros(md.numberofgrids,1); %this array determines grid partitioning.
 	[elements(count).element]=deal(beamelem);
 
@@ -79,18 +66,4 @@
 materials(end)=SetStructureField(materials(end),'constants','meltingpoint',md.meltingpoint);
 
-if cluster, 
-	%For elements, the corresponding grids belong to this cpu. Keep track of it. 
-	mygrids(md.elements(el3pos,:))=1;
-	mygrids(md.elements(el6pos,:))=1;
-end
-
-if cluster, 
-	%Figure out which grids from the partitioning belong to different element partitions. We'll 
-	%call them 'border' grids.
-	bordergrids=double(gplus(mygrids)>1);
-else
-	bordergrids=zeros(md.numberofgrids,1); %no partitioning serially.
-end
-
 %Get the grids set up:
 grids=struct('grid',cell(md.numberofgrids,1));
@@ -104,5 +77,4 @@
 grids(pos)=SetStructureField(grids(pos),'grid','s',(md.z(pos)-md.bed(pos))./md.thickness(pos));
 grids(pos)=SetStructureField(grids(pos),'grid','onbed',md.gridonbed(pos));
-grids(pos)=SetStructureField(grids(pos),'grid','border',bordergrids(pos));
 
 %spc degrees of freedom:
Index: /issm/trunk/src/m/solutions/ice/ModelProcessorDiagnosticStokes.m
===================================================================
--- /issm/trunk/src/m/solutions/ice/ModelProcessorDiagnosticStokes.m	(revision 1622)
+++ /issm/trunk/src/m/solutions/ice/ModelProcessorDiagnosticStokes.m	(revision 1623)
@@ -11,24 +11,11 @@
 %      [elements,grids,loads,constraints,materials,part,tpart]=ModelProcessorDiagnosticHoriz(md)
 
-global cluster
-
-if cluster,
-	%We are running in parallel, we need to partition the elements 
-	element_partitioning=MeshPartition(md,numlabs);
-else
-	%We are running in serial, all elements belong to the same partition.
-	element_partitioning=ones(md.numberofelements,1);
-	labindex=1; %older versions of matlab do not include the parallel toolbox labindex variable.
-end
-
 %Allocate grids and elements
 numberofstokeselements=size(find(md.elements_type(:,2)==StokesEnum()),1);
 elements=struct('element',cell(numberofstokeselements,1));
 materials=struct('material',cell(numberofstokeselements+1,1));
-mygrids=zeros(md.numberofgrids,1); %this array determines grid partitioning.
 
 %3d elements
-%pos=find(element_partitioning==labindex);
-pos=find(md.elements_type(:,2)==StokesEnum());
+pos=find(md.elements_type(:,2)==StokesEnum);
 stokesnewnumber=[1:numberofstokeselements]';
 [elements(stokesnewnumber).element]=deal(pentaelem);
@@ -75,17 +62,4 @@
 
 
-if cluster, 
-	%For elements, the corresponding grids belong to this cpu. Keep track of it. 
-	mygrids(md.elements(pos,:))=1;
-end
-
-if cluster, 
-	%Figure out which grids from the partitioning belong to different element partitions. We'll 
-	%call them 'border' grids.
-	bordergrids=double(gplus(mygrids)>1);
-else
-	bordergrids=zeros(md.numberofgrids,1); %no partitioning serially.
-end
-
 %Get the grids set up:
 grids=struct('grid',cell(md.numberofgrids,1));
@@ -99,5 +73,4 @@
 grids(pos)=SetStructureField(grids(pos),'grid','s',(md.z(pos)-md.bed(pos))./md.thickness(pos));
 grids(pos)=SetStructureField(grids(pos),'grid','onbed',md.gridonbed(pos));
-grids(pos)=SetStructureField(grids(pos),'grid','border',bordergrids(pos));
 
 %spc degrees of freedom:
@@ -140,8 +113,4 @@
 for i=1:length_segmentonneumann_diag_stokes,
 
-	if (element_partitioning(segmentonneumann_diag_stokes(i,end))~=labindex), %this load does not belong to this cpu element partition.
-		continue;
-	end
-	
 	%build a quad ice front for the penta element
 	loads(i).load=icefront;
Index: /issm/trunk/src/m/solutions/ice/ModelProcessorDiagnosticVert.m
===================================================================
--- /issm/trunk/src/m/solutions/ice/ModelProcessorDiagnosticVert.m	(revision 1622)
+++ /issm/trunk/src/m/solutions/ice/ModelProcessorDiagnosticVert.m	(revision 1623)
@@ -11,22 +11,10 @@
 %      [elements,grids,loads,constraints,materials,part,tpart]=ModelProcessorDiagnosticVert(md);
 
-global cluster
-
-if cluster,
-	%We are running in parallel, we need to partition the elements 
-	element_partitioning=MeshPartition(md,numlabs);
-else
-	%We are running in serial, all elements belong to the same partition.
-	element_partitioning=ones(md.numberofelements,1);
-	labindex=1; %older versions of matlab do not include the parallel toolbox labindex variable.
-end
-
 %Allocate grids and elements
 elements=struct('element',cell(md.numberofelements,1));
 materials=struct('material',cell(md.numberofelements+1,1));
-mygrids=zeros(md.numberofgrids,1); %this array determines grid partitioning.
 
 %3d elements
-pos=find(element_partitioning==labindex);
+pos=[1:md.numberofelements]';
 [elements(pos).element]=deal(pentaelem);
 
@@ -72,12 +60,4 @@
 materials(end)=SetStructureField(materials(end),'constants','thermal_exchange_velocity',md.thermal_exchange_velocity);
 
-if cluster, 
-	%Figure out which grids from the partitioning belong to different element partitions. We'll 
-	%call them 'border' grids.
-	bordergrids=double(gplus(mygrids)>1);
-else
-	bordergrids=zeros(md.numberofgrids,1); %no partitioning serially.
-end
-
 %Get the grids set up:
 grids=struct('grid',cell(md.numberofgrids,1));
@@ -92,5 +72,4 @@
 grids(pos)=SetStructureField(grids(pos),'grid','surface',md.surface(pos));
 grids(pos)=SetStructureField(grids(pos),'grid','onbed',md.gridonbed(pos));
-grids(pos)=SetStructureField(grids(pos),'grid','border',bordergrids(pos));
 
 %spc degrees of freedom:
Index: /issm/trunk/src/m/solutions/ice/ModelProcessorMelting.m
===================================================================
--- /issm/trunk/src/m/solutions/ice/ModelProcessorMelting.m	(revision 1622)
+++ /issm/trunk/src/m/solutions/ice/ModelProcessorMelting.m	(revision 1623)
@@ -11,19 +11,7 @@
 %      [elements,grids,loads,constraints,materials,part,tpart]=ModelProcessorMelting(md,solutiontype)
 
-global cluster
-
-if cluster,
-	%We are running in parallel, we need to partition the elements 
-	element_partitioning=MeshPartition(md,numlabs);
-else
-	%We are running in serial, all elements belong to the same partition.
-	element_partitioning=ones(md.numberofelements,1);
-	labindex=1; %older versions of matlab do not include the parallel toolbox labindex variable.
-end
-
 %Allocate grids and elements
 elements=struct('element',cell(md.numberofelements,1));
 materials=struct('material',cell(md.numberofelements+1,1));
-mygrids=zeros(md.numberofgrids,1); %this array determines grid partitioning.
 
 %Build elements
@@ -32,5 +20,5 @@
 end
 
-pos=find(element_partitioning==labindex);
+pos=[1:md.numberofelements]';
 [elements(pos).element]=deal(pentaelem);
 
@@ -65,16 +53,4 @@
 materials(end)=SetStructureField(materials(end),'constants','thermal_exchange_velocity',md.thermal_exchange_velocity);
 
-if cluster, 
-	%For elements, the corresponding grids belong to this cpu. Keep track of it. 
-	mygrids(md.elements(el3pos,:))=1;
-	mygrids(md.elements(el6pos,:))=1;
-	
-	%Figure out which grids from the partitioning belong to different element partitions. We'll 
-	%call them 'border' grids.
-	bordergrids=double(gplus(mygrids)>1);
-else
-	bordergrids=zeros(md.numberofgrids,1); %no partitioning serially.
-end
-
 %Get the grids set up:
 grids=struct('grid',cell(md.numberofgrids,1));
@@ -89,5 +65,4 @@
 grids(pos)=SetStructureField(grids(pos),'grid','surface',md.surface(pos));
 grids(pos)=SetStructureField(grids(pos),'grid','onbed',md.gridonbed(pos));
-grids(pos)=SetStructureField(grids(pos),'grid','border',bordergrids(pos));
 
 %spc degrees of freedom:
Index: /issm/trunk/src/m/solutions/ice/ModelProcessorPrognostic.m
===================================================================
--- /issm/trunk/src/m/solutions/ice/ModelProcessorPrognostic.m	(revision 1622)
+++ /issm/trunk/src/m/solutions/ice/ModelProcessorPrognostic.m	(revision 1623)
@@ -11,23 +11,11 @@
 %      [elements,grids,loads,constraints,materials,part,tpart]=ModelProcessorPrognostic(md)
 
-global cluster
-
-if cluster,
-	%We are running in parallel, we need to partition the elements 
-	element_partitioning=MeshPartition(md,numlabs);
-else
-	%We are running in serial, all elements belong to the same partition.
-	element_partitioning=ones(md.numberofelements,1);
-	labindex=1; %older versions of matlab do not include the parallel toolbox labindex variable.
-end
-
 %Allocate grids and elements
 elements=struct('element',cell(md.numberofelements,1));
 materials=struct('material',cell(0,0));
-mygrids=zeros(md.numberofgrids,1); %this array determines grid partitioning.
 
 %Build elements
 if strcmpi(md.type,'2d'),
-	pos=find(element_partitioning==labindex);
+	pos=[1:md.numberofelements]';
 	[elements(pos).element]=deal(triaelem);
 
@@ -42,5 +30,5 @@
 
 else
-	pos=find(element_partitioning==labindex);
+	pos=[1:md.numberofelements]';
 	[elements(pos).element]=deal(pentaelem);
 
@@ -58,16 +46,4 @@
 end
 
-if cluster, 
-	%For elements, the corresponding grids belong to this cpu. Keep track of it. 
-	mygrids(md.elements(el3pos,:))=1;
-	mygrids(md.elements(el6pos,:))=1;
-	
-	%Figure out which grids from the partitioning belong to different element partitions. We'll 
-	%call them 'border' grids.
-	bordergrids=double(gplus(mygrids)>1);
-else
-	bordergrids=zeros(md.numberofgrids,1); %no partitioning serially.
-end
-
 %Get the grids set up:
 grids=struct('grid',cell(md.numberofgrids,1));
@@ -82,5 +58,4 @@
 grids(pos)=SetStructureField(grids(pos),'grid','surface',md.surface(pos));
 grids(pos)=SetStructureField(grids(pos),'grid','onbed',md.gridonbed(pos));
-grids(pos)=SetStructureField(grids(pos),'grid','border',bordergrids(pos));
 
 %spc degrees of freedom:
Index: /issm/trunk/src/m/solutions/ice/ModelProcessorSlopeCompute.m
===================================================================
--- /issm/trunk/src/m/solutions/ice/ModelProcessorSlopeCompute.m	(revision 1622)
+++ /issm/trunk/src/m/solutions/ice/ModelProcessorSlopeCompute.m	(revision 1623)
@@ -11,23 +11,11 @@
 %      [elements,grids,loads,constraints,materials,part,tpart]=ModelProcessorSlopeCompute(md,solutiontype)
 
-global cluster
-
-if cluster,
-	%We are running in parallel, we need to partition the elements 
-	element_partitioning=MeshPartition(md,numlabs);
-else
-	%We are running in serial, all elements belong to the same partition.
-	element_partitioning=ones(md.numberofelements,1);
-	labindex=1; %older versions of matlab do not include the parallel toolbox labindex variable.
-end
-
 %Allocate grids and elements
 elements=struct('element',cell(md.numberofelements,1));
 materials=struct('material',cell(0));
-mygrids=zeros(md.numberofgrids,1); %this array determines grid partitioning.
 
 %Build elements
 if strcmpi(md.type,'2d'),
-	pos=find(element_partitioning==labindex);
+	pos=[1:md.numberofelements]';
 	[elements(pos).element]=deal(triaelem);
 
@@ -39,5 +27,5 @@
 
 else
-	pos=find(element_partitioning==labindex);
+	pos=[1:md.numberofelements]';
 	[elements(pos).element]=deal(pentaelem);
 
@@ -58,16 +46,4 @@
 end
 
-if cluster, 
-	%For elements, the corresponding grids belong to this cpu. Keep track of it. 
-	mygrids(md.elements(el3pos,:))=1;
-	mygrids(md.elements(el6pos,:))=1;
-	
-	%Figure out which grids from the partitioning belong to different element partitions. We'll 
-	%call them 'border' grids.
-	bordergrids=double(gplus(mygrids)>1);
-else
-	bordergrids=zeros(md.numberofgrids,1); %no partitioning serially.
-end
-
 %Get the grids set up:
 grids=struct('grid',cell(md.numberofgrids,1));
@@ -82,5 +58,4 @@
 grids(pos)=SetStructureField(grids(pos),'grid','surface',md.surface(pos));
 grids(pos)=SetStructureField(grids(pos),'grid','onbed',md.gridonbed(pos));
-grids(pos)=SetStructureField(grids(pos),'grid','border',bordergrids(pos));
 
 %spc degrees of freedom:
Index: /issm/trunk/src/m/solutions/ice/ModelProcessorThermal.m
===================================================================
--- /issm/trunk/src/m/solutions/ice/ModelProcessorThermal.m	(revision 1622)
+++ /issm/trunk/src/m/solutions/ice/ModelProcessorThermal.m	(revision 1623)
@@ -11,22 +11,10 @@
 %      [elements,grids,loads,constraints,materials,part,tpart]=ModelProcessorThermal(md,solutiontype)
 
-global cluster
-
-if cluster,
-	%We are running in parallel, we need to partition the elements 
-	element_partitioning=MeshPartition(md,numlabs);
-else
-	%We are running in serial, all elements belong to the same partition.
-	element_partitioning=ones(md.numberofelements,1);
-	labindex=1; %older versions of matlab do not include the parallel toolbox labindex variable.
-end
-
 %Allocate grids and elements
 elements=struct('element',cell(md.numberofelements,1));
 materials=struct('material',cell(md.numberofelements+1,1));
-mygrids=zeros(md.numberofgrids,1); %this array determines grid partitioning.
 
 %Build 3d elements
-pos=find(element_partitioning==labindex);
+pos=[1:md.numberofelements]';
 [elements(pos).element]=deal(pentaelem);
 
@@ -51,5 +39,5 @@
 %For penta elements where we want to implement MacAyeal's element, we need to collapse 
 %the formulation into trias: 
-el6pos=find((md.elements_type(:,1)==MacAyealEnum() | md.elements_type(:,1)==PattynEnum()) & (element_partitioning==labindex));
+el6pos=find(md.elements_type(:,1)==MacAyealEnum | md.elements_type(:,1)==PattynEnum);
 pos2=find(ismember(el6pos,find(md.elements_type(:,1)==MacAyealEnum())));
 elements(pos2)=SetStructureField(elements(pos2),'element','collapse',ones(length(pos2),1));
@@ -80,18 +68,4 @@
 materials(end)=SetStructureField(materials(end),'constants','thermal_exchange_velocity',md.thermal_exchange_velocity);
 
-if cluster, 
-	%For elements, the corresponding grids belong to this cpu. Keep track of it. 
-	mygrids(md.elements(el3pos,:))=1;
-	mygrids(md.elements(el6pos,:))=1;
-end
-
-if cluster, 
-	%Figure out which grids from the partitioning belong to different element partitions. We'll 
-	%call them 'border' grids.
-	bordergrids=double(gplus(mygrids)>1);
-else
-	bordergrids=zeros(md.numberofgrids,1); %no partitioning serially.
-end
-
 %Get the grids set up:
 grids=struct('grid',cell(md.numberofgrids,1));
@@ -106,5 +80,4 @@
 grids(pos)=SetStructureField(grids(pos),'grid','surface',md.surface(pos));
 grids(pos)=SetStructureField(grids(pos),'grid','onbed',md.gridonbed(pos));
-grids(pos)=SetStructureField(grids(pos),'grid','border',bordergrids(pos));
 
 %spc degrees of freedom:
Index: /issm/trunk/src/m/solutions/ice/PartitioningVector.m
===================================================================
--- /issm/trunk/src/m/solutions/ice/PartitioningVector.m	(revision 1622)
+++ /issm/trunk/src/m/solutions/ice/PartitioningVector.m	(revision 1623)
@@ -9,55 +9,6 @@
 %      [part tpart]=PartitioningVector(md,grids)
 
-global cluster
-
-if ~cluster,
-    part=1:1:md.numberofgrids;
-    tpart=1:1:md.numberofgrids;
-else
-    part=zeros(md.numberofgrids,1);
-    %First deal with non border grids.
-
-    %How many grids for each lab?
-    count=0;
-    for i=1:md.numberofgrids,
-        if ((~isempty(grids(i).grid)) & (grids(i).grid.border==0)),
-            count=count+1;
-        end
-    end
-
-    %broacast
-	labcounts=gcat(count);
-
-	%create offset into partition vector
-	offset=0;
-	for i=1:(labindex-1),
-		offset=offset+labcounts(i);
-	end
-
-	%create partition vector
-	for i=1:md.numberofgrids,
-		if ((~isempty(grids(i).grid)) & (grids(i).grid.border==0)),
-			offset=offset+1;
-			part(offset)=i;
-		end
-	end
-
-	part=gplus(part);
-
-	%deal with border grids
-	count=gplus(count);
-	for i=1:md.numberofgrids,
-		if ((~isempty(grids(i).grid)) & (grids(i).grid.border==1)),
-			count=count+1;
-			part(count)=i;
-		end
-	end
-
-	%Build tpart:
-	tpart=zeros(md.numberofgrids,1);
-	for i=1:md.numberofgrids,
-		tpart(part(i))=i;
-	end
-end
+ part=1:1:md.numberofgrids;
+ tpart=1:1:md.numberofgrids;
 
 end %end function
Index: /issm/trunk/src/m/solutions/ice/PressureElemCompute.m
===================================================================
--- /issm/trunk/src/m/solutions/ice/PressureElemCompute.m	(revision 1622)
+++ /issm/trunk/src/m/solutions/ice/PressureElemCompute.m	(revision 1623)
@@ -9,5 +9,5 @@
 
 %global variables
-global cluster gridset
+global gridset
 
 %recover fem model fields
Index: /issm/trunk/src/m/solutions/ice/SpcGrids.m
===================================================================
--- /issm/trunk/src/m/solutions/ice/SpcGrids.m	(revision 1622)
+++ /issm/trunk/src/m/solutions/ice/SpcGrids.m	(revision 1623)
@@ -7,12 +7,6 @@
 %      [grids,y_g]=SpcGrids(grids,constraints)
 
-global cluster
-
 %initialize y_g, vector of constraint values in the g-set:
 y_g=sparse(getdofcount(grids),1);
-
-if cluster,
-	y_g_border=sparse(getdofcount(grids),1);
-end
 
 %Go through constraints and add constraint on gridset list of corresponding grid
@@ -23,11 +17,4 @@
 		constraint_grid=grids(constraint.grid).grid;
 		
-		%On the cluster, grids are partitioned across cpus, but constraints are replicated across cpus.  So 
-		%grids pointed to by certain constraints might not exist on the local cpu. In this case, skip the 
-		%constraint operations.
-		if cluster & isempty(constraint_grid),
-			continue;
-		end
-
 		%for the constrained grid, add the correct degree of freedom in the gridset list 
 		constraint_grid.gridset=[constraint_grid.gridset num2str(constraint.dof)]; %concatenate two strings
@@ -38,21 +25,6 @@
 		%plug value of constraint in corresponding constraint vector y_g
 		dof=constraint_grid.doflist(constraint.dof);
-		if ~cluster,
-			y_g(dof)=constraint.value;
-		else
-			%for cluster, we add to y_g only if grid does not belong to border (we don't want to add constraint.value several times for each cpu).
-			if constraint_grid.border~=1,
-				y_g(dof)=constraint.value;
-			else
-				y_g_border(dof)=constraint.value;
-			end
-		end
+		y_g(dof)=constraint.value;
 	end
 end 
 
-if cluster,
-	%Add all the y_g from all the cpus
-	y_g=gplus(y_g);
-	%y_g_border is the same on all cpus, plug it into y_g
-	y_g=y_g+y_g_border;
-end
Index: /issm/trunk/src/m/solutions/ice/StrainRateCompute.m
===================================================================
--- /issm/trunk/src/m/solutions/ice/StrainRateCompute.m	(revision 1622)
+++ /issm/trunk/src/m/solutions/ice/StrainRateCompute.m	(revision 1623)
@@ -9,5 +9,5 @@
 
 %global variables
-global cluster gridset
+global gridset
 
 %recover fem model fields
Index: /issm/trunk/src/m/solutions/ice/StressBedCompute.m
===================================================================
--- /issm/trunk/src/m/solutions/ice/StressBedCompute.m	(revision 1622)
+++ /issm/trunk/src/m/solutions/ice/StressBedCompute.m	(revision 1623)
@@ -9,5 +9,5 @@
 
 %global variables
-global cluster gridset
+global gridset
 
 %recover fem model fields
Index: /issm/trunk/src/m/solutions/ice/StressCompute.m
===================================================================
--- /issm/trunk/src/m/solutions/ice/StressCompute.m	(revision 1622)
+++ /issm/trunk/src/m/solutions/ice/StressCompute.m	(revision 1623)
@@ -9,5 +9,5 @@
 
 %global variables
-global cluster gridset
+global gridset
 
 %recover fem model fields
Index: /issm/trunk/src/m/solutions/ice/StressSurfaceCompute.m
===================================================================
--- /issm/trunk/src/m/solutions/ice/StressSurfaceCompute.m	(revision 1622)
+++ /issm/trunk/src/m/solutions/ice/StressSurfaceCompute.m	(revision 1623)
@@ -9,5 +9,5 @@
 
 %global variables
-global cluster gridset
+global gridset
 
 %recover fem model fields
Index: /issm/trunk/src/m/solutions/ice/ViscousHeatingCompute.m
===================================================================
--- /issm/trunk/src/m/solutions/ice/ViscousHeatingCompute.m	(revision 1622)
+++ /issm/trunk/src/m/solutions/ice/ViscousHeatingCompute.m	(revision 1623)
@@ -9,5 +9,5 @@
 
 %global variables
-global cluster gridset
+global gridset
 
 %recover fem model fields
Index: /issm/trunk/src/m/solutions/ice/diagnostic_core_linear.m
===================================================================
--- /issm/trunk/src/m/solutions/ice/diagnostic_core_linear.m	(revision 1622)
+++ /issm/trunk/src/m/solutions/ice/diagnostic_core_linear.m	(revision 1623)
@@ -11,5 +11,5 @@
 
 %global variables
-global cluster gridset
+global gridset
 
 if nargin==3,
@@ -29,5 +29,4 @@
 params=m.params;
 
-
 %recover parameters
 sparsity=params.sparsity;
@@ -36,5 +35,4 @@
 
 disp(sprintf('%s','   solving'));
-
 % Generate system matrices (stiffness and load)
 kflag=1; pflag=1;
@@ -43,9 +41,4 @@
 [K_gg,p_g]=SystemMatrices(elements,grids,loads,materials,kflag, pflag, sparsity,inputs,analysis_type);
 [K_gg,p_g]=PenaltySystemMatrices(grids,loads,materials,kflag, pflag, sparsity,inputs,analysis_type,K_gg,p_g);
-
-if cluster, 
-	K_gg=distributed(gplus(K_gg),'convert');
-	p_g=gplus(p_g);
-end
 
 % Reduce stiffness matrix from g set to f set (effectively rooting out the single point constraints), 
@@ -62,5 +55,4 @@
 end
    
-
 % Add single point constraints back, ie increase f-set by s-set into the global g-set.
 u_g= full(Mergesolution_g(uf,G_mn,ys));
Index: /issm/trunk/src/m/solutions/ice/diagnostic_core_nonlinear.m
===================================================================
--- /issm/trunk/src/m/solutions/ice/diagnostic_core_nonlinear.m	(revision 1622)
+++ /issm/trunk/src/m/solutions/ice/diagnostic_core_nonlinear.m	(revision 1623)
@@ -12,5 +12,5 @@
 
 %global variables
-global cluster gridset element_debug element_debugid
+global gridset element_debug element_debugid
 
 %recover fem model fields
@@ -87,9 +87,4 @@
 	end
 	
-	if cluster, 
-		K_gg=distributed(gplus(K_gg),'convert');
-		p_g=gplus(p_g);
-	end
-	
 	% Reduce stiffness matrix from g set to f set (effectively rooting out the single point constraints), 
 	% and compute modifications to loads from single point constraints.
Index: /issm/trunk/src/m/solutions/ice/melting_core.m
===================================================================
--- /issm/trunk/src/m/solutions/ice/melting_core.m	(revision 1622)
+++ /issm/trunk/src/m/solutions/ice/melting_core.m	(revision 1623)
@@ -6,5 +6,5 @@
 
 %global variables
-global cluster gridset
+global gridset
 
 %recover fem model fields
Index: /issm/trunk/src/m/solutions/ice/prognostic_core.m
===================================================================
--- /issm/trunk/src/m/solutions/ice/prognostic_core.m	(revision 1622)
+++ /issm/trunk/src/m/solutions/ice/prognostic_core.m	(revision 1623)
@@ -8,5 +8,5 @@
 
 %global variables
-global cluster gridset
+global gridset
 
 %recover fem model fields
@@ -40,9 +40,4 @@
 [K_gg,p_g]=PenaltySystemMatrices(grids,loads,materials,kflag, pflag, sparsity,inputs,analysis_type,K_gg,p_g);
 
-if cluster, 
-	K_gg=distributed(gplus(K_gg),'convert');
-	p_g=gplus(p_g);
-end
-
 % Reduce stiffness matrix from g set to f set (effectively rooting out the single point constraints), 
 % and compute modifications to loads from single point constraints.
Index: /issm/trunk/src/m/solutions/ice/slopecompute.m
===================================================================
--- /issm/trunk/src/m/solutions/ice/slopecompute.m	(revision 1622)
+++ /issm/trunk/src/m/solutions/ice/slopecompute.m	(revision 1623)
@@ -16,12 +16,4 @@
 %Use package to set solution namespace
 usenamespace('ice');
-
-%determine if run is parallel
-if strcmpi(md.cluster,'yes'), cluster=1; else cluster=0;end;
-
-%for now, only serial support is in
-if cluster,
-	error('slopecompute error message: parallel support not implemented yet');
-end
 
 %First, build elements,grids,loads, etc ... for horizontal, base vertical and vertical model
Index: /issm/trunk/src/m/solutions/ice/thermal_core.m
===================================================================
--- /issm/trunk/src/m/solutions/ice/thermal_core.m	(revision 1622)
+++ /issm/trunk/src/m/solutions/ice/thermal_core.m	(revision 1623)
@@ -6,5 +6,5 @@
 
 %global variables
-global cluster gridset
+global gridset
 
 %recover fem model fields
