Index: /issm/trunk-jpl/src/c/modules/AllocateSystemMatricesx/AllocateSystemMatricesx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/AllocateSystemMatricesx/AllocateSystemMatricesx.cpp	(revision 16440)
+++ /issm/trunk-jpl/src/c/modules/AllocateSystemMatricesx/AllocateSystemMatricesx.cpp	(revision 16441)
@@ -39,7 +39,6 @@
 
 	/*if our matrices are coming from issm, we don't do dynamic allocation like Petsc 
-	 * does, and this routine is essentially useless. Force oldalloc in this case: */
+	 * does, and this routine is essentially useless. Force standard alloc in this case: */
 	toolkittype=ToolkitOptions::GetToolkitType();
-	if(strcmp(toolkittype,"issm")==0)oldalloc=true;
 
 	if(oldalloc){
@@ -53,16 +52,26 @@
 			m=flocalsize; n=flocalsize; /*local  sizes*/
 			M=fsize;      N=fsize;      /*global sizes*/
-			MatrixNonzeros(&d_nnz,&o_nnz,femmodel,FsetEnum,FsetEnum);
-			Kff=new Matrix<IssmDouble>(m,n,M,N,d_nnz,o_nnz);
-			xDelete<int>(d_nnz);
-			xDelete<int>(o_nnz);
+			if(strcmp(toolkittype,"issm")==0){
+				Kff=new Matrix<IssmDouble>(m,n,M,N,NULL,NULL);
+			}
+			else{
+				MatrixNonzeros(&d_nnz,&o_nnz,femmodel,FsetEnum,FsetEnum);
+				Kff=new Matrix<IssmDouble>(m,n,M,N,d_nnz,o_nnz);
+				xDelete<int>(d_nnz);
+				xDelete<int>(o_nnz);
+			}
 		}
 		if(pKfs){
 			m=flocalsize; n=slocalsize; /*local  sizes*/
 			M=fsize;      N=ssize;      /*global sizes*/
-			MatrixNonzeros(&d_nnz,&o_nnz,femmodel,FsetEnum,SsetEnum);
-			Kfs=new Matrix<IssmDouble>(m,n,M,N,d_nnz,o_nnz);
-			xDelete<int>(d_nnz);
-			xDelete<int>(o_nnz);
+			if(strcmp(toolkittype,"issm")==0){
+				Kfs=new Matrix<IssmDouble>(m,n,M,N,NULL,NULL);
+			}
+			else{
+				MatrixNonzeros(&d_nnz,&o_nnz,femmodel,FsetEnum,SsetEnum);
+				Kfs=new Matrix<IssmDouble>(m,n,M,N,d_nnz,o_nnz);
+				xDelete<int>(d_nnz);
+				xDelete<int>(o_nnz);
+			}
 		}
 		if(pdf) df =new Vector<IssmDouble>(flocalsize,fsize);
