Changeset 2172


Ignore:
Timestamp:
09/09/09 17:01:22 (16 years ago)
Author:
Mathieu Morlighem
Message:

put all options routines in OptionsList + added some doc

Location:
issm/trunk/src/m/utils
Files:
1 added
4 edited
2 moved

Legend:

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

    r2167 r2172  
    33%
    44%   This function goes to each directory of 'tests/Verifications' and
    5 %   launch the nightly tests. A specific package can be given in input
    6 %   only this package will be tested
    7 %   if last arguments are a pair of numbers, they represent the node rank and the number of
    8 %   cpus being used for the nightly run.
     5%   launch the nightly tests. A list of option can be given in input:
     6%     o analysis_type: cell containing all the analysis that the user wants to run
     7%     o sub_analysis_type: cell containing all the sub_analysis that the user wants to run
     8%     o qmu: 1 for qmu analysis only, 0 for no qmu analysis
     9%     o control: 1 for control only, 0 for no control
     10%     o control_fit: cell containing all the fits the user wants to run
     11%     o parallel: 1 for parallel only, 0 for serial only
     12%     o procedure: 'check' or 'update' to update archives
     13%     o rank: the node rank
     14%     o numproc: number of cpus being used
    915%
    1016%  Usage:
     
    1319%   Example:
    1420%      nightlyrun;
    15 %      nightlyrun({'ice'});
    16 %      nightlyrun({'cielo_serial','cielo_parallel'});
    17 %      nightlyrun({'ice'},{'prognostic','diagnostic'});
    18 %      nightlyrun({'ice'},{'prognostic','diagnostic'},1,3);
     21%      nightlyrun('analysis_type',{'prognostic','diagnostic'});
     22%      nightlyrun('procedure','update','analysis_type',{'prognostic','diagnostic'},'parallel',0);
     23%      nightlyrun('analysis_type',{'prognostic','diagnostic'},'parallel',1,'rank',1,'numproc',3);
    1924
    2025%use ISSM_DIR generated by startup.m
     
    2429options=recover_options(varargin{:});
    2530
    26 %check numproc and rank options
     31%check some options
    2732rank=find_option(options,'rank');
    2833if isempty(rank), rank=1; end
    29 rank=find_option(options,'numproc');
    30 if isempty(rank), numproc=1; end
     34procedure=find_option(options,'procedure');
     35if isempty(procedure), procedure='check'; end
    3136
    3237%Go to Test directory
     
    4146for j=1:numel(list),
    4247        eval(['cd ' list{j}]);
    43         runme(varargin{:});
     48        runme('procedure',procedure,varargin{:});
    4449        cd ..
    4550end
    46 
    47 %display needed by nightlyrun.sh to check that no error popped up.
    48 disp('NIGHTLYRUNTERMINATEDCORRECTLY');
  • issm/trunk/src/m/utils/Nightly/runme.m

    r2133 r2172  
    77%   Examples:
    88%      runme;
    9 %      runme({'ice'});
    10 %      runme({'ice','cielo_serial'},{'diagnostic'});
    11 %      md=runme({'cielo_parallel'});
     9%      runme('analysis_type',{'prognostic','diagnostic'});
     10%      runme('analysis_type',{'prognostic','diagnostic'},'parallel',0);
     11%      runme('analysis_type',{'prognostic','diagnostic'},'parallel',1);
    1212%
    13 %   See Also: UPDATEARCHIVE
     13%   See Also: NIGHTLYRUN UPDATEARCHIVE
    1414
    1515% This file can be run to check that the current version of issm is giving
    16 % coherent results. This test deals with an icesheet without icefront for a 2d model. The geometry
    17 % is square. Just run this file in Matlab, with a properly setup ISSM code.
     16% coherent results.
    1817% The results of this test will indicate if there is a difference between current computations
    1918% and archived results.
    2019
    2120% Errors  between archived results and the current version will get flagged if they are not within
    22 % a certain tolerance. The current tolerance is 10^-12. If you have good reasons to believe this
    23 % tolerance should be lowered (for example, if you are running single precision compilers?), feel
    24 % free to tweak the tolerance variable.
     21% a certain tolerance.
    2522
    2623%check arguments
     
    3128
    3229%call runme_core
    33 md=runme_core('check',varargin{:});
     30md=runme_core('procedure','check',varargin{:});
    3431
    3532%output model md if requested
  • issm/trunk/src/m/utils/Nightly/runme_core.m

    r2160 r2172  
    1 function md=runme_core(testtype,varargin)
     1function md=runme_core(varargin)
    22%RUNME_CORE - test deck for ISSM nightly runs
    33%
    44%   Usage:
    5 %      md=runme_core(varargin,testtype);
     5%      md=runme_core(varargin);
    66%
    77%   Examples:
     
    1111
    1212% This file can be run to check that the current version of issm is giving
    13 % coherent results. This test deals with an icesheet without icefront for a 2d model. The geometry
     13% coherent results.
    1414% is square. Just run this file in Matlab, with a properly setup ISSM code.
    1515% The results of this test will indicate if there is a difference between current computations
     
    1717
    1818% Errors  between archived results and the current version will get flagged if they are not within
    19 % a certain tolerance. The current tolerance is 10^-12. If you have good reasons to believe this
    20 % tolerance should be lowered (for example, if you are running single precision compilers?), feel
    21 % free to tweak the tolerance variable.
     19% a certain tolerance.
    2220
    2321%recover options
     
    7169        end
    7270
     71        %CHECK qmu
     72        qmu_arg=find_option(options,'qmu');
     73        if ~isempty(qmu_arg),
     74                if qmu~=qmu_arg,
     75                        continue
     76                end
     77        end
     78
     79        %CHECK control
     80        control_arg=find_option(options,'control');
     81        if ~isempty(control_arg),
     82                if control~=control_arg,
     83                        continue
     84                end
     85        end
     86
     87        %CHECK control_fit
     88        control_fit_arg=find_option(options,'control_fit');
     89        if ~isempty(control_fit_arg),
     90                if ~ismember(control_fit,control_fit_arg)
     91                        continue
     92                end
     93        end
     94
    7395        %CHECK parallel
    7496        parallel_arg=find_option(options,'parallel');
     
    7799                        continue
    78100                end
     101        end
     102
     103        %CHECK procedure
     104        procedure=find_option(options,'procedure');
     105        if isempty(procedure),
     106                disp('runme_core warning: no procedure found, defaulting to test checking')
     107                procedure='check';
    79108        end
    80109
  • issm/trunk/src/m/utils/Nightly/updatearchive.m

    r2135 r2172  
    11function varargout=updatearchive(varargin)
    2 %RUNME - test deck for ISSM nightly runs
     2%UPDATEARCHIVE - update test deck for ISSM nightly runs
    33%
    44%   Usage:
     
    77%   Examples:
    88%      updatearchive;
    9 %      updatearchive({'ice'});
    10 %      updatearchive({'ice','cielo_serial'},{'diagnostic'});
    11 %      md=updatearchive({'cielo_parallel'});
     9%      updatearchive('analysis_type',{'prognostic','diagnostic'});
     10%      updatearchive('analysis_type',{'prognostic','diagnostic'},'parallel',0);
     11%      updatearchive('analysis_type',{'prognostic','diagnostic'},'parallel',1);
    1212%
    13 %   See Also: UPDATEARCHIVE
     13%   See Also: NIGHTLYRUN RUNME
    1414
    15 % This file can be run to check that the current version of issm is giving
    16 % coherent results. This test deals with an icesheet without icefront for a 2d model. The geometry
    17 % is square. Just run this file in Matlab, with a properly setup ISSM code.
     15% This file can be run to update that the current version of issm is giving
     16% coherent results.
     17% Just run this file in Matlab, with a properly setup ISSM code.
    1818% The results of this test will indicate if there is a difference between current computations
    1919% and archived results.
    20 
    21 % Errors  between archived results and the current version will get flagged if they are not within
    22 % a certain tolerance. The current tolerance is 10^-12. If you have good reasons to believe this
    23 % tolerance should be lowered (for example, if you are running single precision compilers?), feel
    24 % free to tweak the tolerance variable.
    2520
    2621%check arguments
     
    3126
    3227%call updatearchive_core
    33 md=runme_core('update',varargin{:});
     28md=runme_core('procedure','update',varargin{:});
    3429
    3530%output model md if requested
Note: See TracChangeset for help on using the changeset viewer.