Changeset 1978


Ignore:
Timestamp:
08/26/09 17:39:22 (15 years ago)
Author:
Mathieu Morlighem
Message:

fixed nightly run for tonight

File:
1 edited

Legend:

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

    r1933 r1978  
    1818%      nightlyrun({'ice'},{'prognostic','diagnostic'},1,3);
    1919
    20 %check arguments
    21 if (nargin>4)
    22         help nightlyrun
    23         error('nightlyrun error message: bad usage');
    24 end
    25 
    2620%use ISSM_DIR generated by startup.m
    2721global ISSM_DIR
    2822
    29 %recover rank and numprocs:
    30 if nargin>=2,
     23%check number of inputs
     24if nargin==0,
     25        packages={'macayeal','ice','cielo_serial','cielo_parallel'};
     26        rank=1;
     27        numprocs=1;
     28elseif nargin==1,
     29        packages=varargin{1};
     30        rank=1;
     31        numprocs=1;
     32elseif nargin==3,
     33        packages=varargin{1};
    3134        rank=varargin{end-1};
    3235        numprocs=varargin{end};
    33         if ~isnumeric(rank),
    34                 rank=1;
    35         end
    36         if ~isnumeric(numprocs),
    37                 numprocs=1;
    38         end
     36        if ~isnumeric(rank), rank=1; end
     37        if ~isnumeric(numprocs), numprocs=1; end
     38else
     39        help nightlyrun
     40        error('nightlyrun error message: bad usage');
    3941end
    4042
     
    4648
    4749list=listfilesparallel(rank,numprocs);
    48 
    49 %Get packages
    50 if nargin,
    51         packages=varargin{1};
    52 else
    53         packages={'macayeal','ice','cielo_serial','cielo_parallel'};
    54 end
    5550
    5651%Go through list of decks, and run the deck runme.m files package by package.
Note: See TracChangeset for help on using the changeset viewer.