Changeset 5050
- Timestamp:
- 08/06/10 16:22:54 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/test/NightlyRun/runme.m
r4999 r5050 38 38 global ISSM_DIR 39 39 40 %recover options 41 options=pairoptions(varargin{:}); 42 43 %check arguments 40 %Check inputs 41 % {{{1 44 42 if nargout>1 45 43 help runme … … 47 45 end 48 46 49 %GET procedure 47 %recover options 48 options=pairoptions(varargin{:}); 49 % }}} 50 51 %Process options 52 %GET benchmark {{{1 53 benchmark=getfieldvalue(options,'benchmark','nightly'); 54 if ~ismember(benchmark,{'all','nightly'}) 55 disp('runme warnig: benchmark not supported, defaulting to test ''nightly''') 56 benchmark='nighlty'; 57 end 58 % }}} 59 %GET procedure {{{1 50 60 procedure=getfieldvalue(options,'procedure','check'); 51 61 if ~ismember(procedure,{'check','update'}) … … 53 63 procedure='check'; 54 64 end 55 56 %G et RANK and NUMPROCS for mutlithreaded runs65 % }}} 66 %GET RANK and NUMPROCS for mutlithreaded runs {{{1 57 67 rank=getfieldvalue(options,'rank',1); 58 68 numprocs=getfieldvalue(options,'numprocs',1); 59 69 if (numprocs<rank), numprocs=1; end 60 61 %GET ids 70 % }}} 71 %GET ids {{{1 62 72 list=dir;%use dir, as it seems to act OS independent 63 73 list_ids=[]; … … 66 76 strncmpi(fliplr(list(i).name),fliplr('.m'),2)&... %File name must end by '.m' 67 77 ~strncmpi(fliplr(list(i).name),fliplr('_nightly.m'),10)), %File name end should be different that '_nightly.m' 68 list_ids(end+1)=eval(list(i).name( end-4:end-2)); %Keep test id only (3 digits)78 list_ids(end+1)=eval(list(i).name(5:end-2)); %Keep test id only (skip 'test' and '.m') 69 79 end 70 80 end … … 74 84 test_ids=getfieldvalue(options,'id',list_ids); 75 85 test_ids=intersect(test_ids,list_ids); 86 % }}} 87 %Process Ids according to benchmarks{{{1 88 if strcmpi(benchmark,'nightly'), 89 test_ids=intersect(test_ids,[1:999]); 90 end 91 % }}} 76 92 77 93 %Loop over tests and launch sequence … … 128 144 fid=fopen([ISSM_DIR '/TEMP/matlaberror.log'], 'at'); 129 145 fprintf(fid,'%s',message); 130 fprintf(fid,'\n-------------------------------------------- \n');146 fprintf(fid,'\n------------------------------------------------------------------\n'); 131 147 fclose(fid); 132 148 disp(sprintf(['FAILURE difference: N/A test id: %i test name: %s field: %s'],id,Id2Name(id),fieldname)); … … 143 159 fid=fopen([ISSM_DIR '/TEMP/matlaberror.log'], 'at'); 144 160 fprintf(fid,'%s',message); 145 fprintf(fid,'\n-------------------------------------------- \n');161 fprintf(fid,'\n------------------------------------------------------------------\n'); 146 162 fclose(fid); 147 163 disp(sprintf(['FAILURE difference: N/A test id: %i test name: %s field: N/A'],id,Id2Name(id)));
Note:
See TracChangeset
for help on using the changeset viewer.