Changeset 1650
- Timestamp:
- 08/11/09 15:13:09 (16 years ago)
- Location:
- issm/trunk/src/m/classes/public
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/classes/public/BuildQueueingScriptGeneric.m
r1111 r1650 15 15 fprintf(fid,'#!/bin/sh\n'); 16 16 fprintf(fid,'rm -rf %s/%s.lock\n',executionpath,md.name); 17 fprintf(fid,'mpirun -np %i %s/%s.exe %s %s.bin %s.outbin %s.lock 2> %s.errlog >%s.outlog & ',md.np,codepath, md.analysis_type,executionpath,md.name,md.name,md.name,md.name,md.name);17 fprintf(fid,'mpirun -np %i %s/%s.exe %s %s.bin %s.outbin %s.lock 2> %s.errlog >%s.outlog & ',md.np,codepath,AnalysisTypeAsEnum(md.analysis_type),executionpath,md.name,md.name,md.name,md.name,md.name); 18 18 fclose(fid); -
issm/trunk/src/m/classes/public/marshall.m
r1629 r1650 22 22 end 23 23 24 WriteData(fid,md.analysis_type',' String','analysis_type');25 WriteData(fid,md.sub_analysis_type',' String','sub_analysis_type');24 WriteData(fid,md.analysis_type','Integer','analysis_type'); 25 WriteData(fid,md.sub_analysis_type','Integer','sub_analysis_type'); 26 26 WriteData(fid,md.type,'String','type'); 27 27 WriteData(fid,md.numberofgrids,'Integer','numberofgrids'); -
issm/trunk/src/m/classes/public/process_solve_options.m
r1309 r1650 6 6 % 7 7 % See also: SOLVE,RECOVER_SOLVE_OPTIONS 8 9 %analysis_type: check on this option, error out otherwise10 found=0;11 for i=1:size(options,1),12 if strcmpi(options{i,1},'analysis_type'),13 analysis_type=options{i,2};14 found=1;15 end16 end17 if ~found,18 error('recover_solve_options error message: no ''analysis_type'' was provided');19 end20 8 21 9 %package: is there one? check to ''cielo'' … … 32 20 package='cielo'; 33 21 end 22 if ~(strcmpi(package,'cielo') | ... 23 strcmpi(package,'ice') | ... 24 strcmpi(package,'macayeal') ), 25 error(['process_solve_options error message: package ' package ' not supported yet!']); 26 end 34 27 35 if ~ischar(package), 36 error(['process_solve_options error message: package ' package ' not supported yet']); 28 %analysis_type: check on this option, error out otherwise 29 found=0; 30 for i=1:size(options,1), 31 if strcmpi(options{i,1},'analysis_type'), 32 analysis_type=options{i,2}; 33 found=1; 34 end 35 end 36 if ~found, 37 error('recover_solve_options error message: no ''analysis_type'' was provided'); 37 38 end 38 39 … … 69 70 end 70 71 71 72 72 %check solution type is supported 73 if ~( strcmpi(analysis_type,'control') | ... 74 strcmpi(analysis_type,'diagnostic') | ... 75 strcmpi(analysis_type,'prognostic') | ... 76 strcmpi(analysis_type,'thermal') | ... 77 strcmpi(analysis_type,'parameters') | ... 78 strcmpi(analysis_type,'mesh') | ... 79 strcmpi(analysis_type,'mesh2grid') | ... 80 strcmpi(analysis_type,'transient') ), 73 if ~ismemberi(analysis_type,{'control','diagnostic','prognostic','thermal','parameters','mesh2grid','transient'}), 81 74 error(['process_solve_options error message: analysis_type ' analysis_type ' not supported yet!']); 75 else 76 %convert to enum 77 analysis_type=eval([upper(analysis_type(1)) lower(analysis_type(2:end)) 'AnalysisEnum']); 82 78 end 83 if ~( strcmpi(sub_analysis_type,'none') | ... 84 strcmpi(sub_analysis_type,'steady') | ... 85 strcmpi(sub_analysis_type,'horiz') | ... 86 strcmpi(sub_analysis_type,'adjoint') | ... 87 strcmpi(sub_analysis_type,'gradient') | ... 88 strcmpi(sub_analysis_type,'inverse') | ... 89 strcmpi(sub_analysis_type,'vert') | ... 90 strcmpi(sub_analysis_type,'') | ... 91 strcmpi(sub_analysis_type,'transient') ), 79 if ~ismemberi(sub_analysis_type,{'none','steady','horiz','adjoint','gradient','inverse','vert','','transient'}), 92 80 error(['process_solve_options error message: sub_analysis_type ' sub_analysis_type ' not supported yet!']); 81 else 82 %convert to enum 83 sub_analysis_type=eval([upper(sub_analysis_type(1)) lower(sub_analysis_type(2:end)) 'AnalysisEnum']); 93 84 end 94 if ~(strcmpi(package,'cielo') | ...95 strcmpi(package,'ice') | ...96 strcmpi(package,'macayeal') ),97 error(['process_solve_options error message: package ' package ' not supported yet!']);98 end99 100 85 101 86 % process qmu arguments -
issm/trunk/src/m/classes/public/solve.m
r1629 r1650 55 55 56 56 %Launch correct solution sequence 57 if strcmpi(md.analysis_type,'diagnostic'),57 if md.analysis_type==DiagnosticAnalysisEnum, 58 58 md=diagnostic(md); 59 59 60 elseif strcmpi(md.analysis_type,'mesh'), 61 md=mesh(md); 62 63 elseif strcmpi(md.analysis_type,'transient'), 60 elseif md.analysis_type==TransientAnalysisEnum, 64 61 md=transient(md); 65 62 66 elseif strcmpi(md.analysis_type,'mesh2grid'),63 elseif md.analysis_type==Mesh2gridAnalysisEnum, 67 64 md=mesh2grid(md);; 68 65 69 elseif strcmpi(md.analysis_type,'prognostic'),66 elseif md.analysis_type==PrognosticAnalysisEnum, 70 67 md=prognostic(md);; 71 68 72 elseif strcmpi(md.analysis_type,'control'),69 elseif md.analysis_type==ControlAnalysisEnum, 73 70 md=control(md); 74 71 75 elseif strcmpi(md.analysis_type,'thermal'),72 elseif md.analysis_type==ThermalAnalysisEnum, 76 73 md=thermal(md); 77 74 78 elseif strcmpi(md.analysis_type,'parameters'),75 elseif md.analysis_type==ParametersAnalysisEnum, 79 76 md=parameters(md); 80 77 … … 100 97 addpath(genpath_ice([ISSM_DIR '/src/m/solutions/cielo'])); 101 98 addpath(genpath_ice([ISSM_DIR '/bin'])); 102
Note:
See TracChangeset
for help on using the changeset viewer.