Index: /issm/trunk/test/NightlyRun/runme.m
===================================================================
--- /issm/trunk/test/NightlyRun/runme.m	(revision 5049)
+++ /issm/trunk/test/NightlyRun/runme.m	(revision 5050)
@@ -38,8 +38,6 @@
 global ISSM_DIR
 
-%recover options
-options=pairoptions(varargin{:});
-
-%check arguments
+%Check inputs
+% {{{1
 if nargout>1
 	help runme
@@ -47,5 +45,17 @@
 end
 
-%GET procedure
+%recover options
+options=pairoptions(varargin{:});
+% }}}
+
+%Process options
+%GET benchmark {{{1
+benchmark=getfieldvalue(options,'benchmark','nightly');
+if ~ismember(benchmark,{'all','nightly'})
+	disp('runme warnig: benchmark not supported, defaulting to test ''nightly''')
+	benchmark='nighlty';
+end
+% }}}
+%GET procedure {{{1
 procedure=getfieldvalue(options,'procedure','check');
 if ~ismember(procedure,{'check','update'})
@@ -53,11 +63,11 @@
 	procedure='check';
 end
-
-%Get RANK and NUMPROCS for mutlithreaded runs
+% }}}
+%GET RANK and NUMPROCS for mutlithreaded runs  {{{1
 rank=getfieldvalue(options,'rank',1);
 numprocs=getfieldvalue(options,'numprocs',1);
 if (numprocs<rank), numprocs=1; end
-
-%GET ids
+% }}}
+%GET ids  {{{1
 list=dir;%use dir, as it seems to act OS independent
 list_ids=[];
@@ -66,5 +76,5 @@
 			strncmpi(fliplr(list(i).name),fliplr('.m'),2)&...           %File name must end by '.m'
 			~strncmpi(fliplr(list(i).name),fliplr('_nightly.m'),10)),   %File name end should be different that '_nightly.m'
-		list_ids(end+1)=eval(list(i).name(end-4:end-2));               %Keep test id only (3 digits)
+		list_ids(end+1)=eval(list(i).name(5:end-2));                   %Keep test id only (skip 'test' and '.m')
 	end
 end
@@ -74,4 +84,10 @@
 test_ids=getfieldvalue(options,'id',list_ids);
 test_ids=intersect(test_ids,list_ids);
+% }}}
+%Process Ids according to benchmarks{{{1
+if strcmpi(benchmark,'nightly'),
+	test_ids=intersect(test_ids,[1:999]);
+end
+% }}}
 
 %Loop over tests and launch sequence
@@ -128,5 +144,5 @@
 					fid=fopen([ISSM_DIR '/TEMP/matlaberror.log'], 'at');
 					fprintf(fid,'%s',message);
-					fprintf(fid,'\n--------------------------------------------\n');
+					fprintf(fid,'\n------------------------------------------------------------------\n');
 					fclose(fid);
 					disp(sprintf(['FAILURE difference: N/A test id: %i test name: %s field: %s'],id,Id2Name(id),fieldname));
@@ -143,5 +159,5 @@
 		fid=fopen([ISSM_DIR '/TEMP/matlaberror.log'], 'at');
 		fprintf(fid,'%s',message);
-		fprintf(fid,'\n--------------------------------------------\n');
+		fprintf(fid,'\n------------------------------------------------------------------\n');
 		fclose(fid);
 		disp(sprintf(['FAILURE difference: N/A test id: %i test name: %s field: N/A'],id,Id2Name(id)));
