Index: /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_schurcg.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_schurcg.cpp	(revision 23219)
+++ /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_schurcg.cpp	(revision 23220)
@@ -43,10 +43,20 @@
     * [ B^T 0 ] 
 	 *         */
+	#if (_PETSC_MAJOR_==3) && (_PETSC_MINOR_>=8)
+	MatCreateSubMatrix(Kff,isv,isv,MAT_INITIAL_MATRIX,&A);
+	MatCreateSubMatrix(Kff,isv,isp,MAT_INITIAL_MATRIX,&B);
+	MatCreateSubMatrix(Kff,isp,isv,MAT_INITIAL_MATRIX,&BT);
+	#else
 	MatGetSubMatrix(Kff,isv,isv,MAT_INITIAL_MATRIX,&A);
 	MatGetSubMatrix(Kff,isv,isp,MAT_INITIAL_MATRIX,&B);
 	MatGetSubMatrix(Kff,isp,isv,MAT_INITIAL_MATRIX,&BT);
+	#endif
 	
 	/* Extract preconditioner matrix on the pressure space*/
+	#if (_PETSC_MAJOR_==3) && (_PETSC_MINOR_>=8)
+	MatCreateSubMatrix(Kff,isp,isp,MAT_INITIAL_MATRIX,&IP);
+	#else
 	MatGetSubMatrix(Kff,isp,isp,MAT_INITIAL_MATRIX,&IP);
+	#endif
 
 	/* Get number of velocity / pressure nodes */
@@ -313,10 +323,16 @@
 	* Kff =  |      |
 	*			[B^T IP]
-  /* To calculate the residual, only the necessary blocks need to be extracted */
+   * To calculate the residual, only the necessary blocks need to be extracted */
 
 		/*Extract A, B, B^T */
+		#if (_PETSC_MAJOR_==3) && (_PETSC_MINOR_>=8)
+		MatCreateSubMatrix(Kff->pmatrix->matrix,isv,isv,MAT_INITIAL_MATRIX,&A);
+		MatCreateSubMatrix(Kff->pmatrix->matrix,isv,isp,MAT_INITIAL_MATRIX,&B);
+		MatCreateSubMatrix(Kff->pmatrix->matrix,isp,isv,MAT_INITIAL_MATRIX,&BT);
+		#else
 		MatGetSubMatrix(Kff->pmatrix->matrix,isv,isv,MAT_INITIAL_MATRIX,&A);
 		MatGetSubMatrix(Kff->pmatrix->matrix,isv,isp,MAT_INITIAL_MATRIX,&B);
 		MatGetSubMatrix(Kff->pmatrix->matrix,isp,isv,MAT_INITIAL_MATRIX,&BT);
+		#endif
 	
 		/*no. of free nodes in velocity/pressure space*/
