Index: /issm/trunk-jpl/src/m/classes/clusters/generic.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/clusters/generic.m	(revision 15906)
+++ /issm/trunk-jpl/src/m/classes/clusters/generic.m	(revision 15907)
@@ -70,5 +70,5 @@
 				if ~isvalgrind,
 					if cluster.interactive
-						if ismpi,
+						if IssmConfig('_HAVE_MPI_'),
 							fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s ',cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname);
 						else
@@ -76,5 +76,5 @@
 						end
 					else
-						if ismpi,
+						if IssmConfig('_HAVE_MPI_'),
 							fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s 2> %s.errlog >%s.outlog ',cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname,modelname,modelname);
 						else
@@ -88,5 +88,5 @@
 					fprintf(fid,'LD_PRELOAD=%s \\\n',cluster.valgrindlib);
 					if ismac, 
-						if ismpi,
+						if IssmConfig('_HAVE_MPI_'),
 							fprintf(fid,'mpiexec -np %i %s --leak-check=full --dsymutil=yes --suppressions=%s %s/issm.exe %s %s %s 2> %s.errlog >%s.outlog ',...
 							cluster.np,cluster.valgrind,cluster.valgrindsup,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname], modelname,modelname,modelname);
@@ -96,5 +96,5 @@
 						end
 					else
-						if ismpi,
+						if IssmConfig('_HAVE_MPI_'),
 							fprintf(fid,'mpiexec -np %i %s --leak-check=full --suppressions=%s %s/issm.exe %s %s %s 2> %s.errlog >%s.outlog ',...
 							cluster.np,cluster.valgrind,cluster.valgrindsup,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname,modelname,modelname);
Index: /issm/trunk-jpl/src/m/classes/clusters/generic.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/clusters/generic.py	(revision 15906)
+++ /issm/trunk-jpl/src/m/classes/clusters/generic.py	(revision 15907)
@@ -1,6 +1,6 @@
 import socket
-import os
 import math
 import subprocess
+from IssmConfig import IssmConfig
 from EnumToString import EnumToString
 from issmdir import *
@@ -81,10 +81,10 @@
 			if not isvalgrind:
 				if self.interactive: 
-					if ismpi():
+					if IssmConfig('_HAVE_MPI_')[0]:
 						fid.write('mpiexec -np %i %s/issm.exe %s %s/%s %s ' % (self.np,self.codepath,EnumToString(solution)[0],self.executionpath,dirname,modelname))
 					else:
 						fid.write('%s/issm.exe %s %s/%s %s ' % (self.codepath,EnumToString(solution)[0],self.executionpath,dirname,modelname))
 				else:
-					if ismpi():
+					if IssmConfig('_HAVE_MPI_')[0]:
 						fid.write('mpiexec -np %i %s/issm.exe %s %s/%s %s 2> %s.errlog >%s.outlog ' % (self.np,self.codepath,EnumToString(solution)[0],self.executionpath,dirname,modelname,modelname,modelname))
 					else:
@@ -95,5 +95,5 @@
 				#Add --gen-suppressions=all to get suppression lines
 				fid.write('LD_PRELOAD=%s \\\n' % self.valgrindlib)
-				if ismpi():
+				if IssmConfig('_HAVE_MPI_')[0]:
 					fid.write('mpiexec -np %i %s --leak-check=full --suppressions=%s %s/issm.exe %s %s/%s %s 2> %s.errlog >%s.outlog ' % \
 							(self.np,self.valgrind,self.valgrindsup,self.codepath,EnumToString(solution)[0],self.executionpath,dirname,modelname,modelname,modelname))
Index: /issm/trunk-jpl/src/m/classes/model/model.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/model/model.py	(revision 15906)
+++ /issm/trunk-jpl/src/m/classes/model/model.py	(revision 15907)
@@ -38,5 +38,4 @@
 from private import private
 from EnumDefinitions import *
-from ismumps import *
 from mumpsoptions import *
 from iluasmoptions import *
Index: /issm/trunk-jpl/src/m/classes/model/planet.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/model/planet.m	(revision 15906)
+++ /issm/trunk-jpl/src/m/classes/model/planet.m	(revision 15907)
@@ -38,9 +38,4 @@
 			 md.settings         = settings();
 			 md.solver           = solver();
-			 if ismumps(),
-				 md.solver           = addoptions(md.solver,StressbalanceVerticalAnalysisEnum(),mumpsoptions());
-			 else
-				 md.solver           = addoptions(md.solver,StressbalanceVerticalAnalysisEnum(),iluasmoptions());
-			 end
 			 md.cluster          = generic();
 			 md.balancethickness = balancethickness();
Index: /issm/trunk-jpl/src/m/classes/qmu/@dakota_method/dmeth_params_write.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/qmu/@dakota_method/dmeth_params_write.m	(revision 15906)
+++ /issm/trunk-jpl/src/m/classes/qmu/@dakota_method/dmeth_params_write.m	(revision 15907)
@@ -350,5 +350,5 @@
                 param_write(fid,sbeg,'seed','             = ','\n',dm.params);
                 param_write(fid,sbeg,'fixed_seed','','\n',dm.params);
-                dver=textscan(dakotaversion(),'%[0123456789].%[0123456789].%[0123456789]');
+                dver=textscan(IssmConfig('_DAKOTA_VERSION_'),'%[0123456789].%[0123456789].%[0123456789]');
                 if ((str2num(dver{1}{1})==4 && str2num(dver{2}{1})>2) || str2num(dver{1}{1})>4)
                     param_write(fid,sbeg,'rng','                ','\n',dm.params);
Index: /issm/trunk-jpl/src/m/classes/toolkits.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/toolkits.m	(revision 15906)
+++ /issm/trunk-jpl/src/m/classes/toolkits.m	(revision 15907)
@@ -40,7 +40,7 @@
 
 			 %default toolkits: 
-			 if ispetsc,
+			 if IssmConfig('_HAVE_PETSC_'),
 				 %MUMPS is the default toolkits
-				 if ismumps(),
+				 if IssmConfig('_HAVE_MUMPS_'),
 					 obj.DefaultAnalysis           = mumpsoptions();
 				 else
Index: /issm/trunk-jpl/src/m/classes/toolkits.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/toolkits.py	(revision 15906)
+++ /issm/trunk-jpl/src/m/classes/toolkits.py	(revision 15907)
@@ -1,4 +1,3 @@
-from ismumps import *
-from ispetsc import *
+from IssmConfig import IssmConfig
 from mumpsoptions import *
 from iluasmoptions import *
@@ -19,7 +18,7 @@
 	def __init__(self):    # {{{
 		#default toolkits
-		if ispetsc():
+		if IssmConfig('_HAVE_PETSC_')[0]:
 			#MUMPS is the default toolkits
-			if ismumps():
+			if IssmConfig('_HAVE_MUMPS_')[0]:
 				self.DefaultAnalysis           = mumpsoptions()
 			else:
Index: sm/trunk-jpl/src/m/os/dakotaversion.m
===================================================================
--- /issm/trunk-jpl/src/m/os/dakotaversion.m	(revision 15906)
+++ 	(revision )
@@ -1,26 +1,0 @@
-function DAKOTA_VERSION=dakotaversion()
-%DAKOTAVERSION - recover dakota version number, inside config.h file
-%
-%   Usage:
-%       DAKOTA_VERSION=dakotaversion();
-
-%default
-DAKOTA_VERSION='';
-
-configfile=[issmdir() '/config.h'];
-if ~exist(configfile,'file'),
-	error(['File ' configfile ' not found. ISSM has not been configured yet!']);
-end
-
-%go through the file, and recover the line we want
-fid=fopen(configfile,'r');
-if(fid==-1), error(['could not open file: ' configfile]); end
-
-while(true),
-	tline=fgets(fid);
-	if ~ischar(tline), break, end
-	if  strncmp(tline,'#define _DAKOTA_VERSION_',24),
-		DAKOTA_VERSION=strtrim(strrep(tline(26:end),'"',''));
-	end
-end
-fclose(fid);
Index: sm/trunk-jpl/src/m/os/dakotaversion.py
===================================================================
--- /issm/trunk-jpl/src/m/os/dakotaversion.py	(revision 15906)
+++ 	(revision )
@@ -1,34 +1,0 @@
-import os
-from issmdir import *
-from MatlabFuncs import *
-
-def dakotaversion():
-	"""
-	DAKOTAVERSION - recover dakota version number, inside config.h file
- 
-	   Usage:
-	      DAKOTA_VERSION=dakotaversion();
-	"""
-
-	#default
-	DAKOTA_VERSION=''
-
-	configfile=os.path.join(issmdir(),'config.h')
-	if not os.path.exists(configfile):
-		raise RuntimeError("File '%s' not found. ISSM has not been configured yet!" % configfile)
-
-	#go through the file, and recover the line we want
-	try:
-		fid=open(configfile,'r')
-	except IOError as e:
-		raise IOerror("could not open file: '%s'" % configfile)
-
-	for tline in fid:
-		if strncmp(tline,'#define _DAKOTA_VERSION_',24):
-			DAKOTA_VERSION=tline[25:].replace('"','').strip()
-			break
-
-	fid.close()
-
-	return DAKOTA_VERSION
-
Index: sm/trunk-jpl/src/m/os/ismpi.m
===================================================================
--- /issm/trunk-jpl/src/m/os/ismpi.m	(revision 15906)
+++ 	(revision )
@@ -1,32 +1,0 @@
-function flag=ismpi()
-%ISMPI - figure out if MPI package was compiled with ISSM
-%
-%   Usage:
-%       flag=ismpi();
-
-configfile=[issmdir() '/bin/config.h']; %should find it in the install target
-if ~exist(configfile,'file'),
-	error(['File ' configfile ' not found. ISSM has not been configured yet!']);
-end
-
-%go through the file, and recover the line we want
-flag=2;
-fid=fopen(configfile,'r');
-if(fid==-1), error(['could not open file: ' configfile]); end
-
-while(true),
-	tline=fgets(fid);
-	if ~ischar(tline), break, end
-	if strncmp(tline,'/* #undef _HAVE_MPI_ */',23),
-		flag=0;
-		break;
-	end
-	if  strncmp(tline,'#define _HAVE_MPI_',18),
-		flag=1;
-		break;
-	end
-end
-fclose(fid);
-if flag==2,
-	error('could not determine whether MPI was or was not compiled');
-end
Index: sm/trunk-jpl/src/m/os/ismpi.py
===================================================================
--- /issm/trunk-jpl/src/m/os/ismpi.py	(revision 15906)
+++ 	(revision )
@@ -1,37 +1,0 @@
-import os
-from issmdir import *
-from MatlabFuncs import *
-
-def ismpi():
-	"""
-	ISMPI - figure out if MPI package was compiled with ISSM
- 
-	   Usage:
-	      flag=ismpi();
-	"""
-
-	configfile=os.path.join(issmdir(),'bin','config.h')    #should find it in the install target
-	if not os.path.exists(configfile):
-		raise RuntimeError("File '%s' not found. ISSM has not been configured yet!" % configfile)
-
-	#go through the file, and recover the line we want
-	flag=2
-	try:
-		fid=open(configfile,'r')
-	except IOError as e:
-		raise IOError("could not open file: '%s'" % configfile)
-
-	for tline in fid:
-		if strncmp(tline,'/* #undef _HAVE_MPI_ */',23):
-			flag=0
-			break
-		if  strncmp(tline,'#define _HAVE_MPI_',18):
-			flag=1
-			break
-
-	fid.close()
-	if flag==2:
-		raise RuntimeError("could not determine whether MPI was or was not compiled.")
-
-	return flag
-
Index: sm/trunk-jpl/src/m/os/ismumps.m
===================================================================
--- /issm/trunk-jpl/src/m/os/ismumps.m	(revision 15906)
+++ 	(revision )
@@ -1,32 +1,0 @@
-function flag=ismumps()
-%ISMUMPS - figure out if MUMPS package was compiled with ISSM
-%
-%   Usage:
-%       flag=ismumps();
-
-configfile=[issmdir() '/bin/config.h']; %should find it in the install target
-if ~exist(configfile,'file'),
-	error(['File ' configfile ' not found. ISSM has not been configured yet!']);
-end
-
-%go through the file, and recover the line we want
-flag=2;
-fid=fopen(configfile,'r');
-if(fid==-1), error(['could not open file: ' configfile]); end
-
-while(true),
-	tline=fgets(fid);
-	if ~ischar(tline), break, end
-	if strncmp(tline,'/* #undef _HAVE_MUMPS_ */',25),
-		flag=0;
-		break;
-	end
-	if  strncmp(tline,'#define _HAVE_MUMPS_',20),
-		flag=1;
-		break;
-	end
-end
-fclose(fid);
-if flag==2,
-	error('could not determine whether MUMPS was or was not compiled');
-end
Index: sm/trunk-jpl/src/m/os/ismumps.py
===================================================================
--- /issm/trunk-jpl/src/m/os/ismumps.py	(revision 15906)
+++ 	(revision )
@@ -1,37 +1,0 @@
-import os
-from issmdir import *
-from MatlabFuncs import *
-
-def ismumps():
-	"""
-	ISMUMPS - figure out if MUMPS package was compiled with ISSM
- 
-	   Usage:
-	      flag=ismumps();
-	"""
-
-	configfile=os.path.join(issmdir(),'bin','config.h')    #should find it in the install target
-	if not os.path.exists(configfile):
-		raise RuntimeError("File '%s' not found. ISSM has not been configured yet!" % configfile)
-
-	#go through the file, and recover the line we want
-	flag=2
-	try:
-		fid=open(configfile,'r')
-	except IOError as e:
-		raise IOError("could not open file: '%s'" % configfile)
-
-	for tline in fid:
-		if strncmp(tline,'/* #undef _HAVE_MUMPS_ */',25):
-			flag=0
-			break
-		if  strncmp(tline,'#define _HAVE_MUMPS_',20):
-			flag=1
-			break
-
-	fid.close()
-	if flag==2:
-		raise RuntimeError("could not determine whether MUMPS was or was not compiled.")
-
-	return flag
-
Index: sm/trunk-jpl/src/m/os/ispetsc.m
===================================================================
--- /issm/trunk-jpl/src/m/os/ispetsc.m	(revision 15906)
+++ 	(revision )
@@ -1,32 +1,0 @@
-function flag=ispetsc()
-%ISPETSC - figure out if PETSC package was compiled with ISSM
-%
-%   Usage:
-%       flag=ispetsc();
-
-configfile=[issmdir() '/bin/config.h']; %should find it in the install target
-if ~exist(configfile,'file'),
-	error(['File ' configfile ' not found. ISSM has not been configured yet!']);
-end
-
-%go through the file, and recover the line we want
-flag=2;
-fid=fopen(configfile,'r');
-if(fid==-1), error(['could not open file: ' configfile]); end
-
-while(true),
-	tline=fgets(fid);
-	if ~ischar(tline), break, end
-	if strncmp(tline,'/* #undef _HAVE_PETSC_ */',25),
-		flag=0;
-		break;
-	end
-	if  strncmp(tline,'#define _HAVE_PETSC_',20),
-		flag=1;
-		break;
-	end
-end
-fclose(fid);
-if flag==2,
-	error('could not determine whether PETSC was or was not compiled');
-end
Index: sm/trunk-jpl/src/m/os/ispetsc.py
===================================================================
--- /issm/trunk-jpl/src/m/os/ispetsc.py	(revision 15906)
+++ 	(revision )
@@ -1,37 +1,0 @@
-import os
-from issmdir import *
-from MatlabFuncs import *
-
-def ispetsc():
-	"""
-	ISPETSC - figure out if PETSC package was compiled with ISSM
- 
-	   Usage:
-	      flag=ispetsc();
-	"""
-
-	configfile=os.path.join(issmdir(),'bin','config.h')    #should find it in the install target
-	if not os.path.exists(configfile):
-		raise RuntimeError("File '%s' not found. ISSM has not been configured yet!" % configfile)
-
-	#go through the file, and recover the line we want
-	flag=2
-	try:
-		fid=open(configfile,'r')
-	except IOError as e:
-		raise IOError("could not open file: '%s'" % configfile)
-
-	for tline in fid:
-		if strncmp(tline,'/* #undef _HAVE_PETSC_ */',25):
-			flag=0
-			break
-		if  strncmp(tline,'#define _HAVE_PETSC_',20):
-			flag=1
-			break
-
-	fid.close()
-	if flag==2:
-		raise RuntimeError("could not determine whether PETSC was or was not compiled.")
-
-	return flag
-
Index: sm/trunk-jpl/src/m/os/petscversion.m
===================================================================
--- /issm/trunk-jpl/src/m/os/petscversion.m	(revision 15906)
+++ 	(revision )
@@ -1,26 +1,0 @@
-function PETSC_VERSION=petscversion()
-%PETSCVERSION - recover petsc version number, inside config.h file
-%
-%   Usage:
-%       PETSC_VERSION=petscversion();
-
-%default
-PETSC_VERSION=3;
-
-configfile=[issmdir() '/config.h'];
-if ~exist(configfile,'file'),
-	error(['File ' configfile ' not found. ISSM has not been configured yet!']);
-end
-
-%go through the file, and recover the line we want
-fid=fopen(configfile,'r');
-if(fid==-1), error(['could not open file: ' configfile]); end
-
-while(true),
-	tline=fgets(fid);
-	if ~ischar(tline), break, end
-	if  strncmp(tline,'#define _PETSC_MAJOR_',21),
-		PETSC_VERSION=str2num(tline(23));
-	end
-end
-fclose(fid);
Index: sm/trunk-jpl/src/m/os/petscversion.py
===================================================================
--- /issm/trunk-jpl/src/m/os/petscversion.py	(revision 15906)
+++ 	(revision )
@@ -1,34 +1,0 @@
-import os
-from issmdir import *
-from MatlabFuncs import *
-
-def petscversion():
-	"""
-	PETSCVERSION - recover petsc version number, inside config.h file
- 
-	   Usage:
-	      PETSC_VERSION=petscversion();
-	"""
-
-	#default
-	PETSC_VERSION=3
-
-	configfile=os.path.join(issmdir(),'config.h')
-	if not os.path.exists(configfile):
-		raise RuntimeError("File '%s' not found. ISSM has not been configured yet!" % configfile)
-
-	#go through the file, and recover the line we want
-	try:
-		fid=open(configfile,'r')
-	except IOError as e:
-		raise IOerror("could not open file: '%s'" % configfile)
-
-	for tline in fid:
-		if strncmp(tline,'#define _PETSC_MAJOR_',21):
-			PETSC_VERSION=int(tline[22])
-			break
-
-	fid.close()
-
-	return PETSC_VERSION
-
Index: /issm/trunk-jpl/src/m/solve/solve.py
===================================================================
--- /issm/trunk-jpl/src/m/solve/solve.py	(revision 15906)
+++ /issm/trunk-jpl/src/m/solve/solve.py	(revision 15907)
@@ -8,5 +8,4 @@
 from ismodelselfconsistent import *
 from marshall import *
-from ispetsc import *
 from waitonlock import *
 from loadresultsfromcluster import *
Index: /issm/trunk-jpl/src/m/solvers/asmoptions.py
===================================================================
--- /issm/trunk-jpl/src/m/solvers/asmoptions.py	(revision 15906)
+++ /issm/trunk-jpl/src/m/solvers/asmoptions.py	(revision 15907)
@@ -1,6 +1,3 @@
-#module imports {{{
 from pairoptions import *
-from petscversion  import *
-#}}}
 def asmoptions(*args):
 	#ASMOPTIONS - return ASM petsc options
Index: /issm/trunk-jpl/src/m/solvers/issmsolver.py
===================================================================
--- /issm/trunk-jpl/src/m/solvers/issmsolver.py	(revision 15906)
+++ /issm/trunk-jpl/src/m/solvers/issmsolver.py	(revision 15907)
@@ -1,6 +1,3 @@
-#module imports {{{
 from pairoptions import *
-from petscversion  import *
-#}}}
 def asmoptions(*args):
 	#ISSMSOLVE - return issm solver options
Index: /issm/trunk-jpl/src/m/solvers/jacobiasmoptions.py
===================================================================
--- /issm/trunk-jpl/src/m/solvers/jacobiasmoptions.py	(revision 15906)
+++ /issm/trunk-jpl/src/m/solvers/jacobiasmoptions.py	(revision 15907)
@@ -1,6 +1,3 @@
-#module imports {{{
 from pairoptions import *
-from petscversion  import *
-#}}}
 def jacobiasmoptions(*args):
 	#ASMOPTIONS - return Additive Shwartz Method with Jacobi preconditioner petsc options
Index: /issm/trunk-jpl/src/m/solvers/jacobicgoptions.py
===================================================================
--- /issm/trunk-jpl/src/m/solvers/jacobicgoptions.py	(revision 15906)
+++ /issm/trunk-jpl/src/m/solvers/jacobicgoptions.py	(revision 15907)
@@ -1,6 +1,3 @@
-#module imports {{{
 from pairoptions import *
-from petscversion  import *
-#}}}
 def jacobicgoptions(*args):
 	#ASMOPTIONS - return Additive Shwartz Method with Jacobi preconditioner petsc options
Index: /issm/trunk-jpl/src/m/solvers/matlaboptions.py
===================================================================
--- /issm/trunk-jpl/src/m/solvers/matlaboptions.py	(revision 15906)
+++ /issm/trunk-jpl/src/m/solvers/matlaboptions.py	(revision 15907)
@@ -1,6 +1,3 @@
-#module imports {{{
 from pairoptions import *
-from petscversion  import *
-#}}}
 def matlaboptions(*args):
 	#MATLABOPTIONS - return Matlab petsc options
Index: /issm/trunk-jpl/src/m/solvers/mumpsoptions.m
===================================================================
--- /issm/trunk-jpl/src/m/solvers/mumpsoptions.m	(revision 15906)
+++ /issm/trunk-jpl/src/m/solvers/mumpsoptions.m	(revision 15907)
@@ -10,6 +10,6 @@
 
 %default mumps options
-PETSC_VERSION=petscversion();
-if PETSC_VERSION==2,
+PETSC_VERSION=IssmConfig('_PETSC_MAJOR_')[0];
+if PETSC_VERSION==2.,
 	mumps.toolkit='petsc';
 	mumps.mat_type=getfieldvalue(options,'mat_type','aijmumps');
@@ -19,5 +19,5 @@
 	mumps.pc_factor_shift_positive_definite=getfieldvalue(options,'pc_factor_shift_positive_definite','true');
 end
-if PETSC_VERSION==3,
+if PETSC_VERSION==3.,
 	mumps.toolkit='petsc';
 	mumps.mat_type=getfieldvalue(options,'mat_type','mpiaij');
Index: /issm/trunk-jpl/src/m/solvers/mumpsoptions.py
===================================================================
--- /issm/trunk-jpl/src/m/solvers/mumpsoptions.py	(revision 15906)
+++ /issm/trunk-jpl/src/m/solvers/mumpsoptions.py	(revision 15907)
@@ -1,5 +1,5 @@
 from collections import OrderedDict
 from pairoptions import *
-from petscversion import *
+from IssmConfig  import *
 
 def mumpsoptions(*args):
@@ -16,6 +16,6 @@
 
 	#default mumps options
-	PETSC_VERSION=petscversion()
-	if PETSC_VERSION==2:
+	PETSC_VERSION=IssmConfig('_PETSC_MAJOR_')[0]
+	if PETSC_VERSION==2.:
 		mumps['toolkit']='petsc'
 		mumps['mat_type']=options.getfieldvalue('mat_type','aijmumps')
@@ -24,5 +24,5 @@
 		mumps['mat_mumps_icntl_14']=options.getfieldvalue('mat_mumps_icntl_14',120)
 		mumps['pc_factor_shift_positive_definite']=options.getfieldvalue('pc_factor_shift_positive_definite','true')
-	if PETSC_VERSION==3:
+	if PETSC_VERSION==3.:
 		mumps['toolkit']='petsc'
 		mumps['mat_type']=options.getfieldvalue('mat_type','mpiaij')
Index: /issm/trunk-jpl/src/m/solvers/soroptions.py
===================================================================
--- /issm/trunk-jpl/src/m/solvers/soroptions.py	(revision 15906)
+++ /issm/trunk-jpl/src/m/solvers/soroptions.py	(revision 15907)
@@ -1,6 +1,3 @@
-#module imports {{{
 from pairoptions import *
-from petscversion  import *
-#}}}
 def soroptions(*args):
 	#SOROPTIONS - return Relaxation Solver petsc options
Index: /issm/trunk-jpl/src/m/solvers/stokesoptions.m
===================================================================
--- /issm/trunk-jpl/src/m/solvers/stokesoptions.m	(revision 15906)
+++ /issm/trunk-jpl/src/m/solvers/stokesoptions.m	(revision 15907)
@@ -10,9 +10,9 @@
 
 %default stokes options
-PETSC_VERSION=petscversion();
-if PETSC_VERSION==2,
+PETSC_VERSION=IssmConfig('_PETSC_MAJOR_')[0];
+if PETSC_VERSION==2.,
 	error('stokesoptions error message: multi-physics options not supported in Petsc 2');
 end
-if PETSC_VERSION==3,
+if PETSC_VERSION==3.,
 	stokes.toolkit='petsc';
 	stokes.mat_type=getfieldvalue(options,'mat_type','mpiaij');
Index: /issm/trunk-jpl/src/m/solvers/stokesoptions.py
===================================================================
--- /issm/trunk-jpl/src/m/solvers/stokesoptions.py	(revision 15906)
+++ /issm/trunk-jpl/src/m/solvers/stokesoptions.py	(revision 15907)
@@ -1,6 +1,4 @@
-#module imports {{{
 from pairoptions import *
-from petscversion  import *
-#}}}
+from IssmConfig  import *
 def stokesoptions(*args):
 	#STOKESOPTIONS - return STOKES multi-physics solver petsc options
@@ -14,9 +12,9 @@
 
 	#default stokes options
-	PETSC_VERSION=petscversion()
+	PETSC_VERSION=IssmConfig('_PETSC_MAJOR_')[0]
 
-	if PETSC_VERSION==2:
+	if PETSC_VERSION==2.:
 		raise RuntimeError('stokesoptions error message: multi-physics options not supported in Petsc 2')
-	if PETSC_VERSION==3:
+	if PETSC_VERSION==3.:
 		options=[['toolkit','petsc'],['mat_type','mpiaij'],['ksp_max_it',1000],['ksp_type','gmres'],['pc_type','fieldsplit'],['pc_field_split_type','schur'],\
 	['fieldsplit_0_pc_type','hypre'],['fieldsplit_0_ksp_type','gmres'],['fieldsplit_0_pc_hypre_type','boomerang'],\
