Index: /issm/trunk-jpl/src/c/classes/FemModel.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/FemModel.cpp	(revision 13940)
+++ /issm/trunk-jpl/src/c/classes/FemModel.cpp	(revision 13941)
@@ -353,5 +353,5 @@
 	Vector<IssmDouble> *df   = NULL;
 
-	bool oldalloc=true;
+	bool oldalloc=false;
 
 	/*retrieve parameters: */
@@ -594,5 +594,4 @@
 	/*Initialize Jacobian Matrix*/
 	this->AllocateSystemMatrices(&Jff,NULL,NULL,NULL);
-	Jff=new Matrix<IssmDouble>(fsize,fsize,connectivity,numberofdofspernode);
 
 	/*Create and assemble matrix*/
Index: /issm/trunk-jpl/src/c/modules/CreateNodalConstraintsx/CreateNodalConstraintsx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/CreateNodalConstraintsx/CreateNodalConstraintsx.cpp	(revision 13940)
+++ /issm/trunk-jpl/src/c/modules/CreateNodalConstraintsx/CreateNodalConstraintsx.cpp	(revision 13941)
@@ -12,8 +12,5 @@
 void CreateNodalConstraintsx( Vector<IssmDouble>** pys, Nodes* nodes,int configuration_type){
 
-	int i;
-
-	/*intermediary: */
-	int  numberofdofs;
+	bool  oldalloc  = false;
 
 	/*output: */
@@ -21,12 +18,16 @@
 
 	/*figure out how many dofs we have: */
-	numberofdofs=nodes->NumberOfDofs(configuration_type,SsetEnum);
+	int ssize=nodes->NumberOfDofs(configuration_type,SsetEnum);
+	int slocalsize = nodes->NumberOfDofsLocal(configuration_type,SsetEnum);
 
 	/*allocate:*/
-	ys=new Vector<IssmDouble>(numberofdofs);
+	if(oldalloc)
+	 ys=new Vector<IssmDouble>(ssize);
+	else
+	 ys=new Vector<IssmDouble>(slocalsize,ssize);
 
 	/*go through all nodes, and for the ones corresponding to this configuration_type, fill the 
 	 * constraints vector with the constraint values: */
-	for (i=0;i<nodes->Size();i++){
+	for(int i=0;i<nodes->Size();i++){
 		Node* node=(Node*)nodes->GetObjectByOffset(i);
 		if (node->InAnalysis(configuration_type)){
Index: /issm/trunk-jpl/src/c/modules/Reduceloadx/Reduceloadx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/Reduceloadx/Reduceloadx.cpp	(revision 13940)
+++ /issm/trunk-jpl/src/c/modules/Reduceloadx/Reduceloadx.cpp	(revision 13941)
@@ -20,5 +20,5 @@
 	int         global_m,global_n;
 	bool        fromlocalsize = true;
-	bool        oldalloc  = true;
+	bool        oldalloc  = false;
 
 	if(VerboseModule()) _pprintLine_("   Dirichlet lifting applied to load vector");
Index: /issm/trunk-jpl/src/c/modules/Reducevectorgtofx/Reducevectorgtofx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/Reducevectorgtofx/Reducevectorgtofx.cpp	(revision 13940)
+++ /issm/trunk-jpl/src/c/modules/Reducevectorgtofx/Reducevectorgtofx.cpp	(revision 13941)
@@ -15,5 +15,5 @@
 	int         fsize;
 	IssmDouble *ug_serial = NULL;
-	bool        oldalloc  = true;
+	bool        oldalloc  = false;
 
 	/*first figure out fsize: */
Index: /issm/trunk-jpl/src/c/modules/Reducevectorgtosx/Reducevectorgtosx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/Reducevectorgtosx/Reducevectorgtosx.cpp	(revision 13940)
+++ /issm/trunk-jpl/src/c/modules/Reducevectorgtosx/Reducevectorgtosx.cpp	(revision 13941)
@@ -21,4 +21,10 @@
 	ssize=nodes->NumberOfDofs(configuration_type,SsetEnum);
 
+	int analysis_type;
+	parameters->FindParam(&analysis_type,AnalysisTypeEnum);
+	int slocalsize = nodes->NumberOfDofsLocal(analysis_type,SsetEnum);
+
+	bool oldalloc = false;
+
 	if(ssize==0){
 		ys=NULL;
@@ -26,5 +32,8 @@
 	else{
 		/*allocate: */
-		ys=new Vector<IssmDouble>(ssize);
+		if(oldalloc)
+		 ys=new Vector<IssmDouble>(ssize);
+		else
+		 ys=new Vector<IssmDouble>(slocalsize,ssize);
 
 		if(nodes->NumberOfNodes(configuration_type)){ 
