Changeset 2172
- Timestamp:
- 09/09/09 17:01:22 (16 years ago)
- 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 3 3 % 4 4 % 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 9 15 % 10 16 % Usage: … … 13 19 % Example: 14 20 % 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); 19 24 20 25 %use ISSM_DIR generated by startup.m … … 24 29 options=recover_options(varargin{:}); 25 30 26 %check numproc and rankoptions31 %check some options 27 32 rank=find_option(options,'rank'); 28 33 if isempty(rank), rank=1; end 29 rank=find_option(options,'numproc');30 if isempty( rank), numproc=1; end34 procedure=find_option(options,'procedure'); 35 if isempty(procedure), procedure='check'; end 31 36 32 37 %Go to Test directory … … 41 46 for j=1:numel(list), 42 47 eval(['cd ' list{j}]); 43 runme( varargin{:});48 runme('procedure',procedure,varargin{:}); 44 49 cd .. 45 50 end 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 7 7 % Examples: 8 8 % 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); 12 12 % 13 % See Also: UPDATEARCHIVE13 % See Also: NIGHTLYRUN UPDATEARCHIVE 14 14 15 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. 16 % coherent results. 18 17 % The results of this test will indicate if there is a difference between current computations 19 18 % and archived results. 20 19 21 20 % 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. 25 22 26 23 %check arguments … … 31 28 32 29 %call runme_core 33 md=runme_core(' check',varargin{:});30 md=runme_core('procedure','check',varargin{:}); 34 31 35 32 %output model md if requested -
issm/trunk/src/m/utils/Nightly/runme_core.m
r2160 r2172 1 function md=runme_core( testtype,varargin)1 function md=runme_core(varargin) 2 2 %RUNME_CORE - test deck for ISSM nightly runs 3 3 % 4 4 % Usage: 5 % md=runme_core(varargin ,testtype);5 % md=runme_core(varargin); 6 6 % 7 7 % Examples: … … 11 11 12 12 % 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 geometry13 % coherent results. 14 14 % is square. Just run this file in Matlab, with a properly setup ISSM code. 15 15 % The results of this test will indicate if there is a difference between current computations … … 17 17 18 18 % 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. 22 20 23 21 %recover options … … 71 69 end 72 70 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 73 95 %CHECK parallel 74 96 parallel_arg=find_option(options,'parallel'); … … 77 99 continue 78 100 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'; 79 108 end 80 109 -
issm/trunk/src/m/utils/Nightly/updatearchive.m
r2135 r2172 1 1 function varargout=updatearchive(varargin) 2 % RUNME -test deck for ISSM nightly runs2 %UPDATEARCHIVE - update test deck for ISSM nightly runs 3 3 % 4 4 % Usage: … … 7 7 % Examples: 8 8 % 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); 12 12 % 13 % See Also: UPDATEARCHIVE13 % See Also: NIGHTLYRUN RUNME 14 14 15 % This file can be run to checkthat the current version of issm is giving16 % coherent results. This test deals with an icesheet without icefront for a 2d model. The geometry17 % 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. 18 18 % The results of this test will indicate if there is a difference between current computations 19 19 % and archived results. 20 21 % Errors between archived results and the current version will get flagged if they are not within22 % a certain tolerance. The current tolerance is 10^-12. If you have good reasons to believe this23 % tolerance should be lowered (for example, if you are running single precision compilers?), feel24 % free to tweak the tolerance variable.25 20 26 21 %check arguments … … 31 26 32 27 %call updatearchive_core 33 md=runme_core(' update',varargin{:});28 md=runme_core('procedure','update',varargin{:}); 34 29 35 30 %output model md if requested
Note:
See TracChangeset
for help on using the changeset viewer.