Changeset 5050


Ignore:
Timestamp:
08/06/10 16:22:54 (15 years ago)
Author:
Mathieu Morlighem
Message:

Added validation tests capability

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/test/NightlyRun/runme.m

    r4999 r5050  
    3838global ISSM_DIR
    3939
    40 %recover options
    41 options=pairoptions(varargin{:});
    42 
    43 %check arguments
     40%Check inputs
     41% {{{1
    4442if nargout>1
    4543        help runme
     
    4745end
    4846
    49 %GET procedure
     47%recover options
     48options=pairoptions(varargin{:});
     49% }}}
     50
     51%Process options
     52%GET benchmark {{{1
     53benchmark=getfieldvalue(options,'benchmark','nightly');
     54if ~ismember(benchmark,{'all','nightly'})
     55        disp('runme warnig: benchmark not supported, defaulting to test ''nightly''')
     56        benchmark='nighlty';
     57end
     58% }}}
     59%GET procedure {{{1
    5060procedure=getfieldvalue(options,'procedure','check');
    5161if ~ismember(procedure,{'check','update'})
     
    5363        procedure='check';
    5464end
    55 
    56 %Get RANK and NUMPROCS for mutlithreaded runs
     65% }}}
     66%GET RANK and NUMPROCS for mutlithreaded runs  {{{1
    5767rank=getfieldvalue(options,'rank',1);
    5868numprocs=getfieldvalue(options,'numprocs',1);
    5969if (numprocs<rank), numprocs=1; end
    60 
    61 %GET ids
     70% }}}
     71%GET ids  {{{1
    6272list=dir;%use dir, as it seems to act OS independent
    6373list_ids=[];
     
    6676                        strncmpi(fliplr(list(i).name),fliplr('.m'),2)&...           %File name must end by '.m'
    6777                        ~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')
    6979        end
    7080end
     
    7484test_ids=getfieldvalue(options,'id',list_ids);
    7585test_ids=intersect(test_ids,list_ids);
     86% }}}
     87%Process Ids according to benchmarks{{{1
     88if strcmpi(benchmark,'nightly'),
     89        test_ids=intersect(test_ids,[1:999]);
     90end
     91% }}}
    7692
    7793%Loop over tests and launch sequence
     
    128144                                        fid=fopen([ISSM_DIR '/TEMP/matlaberror.log'], 'at');
    129145                                        fprintf(fid,'%s',message);
    130                                         fprintf(fid,'\n--------------------------------------------\n');
     146                                        fprintf(fid,'\n------------------------------------------------------------------\n');
    131147                                        fclose(fid);
    132148                                        disp(sprintf(['FAILURE difference: N/A test id: %i test name: %s field: %s'],id,Id2Name(id),fieldname));
     
    143159                fid=fopen([ISSM_DIR '/TEMP/matlaberror.log'], 'at');
    144160                fprintf(fid,'%s',message);
    145                 fprintf(fid,'\n--------------------------------------------\n');
     161                fprintf(fid,'\n------------------------------------------------------------------\n');
    146162                fclose(fid);
    147163                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.