Changeset 961
- Timestamp:
- 06/12/09 15:25:27 (16 years ago)
- Location:
- issm/trunk/src/m/classes
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/classes/@model/model.m
r804 r961 262 262 md.qmu_method=struct(); 263 263 md.qmu_params=struct(); 264 md.dakotaplugin=0;265 264 md.dakotaresults=struct(); 266 265 md.dakotain=''; … … 269 268 md.qmu_analysis=0; 270 269 md.npart=0; 270 md.numberofvariables=0; 271 md.numberofresponses=0; 272 md.variabledescriptors=NaN; 273 md.responsedescriptors=NaN; 271 274 272 275 %Ice solver string -
issm/trunk/src/m/classes/public/BuildQueueingScriptGeneric.m
r869 r961 31 31 end 32 32 33 fprintf(fid,' %s %s.bin %s.outbin %s.lock %s.qmu.in %s.qmu.out %s.qmu.err 2> %s.errlog >%s.outlog & ',executionpath,md.name,md.name,md.name,md.name,md.name,md.name,md.name,md.name);33 fprintf(fid,' %s %s.bin %s.outbin %s.lock 2> %s.errlog >%s.outlog & ',executionpath,md.name,md.name,md.name,md.name,md.name); 34 34 fclose(fid); -
issm/trunk/src/m/classes/public/displayqmu.m
r804 r961 11 11 disp(sprintf(' ''%s''','qmu using Dakota')); 12 12 13 for i=1:numel(md.variables) 14 disp(sprintf(' variables%s: (arrays of each variable class)',... 15 string_dim(md.variables,i))); 16 fnames=fieldnames(md.variables(i)); 17 maxlen=0; 18 for j=1:numel(fnames) 19 maxlen=max(maxlen,length(fnames{j})); 20 end 21 22 for j=1:numel(fnames) 23 disp(sprintf([' %-' num2str(maxlen+1) 's: [%ix%i] ''%s'''],... 24 fnames{j},size(md.variables.(fnames{j})),class(md.variables.(fnames{j})))); 25 end 26 end 13 if ~md.qmu_analysis, 14 disp(sprintf(' %s','no scheduled qmu. activate by doing md.qmu_analysis=1')); 15 else 16 17 for i=1:numel(md.variables) 18 disp(sprintf(' variables%s: (arrays of each variable class)',... 19 string_dim(md.variables,i))); 20 fnames=fieldnames(md.variables(i)); 21 maxlen=0; 22 for j=1:numel(fnames) 23 maxlen=max(maxlen,length(fnames{j})); 24 end 25 26 for j=1:numel(fnames) 27 disp(sprintf([' %-' num2str(maxlen+1) 's: [%ix%i] ''%s'''],... 28 fnames{j},size(md.variables.(fnames{j})),class(md.variables.(fnames{j})))); 29 end 30 end 27 31 28 32 29 for i=1:numel(md.responses)30 31 32 33 34 35 36 37 38 39 40 41 42 end33 for i=1:numel(md.responses) 34 disp(sprintf(' responses%s: (arrays of each response class)',... 35 string_dim(md.responses,i))); 36 fnames=fieldnames(md.responses(i)); 37 maxlen=0; 38 for j=1:numel(fnames) 39 maxlen=max(maxlen,length(fnames{j})); 40 end 41 42 for j=1:numel(fnames) 43 disp(sprintf([' %-' num2str(maxlen+1) 's: [%ix%i] ''%s'''],... 44 fnames{j},size(md.responses.(fnames{j})),class(md.responses.(fnames{j})))); 45 end 46 end 43 47 44 48 45 disp(sprintf(' qmu_method: (array of dakota_method class)')); 46 for i=1:numel(md.qmu_method); 47 if strcmp(class(md.qmu_method(i)),'dakota_method') 48 disp(sprintf(' method%s : ''%s''',... 49 string_dim(md.qmu_method,i),md.qmu_method(i).method)); 50 end 49 disp(sprintf(' qmu_method: (array of dakota_method class)')); 50 for i=1:numel(md.qmu_method); 51 if strcmp(class(md.qmu_method(i)),'dakota_method') 52 disp(sprintf(' method%s : ''%s''',... 53 string_dim(md.qmu_method,i),md.qmu_method(i).method)); 54 end 55 end 56 57 for i=1:numel(md.qmu_params) 58 disp(sprintf(' qmu_params%s: (array of method-independent parameters)',... 59 string_dim(md.qmu_params,i))); 60 fnames=fieldnames(md.qmu_params(i)); 61 maxlen=0; 62 for j=1:numel(fnames) 63 maxlen=max(maxlen,length(fnames{j})); 64 end 65 66 for j=1:numel(fnames) 67 disp(sprintf([' %-' num2str(maxlen+1) 's: %s'],... 68 fnames{j},any2str(md.qmu_params(i).(fnames{j})))); 69 end 70 end 71 72 for i=1:numel(md.dakotaresults) 73 disp(sprintf(' dakotaresults%s: (information from dakota files)',... 74 string_dim(md.dakotaresults,i))); 75 fnames=fieldnames(md.dakotaresults(i)); 76 maxlen=0; 77 for j=1:numel(fnames) 78 maxlen=max(maxlen,length(fnames{j})); 79 end 80 81 for j=1:numel(fnames) 82 disp(sprintf([' %-' num2str(maxlen+1) 's: [%ix%i] ''%s'''],... 83 fnames{j},size(md.dakotaresults.(fnames{j})),class(md.dakotaresults.(fnames{j})))); 84 end 85 end 86 87 if isempty(md.dakotain), disp(sprintf(' dakotain: N/A')); else disp(sprintf(' dakotain: [%ix%i] (can be accessed by typing md.dakotain)',size(md.dakotain)));end 88 if isempty(md.dakotaout), disp(sprintf(' dakotaout: N/A')); else disp(sprintf(' dakotaout: [%ix%i] (can be accessed by typing md.dakotaout)',size(md.dakotaout)));end 89 if isempty(md.dakotadat), disp(sprintf(' dakotadat: N/A')); else disp(sprintf(' dakotadat: [%ix%i] (can be accessed by typing md.dakotadat)',size(md.dakotadat)));end 90 disp(sprintf(' npart : %i (number of partitions for semi-descrete qmu)',md.npart)); 91 disp(sprintf(' dakotaplugin : %i (are we running using the library mode for Dakota? defaults to 0',md.dakotaplugin)); 51 92 end 52 53 for i=1:numel(md.qmu_params)54 disp(sprintf(' qmu_params%s: (array of method-independent parameters)',...55 string_dim(md.qmu_params,i)));56 fnames=fieldnames(md.qmu_params(i));57 maxlen=0;58 for j=1:numel(fnames)59 maxlen=max(maxlen,length(fnames{j}));60 end61 62 for j=1:numel(fnames)63 disp(sprintf([' %-' num2str(maxlen+1) 's: %s'],...64 fnames{j},any2str(md.qmu_params(i).(fnames{j}))));65 end66 end67 68 for i=1:numel(md.dakotaresults)69 disp(sprintf(' dakotaresults%s: (information from dakota files)',...70 string_dim(md.dakotaresults,i)));71 fnames=fieldnames(md.dakotaresults(i));72 maxlen=0;73 for j=1:numel(fnames)74 maxlen=max(maxlen,length(fnames{j}));75 end76 77 for j=1:numel(fnames)78 disp(sprintf([' %-' num2str(maxlen+1) 's: [%ix%i] ''%s'''],...79 fnames{j},size(md.dakotaresults.(fnames{j})),class(md.dakotaresults.(fnames{j}))));80 end81 end82 83 if isempty(md.dakotain), disp(sprintf(' dakotain: N/A')); else disp(sprintf(' dakotain: [%ix%i] (can be accessed by typing md.dakotain)',size(md.dakotain)));end84 if isempty(md.dakotaout), disp(sprintf(' dakotaout: N/A')); else disp(sprintf(' dakotaout: [%ix%i] (can be accessed by typing md.dakotaout)',size(md.dakotaout)));end85 if isempty(md.dakotadat), disp(sprintf(' dakotadat: N/A')); else disp(sprintf(' dakotadat: [%ix%i] (can be accessed by typing md.dakotadat)',size(md.dakotadat)));end86 disp(sprintf(' npart : %i (number of partitions for semi-descrete qmu)',md.npart));87 disp(sprintf(' dakotaplugin : %i (are we running using the library mode for Dakota? defaults to 0',md.dakotaplugin)); -
issm/trunk/src/m/classes/public/ismodelselfconsistent.m
r806 r961 158 158 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SOLUTION CHECKS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 159 159 %QMU 160 if md.dakotaplugin==1, 161 if md.qmu_params.evaluation_concurrency~=1, 162 disp(['concurrency should be set to 1 when running dakota in library mode']); 163 bool=0;return; 164 end 160 if md.qmu_params.evaluation_concurrency~=1, 161 disp(['concurrency should be set to 1 when running dakota in library mode']); 162 bool=0;return; 165 163 end 166 164 -
issm/trunk/src/m/classes/public/marshall.m
r816 r961 159 159 %Qmu: the rest will be handle by qmumarshall 160 160 WriteData(fid,md.qmu_analysis,'Integer','qmu_analysis'); 161 WriteData(fid,md.name,'String','name'); 161 162 162 163 %Get penalties to connect collapsed and non-collapsed 3d meshes: -
issm/trunk/src/m/classes/public/process_solve_options.m
r708 r961 79 79 end 80 80 81 82 % process qmu arguments 83 84 %first, the defaults 85 qmudir ='qmu';% qmudir =['qmu_' datestr(now,'yyyymmdd_HHMMSS')]; 86 qmufile='qmu';% qmufile can not be changed unless cielo_ice_script.sh is also changed 87 ivar =1; 88 iresp =1; 89 imethod=1; 90 iparams=1; 91 runmpi =false; 92 93 for i=1:size(options,1), 94 switch options{i,1}, 95 case 'qmudir' 96 qmudir=options{i,2}; 97 case 'qmufile' 98 qmufile=options{i,2}; 99 case 'ivar' 100 ivar=options{i,2}; 101 case 'iresp' 102 iresp=options{i,2}; 103 case 'imethod' 104 imethod=options{i,2}; 105 case 'iparams' 106 iparams=options{i,2}; 107 case 'overwrite' 108 outoptions.overwrite=options{i,2}; 109 case 'outfiles' 110 outoptions.outfiles=options{i,2}; 111 case 'rstfile' 112 outoptions.rstfile=options{i,2}; 113 case 'rundakota' 114 outoptions.rundakota=options{i,2}; 115 case 'runmpi' 116 runmpi=options{i,2}; 117 otherwise 118 %nothing 119 end 120 end 121 81 122 %setup final options structure 82 123 outoptions.analysis_type=analysis_type; 83 124 outoptions.package=package; 84 125 outoptions.sub_analysis_type=sub_analysis_type; 126 outoptions.qmudir=qmudir; 127 outoptions.qmufile=qmufile; 128 outoptions.ivar=ivar; 129 outoptions.iresp=iresp; 130 outoptions.imethod=imethod; 131 outoptions.iparams=iparams; 132 outoptions.runmpi=runmpi; -
issm/trunk/src/m/classes/public/solve.m
r681 r961 37 37 end 38 38 39 %if running qmu analysis, some preprocessing of dakota files using 40 %models fields needs to be carried out. 41 if md.qmu_analysis, 42 md=preqmu(md,options); 43 end 44 39 45 displaystring(md.debug,'\n%s\n','launching solution sequence'); 40 46 41 47 %If running in parallel, we have a different way of launching the solution 42 %sequences. qmu is the only solution sequence that cannot run in parallel 43 if ~strcmpi(md.analysis_type,'qmu'), 44 if ~strcmpi(md.cluster,'none'), 45 md=solveparallel(md); 46 return; 47 end 48 %sequences. 49 if ~strcmpi(md.cluster,'none'), 50 md=solveparallel(md); 51 return; 48 52 end 49 50 53 %Launch correct solution sequence 51 54 if strcmpi(md.analysis_type,'diagnostic'), … … 57 60 elseif strcmpi(md.analysis_type,'transient'), 58 61 md=transient(md); 59 60 elseif strcmpi(md.analysis_type,'qmu'),61 md=qmu(md,package);62 62 63 63 elseif strcmpi(md.analysis_type,'mesh2grid'), … … 80 80 end 81 81 82 %post processes qmu results if necessary 83 if md.qmu_analysis, 84 md=postqmu(md); 85 cd .. 86 end 87 82 88 %Check result is consistent 83 89 displaystring(md.debug,'%s\n','checking result consistency'); … … 91 97 addpath(genpath_ice([ISSM_DIR '/src/m/solutions/cielo'])); 92 98 addpath(genpath_ice([ISSM_DIR '/bin'])); 99 -
issm/trunk/src/m/classes/public/solveparallel.m
r672 r961 14 14 marshall(md); 15 15 16 %add qmu fields to binary file if running qmu analysis 17 if md.qmu_analysis, 18 qmumarshall(md,md.variables(options.ivar),md.responses(options.iresp)); 19 end 20 16 21 %Now, we need to build the queuing script, used by the cluster to launch the job. 17 22 BuildQueueingScript(md,executionpath,codepath);
Note:
See TracChangeset
for help on using the changeset viewer.