Index: /issm/trunk-jpl/test/NightlyRun/runme.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/runme.m	(revision 16866)
+++ /issm/trunk-jpl/test/NightlyRun/runme.m	(revision 16867)
@@ -24,4 +24,5 @@
 %                      'update':   update the archive
 %                      'valgrind': check for memory leaks (default value of md.debug.valgrind needs to be changed manually)
+%      'stoponerror'   1 or 0
 %
 %   Usage:
@@ -222,4 +223,5 @@
 						disp(sprintf(['ERROR   difference: %-7.2g > %7.2g test id: %i test name: %s field: %s'],...
 							error_diff,tolerance,id,id_string,fieldname));
+						if(getfieldvalue(options,'stoponerror',0)), disp('STOP'); return; end
 					else
 						disp(sprintf(['SUCCESS difference: %-7.2g < %7.2g test id: %i test name: %s field: %s'],...
@@ -247,4 +249,5 @@
 						disp(sprintf(['FAILURE difference: N/A test id: %i test name: %s field: %s'],id,id_string,fieldname));
 						rethrow(me2);
+						if(getfieldvalue(options,'stoponerror',0)), disp('STOP'); return; end
 					end
 				end
@@ -274,4 +277,5 @@
 			disp(sprintf(['FAILURE difference: N/A test id: %i test name: %s field: %s'],id,id_string,'N/A'));
 			rethrow(me);
+			if(getfieldvalue(options,'stoponerror',0)), disp('STOP'); return; end
 		end
 		disp(sprintf('%s%i%s','----------------finished:',id,'-----------------------'));
