Changeset 2175


Ignore:
Timestamp:
09/09/09 17:12:54 (15 years ago)
Author:
Mathieu Morlighem
Message:

not needed

Location:
issm/trunk/src/m/utils/Nightly
Files:
2 deleted
1 edited

Legend:

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

    r2173 r2175  
    1 function md=runme_core(varargin)
    2 %RUNME_CORE - test deck for ISSM nightly runs
     1function md=runme(varargin)
     2%RUNME - test deck for ISSM nightly runs
    33%
    44%   Usage:
    5 %      md=runme_core(varargin);
     5%      md=runme(varargin);
    66%
    77%   Examples:
    8 %      md=runme_core('parallel',1,'update');
     8%      runme;
     9%      runme('analysis_type',{'prognostic','diagnostic'});
     10%      runme('analysis_type',{'prognostic','diagnostic'},'parallel',0);
     11%      runme('procedure','update','analysis_type',{'prognostic','diagnostic'},'parallel',1);
    912%
    1013%   See Also: UPDATEARCHIVE RUNME
     
    2427%check arguments
    2528if nargout~=1
    26         help runme_core
    27         error('runme_core error message: bad usage');
    28 end
    29 
    30 %warning if a runme_core already exists:
     29        help runme
     30        error('runme error message: bad usage');
     31end
     32
     33%warning if a runme already exists:
    3134if exist('./runme.m')
    32         disp('this is the nighlty run runme_core, located in src/m/utils/Nightly/runme_core.m')
     35        disp('this is the nighlty run runme, located in src/m/utils/Nightly/runme.m')
    3336        disp('Another local runme exist but is not executed')
    3437end
     
    3639%read configuration
    3740if ~exist('./configuration.m')
    38         error('runme_core error message: configuration file ''configuration.m'' not found');
     41        error('runme error message: configuration file ''configuration.m'' not found');
    3942else
    4043        configuration;
     
    104107        procedure=find_option(options,'procedure');
    105108        if isempty(procedure),
    106                 disp('runme_core warning: no procedure found, defaulting to test checking')
     109                disp('runme warning: no procedure found, defaulting to test checking')
    107110                procedure='check';
    108111        end
     
    151154                        md.fit(:)=2;
    152155                else
    153                         error(['runme_core error message: for control solution, ' control_fit ' fit is not supported!']);
     156                        error(['runme error message: for control solution, ' control_fit ' fit is not supported!']);
    154157                end
    155158        end
     
    184187                end
    185188
    186                 %CHECK TEST?
    187                 if strcmpi(testtype,'check'),
     189                %UPDATE ARCHIVE?
     190                if strcmpi(procedure,'update'),
     191
     192                        for k=1:length(fields),
     193                                field=fields{k};
     194                                eval([ archive_name '_field' num2str(k) ' = md.results. ' field  ';']);
     195                        end
     196                        eval(['save ' archive_name ' ' archive_name '_field*']);
     197                        disp(sprintf(['File ' archive_name ' saved\n']));
     198
     199                %ELSE: CHECK TEST
     200                else,
    188201
    189202                        %load archive
     
    207220                                end
    208221                        end
    209 
    210                 %UPDATE ARCHIVE?
    211                 elseif strcmpi(testtype,'update'),
    212 
    213                         for k=1:length(fields),
    214                                 field=fields{k};
    215                                 eval([ archive_name '_field' num2str(k) ' = md.results. ' field  ';']);
    216                         end
    217                         eval(['save ' archive_name ' ' archive_name '_field*']);
    218                         disp(sprintf(['File ' archive_name ' saved\n']));
    219 
    220                 else
    221 
    222                         error('runme_core error message: unknown runtype. should be ''check'' or ''update''');
    223 
    224222                end
    225223
Note: See TracChangeset for help on using the changeset viewer.