Index: /issm/trunk-jpl/src/py/model/display/fielddisplay.py
===================================================================
--- /issm/trunk-jpl/src/py/model/display/fielddisplay.py	(revision 11788)
+++ /issm/trunk-jpl/src/py/model/display/fielddisplay.py	(revision 11789)
@@ -31,6 +31,5 @@
 
 	elif isinstance(field, complex):
-		print("fielddisplay cannot handle complex numbers")
-		sys.exit()
+		raise RuntimeError("fielddisplay cannot handle complex numbers")
 
 	elif isinstance(field, float):
@@ -92,6 +91,5 @@
 				string="%s%s"%(string,string2)
 		else:
-			print("fielddisplay error message: format for comment not supportet yet")
-			sys.exit()
+			raise RuntimeError("fielddisplay error message: format for comment not supportet yet")
 
 	return string
Index: /issm/trunk-jpl/src/py/model/solvers/iluasmoptions.py
===================================================================
--- /issm/trunk-jpl/src/py/model/solvers/iluasmoptions.py	(revision 11789)
+++ /issm/trunk-jpl/src/py/model/solvers/iluasmoptions.py	(revision 11789)
@@ -0,0 +1,31 @@
+function options=iluasmoptions(varargin)
+%ASMOPTIONS - return Additive Shwartz Method with ILU preconditioner petsc options
+%
+%   Usage:
+%      options=iluasmoptions;
+			 
+%retrieve options provided in varargin
+arguments=pairoptions(varargin{:});
+
+%default iluasm options
+options={{'mat_type','aij'},{'ksp_type','gmres'},{'pc_type','asm'},{'sub_pc_type','ilu'},{'pc_asm_overlap',5},{'ksp_max_it',100},{'ksp_rtol',1e-15'}};
+
+%now, go through our arguments, and write over default options.
+for i=1:size(arguments.list,1),
+	arg1=arguments.list{i,1};
+	arg2=arguments.list{i,2};
+	found=0;
+	for j=1:size(options,2),
+		joption=options{j};
+		if strcmpi(joption{1},arg1),
+			joption{2}=arg2;
+			options{j}=joption;
+			found=1;
+			break;
+		end
+	end
+	if ~found,
+		%this option did not exist, add it: 
+		options{end+1}={arg1,arg2};
+	end
+end
Index: /issm/trunk-jpl/src/py/model/solvers/mumpsoptions.py
===================================================================
--- /issm/trunk-jpl/src/py/model/solvers/mumpsoptions.py	(revision 11789)
+++ /issm/trunk-jpl/src/py/model/solvers/mumpsoptions.py	(revision 11789)
@@ -0,0 +1,38 @@
+function options=mumpsoptions(varargin)
+%MUMPSOPTIONS - return MUMPS direct solver  petsc options
+%
+%   Usage:
+%      options=mumpsoptions;
+
+%retrieve options provided in varargin
+arguments=pairoptions(varargin{:});
+
+%default mumps options
+PETSC_VERSION=petscversion();
+if PETSC_VERSION==2,
+	options={{'mat_type','aijmumps'},{'ksp_type','preonly'},{'pc_type','lu'},{'mat_mumps_icntl_14',120},{'pc_factor_shift_positive_definite','true'}};
+end
+if PETSC_VERSION==3,
+	options={{'mat_type','mpiaij'},{'ksp_type','preonly'},{'pc_type','lu'},{'pc_factor_mat_solver_package','mumps'},{'mat_mumps_icntl_14',120},{'pc_factor_shift_positive_definite','true'}};
+
+end
+
+%now, go through our arguments, and write over default options.
+for i=1:size(arguments.list,1),
+	arg1=arguments.list{i,1};
+	arg2=arguments.list{i,2};
+	found=0;
+	for j=1:size(options,2),
+		joption=options{j};
+		if strcmpi(joption{1},arg1),
+			joption{2}=arg2;
+			options{j}=joption;
+			found=1;
+			break;
+		end
+	end
+	if ~found,
+		%this option did not exist, add it: 
+		options{end+1}={arg1,arg2};
+	end
+end
Index: /issm/trunk-jpl/src/py/utils/OS/ismumps.py
===================================================================
--- /issm/trunk-jpl/src/py/utils/OS/ismumps.py	(revision 11789)
+++ /issm/trunk-jpl/src/py/utils/OS/ismumps.py	(revision 11789)
@@ -0,0 +1,41 @@
+#ISMUMPS - figure out if MUMPS package was compiled with ISSM
+#
+#   Usage:
+#       flag=ismumps();
+
+#Module imports {{{
+import os
+import sys
+from issmtier import *
+#}}}
+
+def ismumps():
+
+	configfile=issmtier() + "/bin/config.h" #should find it in the install target
+	
+	if not os.path.isfile(configfile):
+		raise RuntimeError("%s%s%s"%("File ",configfile," not found. ISSM has not been configured yet!"))
+	
+	#%go through the file, and recover the line we want
+	flag=2;
+	fid=open(configfile,'r');
+
+	tline=fid.readline()
+	while tline:
+		
+		if tline=='': 
+			break
+		if tline[0:25]=="/* #undef _HAVE_MUMPS_ */":
+			flag=0;
+			break
+		if tline[0:20]=="#define _HAVE_MUMPS_":
+			flag=1
+			break
+		tline=fid.readline()
+
+	fid.close();
+
+	if flag==2:
+		raise RuntimeError('could not determine whether MUMPS was or was not compiled')
+
+	return flag
Index: /issm/trunk-jpl/src/py/utils/Shell/issmtier.py
===================================================================
--- /issm/trunk-jpl/src/py/utils/Shell/issmtier.py	(revision 11789)
+++ /issm/trunk-jpl/src/py/utils/Shell/issmtier.py	(revision 11789)
@@ -0,0 +1,24 @@
+
+#ISSMTIER - Get ISSM_TIER environment variable contents.
+#
+#   Usage:
+#      ISSM_TIER=issmtier()
+
+
+#Module imports
+import os
+
+def issmtier():
+
+	if os.name =="posix":
+		ISSM_TIER =os.getenv('ISSM_TIER')
+	else:
+		ISSM_TIER =os.getenv('ISSM_TIER_WIN')
+
+	if(ISSM_TIER[-1]=="/") or (ISSM_TIER[-1]=="\\"):
+		ISSM_TIER = ISSM_TIER[:-2]; #shave off the last '/'
+
+	if ISSM_TIER == "":
+		raise RuntimeError("issmdir error message: ''ISSM_TIER'' environment variable is empty! You should define ISSM_TIER in your .cshrc or .bashrc!")
+		
+	return ISSM_TIER
