Changeset 2167


Ignore:
Timestamp:
09/09/09 16:10:03 (15 years ago)
Author:
Mathieu Morlighem
Message:

updated nightlyrun.m

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/utils/Nightly/nightlyrun.m

    r2160 r2167  
    2121global ISSM_DIR
    2222
    23 %check number of inputs
    24 if nargin==0,
    25         packages={'macayeal','ice','cielo_serial','cielo_parallel'};
    26         rank=1;
    27         numprocs=1;
    28 elseif nargin==1,
    29         packages=varargin{1};
    30         rank=1;
    31         numprocs=1;
    32 elseif nargin==3,
    33         packages=varargin{1};
    34         rank=varargin{end-1};
    35         numprocs=varargin{end};
    36         if ~isnumeric(rank), rank=1; end
    37         if ~isnumeric(numprocs), numprocs=1; end
    38 else
    39         help nightlyrun
    40         error('nightlyrun error message: bad usage');
    41 end
     23%recover options
     24options=recover_options(varargin{:});
     25
     26%check numproc and rank options
     27rank=find_option(options,'rank');
     28if isempty(rank), rank=1; end
     29rank=find_option(options,'numproc');
     30if isempty(rank), numproc=1; end
    4231
    4332%Go to Test directory
     
    4938list=listfilesparallel(rank,numprocs);
    5039
    51 %Go through list of decks, and run the deck runme.m files package by package.
    52 for i=1:length(packages),
    53         for j=1:numel(list),
    54                 eval(['cd ' list{j}]);
    55                 if nargin==2,
    56                         runme(packages(i),varargin{2});
    57                 else
    58                         updatearchive
    59                 end
    60                 cd ..
    61         end
     40%Go through list of decks, and run the deck runme.m files
     41for j=1:numel(list),
     42        eval(['cd ' list{j}]);
     43        runme(varargin{:});
     44        cd ..
    6245end
    6346
Note: See TracChangeset for help on using the changeset viewer.