Changeset 24538
- Timestamp:
- 01/31/20 13:53:16 (5 years ago)
- Location:
- issm/trunk-jpl/src/m
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/qmu/preqmu.m
r17792 r24538 24 24 25 25 %first create temporary directory in which we will work 26 if strncmpi(overwrite,'y',1)27 system(['rm -rf ' qmudir '/*']);28 else29 %does the directory exist? if so, then error out30 if exist(qmudir)==7,31 error('Existing ''%s'' directory, cannot overwrite. Specify ''overwrite'',''y'' option in solve arguments.',options.qmudir);32 end33 end34 mkdir(qmudir)35 cd(qmudir)26 %if strncmpi(overwrite,'y',1) 27 % system(['rm -rf ' qmudir '/*']); 28 %else 29 % %does the directory exist? if so, then error out 30 % if exist(qmudir)==7, 31 % error('Existing ''%s'' directory, cannot overwrite. Specify ''overwrite'',''y'' option in solve arguments.',options.qmudir); 32 % end 33 %end 34 %mkdir(qmudir) 35 %cd(qmudir) 36 36 37 37 %when running in library mode, the in file needs to be called md.miscellaneous.name.qmu.in … … 46 46 responses=expandresponses(md,responses); 47 47 48 %go through variables and responses, and check they don't have more than md.qmu.numberofpartitions values. Also determine numvariables and numresponses {{{48 %go through variables and responses, and check they don't have more than md.qmu.numberofpartitions values. Also determine numvariables and numresponses 49 49 numvariables=0; 50 50 variable_fieldnames=fieldnames(variables); … … 72 72 numresponses=numresponses+numel(responses.(field_name)); 73 73 end 74 %}}}}75 74 76 75 %create in file for dakota … … 78 77 system(['rm -rf ' md.miscellaneous.name '.m']); 79 78 80 %build a list of variables and responses descriptors. the list is not expanded. {{{79 %build a list of variables and responses descriptors. the list is not expanded. 81 80 variabledescriptors={}; 82 81 variable_fieldnames=fieldnames(md.qmu.variables(ivar)); … … 98 97 end 99 98 end 100 %}}}101 99 102 100 %register the fields that will be needed by the Qmu model. -
issm/trunk-jpl/src/m/qmu/process_qmu_options.m
r15771 r24538 74 74 case 'overwrite' 75 75 outoptions.overwrite=options{i,2}; 76 case 'keep'77 outoptions.keep=options{i,2};78 76 case 'outfiles' 79 77 outoptions.outfiles=options{i,2}; -
issm/trunk-jpl/src/m/solve/loadresultsfromcluster.m
r24439 r24538 46 46 47 47 %erase the log and output files 48 if md.qmu.isdakota, 49 delete([['qmu' num2str(feature('GetPid')) '/'] md.miscellaneous.name '.outlog']); 50 delete([['qmu' num2str(feature('GetPid')) '/'] md.miscellaneous.name '.errlog']); 51 else 52 if ~nolog, 53 delete([md.miscellaneous.name '.outlog']); 54 delete([md.miscellaneous.name '.errlog']); 55 end 48 if ~nolog, 49 delete([md.miscellaneous.name '.outlog']); 50 delete([md.miscellaneous.name '.errlog']); 51 end 52 if exist([md.private.runtimename '.outbin']) 56 53 delete([md.miscellaneous.name '.outbin']); 57 if exist([md.private.runtimename '.tar.gz']) & ~ispc(), 58 delete([md.private.runtimename '.tar.gz']); 59 end54 end 55 if exist([md.private.runtimename '.tar.gz']) & ~ispc(), 56 delete([md.private.runtimename '.tar.gz']); 60 57 end 61 58 … … 63 60 hostname=oshostname(); 64 61 if strcmpi(hostname,cluster.name), 65 if md.qmu.isdakota, 66 delete([['qmu' num2str(feature('GetPid')) '/'] md.miscellaneous.name '.bin']); 67 delete([['qmu' num2str(feature('GetPid')) '/'] md.miscellaneous.name '.queue']); 62 delete([md.miscellaneous.name '.bin']); 63 delete([md.miscellaneous.name '.toolkits']); 64 if ~ispc(), 65 delete([md.miscellaneous.name '.queue']); 68 66 else 69 delete([md.miscellaneous.name '.bin']); 70 delete([md.miscellaneous.name '.toolkits']); 71 if ~ispc(), 72 delete([md.miscellaneous.name '.queue']); 73 else 74 delete([md.miscellaneous.name '.bat']); 75 end 67 delete([md.miscellaneous.name '.bat']); 76 68 end 77 69 end -
issm/trunk-jpl/src/m/solve/loadresultsfromcluster.py
r24213 r24538 77 77 TryRem('.bin', filename) 78 78 79 #cwd = os.getcwd().split('/')[-1]80 if md.qmu.isdakota:81 os.chdir('..')82 #TryRem('', cwd)83 84 79 return md 85 86 80 87 81 def TryRem(extension, filename): -
issm/trunk-jpl/src/m/solve/loadresultsfromdisk.m
r21069 r24538 60 60 else 61 61 md=postqmu(md); 62 cd ..63 62 end -
issm/trunk-jpl/src/m/solve/solve.m
r22618 r24538 172 172 disp('Model results must be loaded manually with md=loadresultsfromcluster(md);'); 173 173 end 174 175 %post processes qmu results if necessary176 if md.qmu.isdakota,177 if ~strncmpi(getfieldvalue(options,'keep','y'),'y',1)178 system(['rm -rf qmu' num2str(feature('GetPid'))]);179 end180 end -
issm/trunk-jpl/src/m/solve/solve.py
r24213 r24538 153 153 md = loadresultsfromcluster(md) 154 154 155 #post processes qmu results if necessary156 if md.qmu.isdakota:157 if not strncmpi(options.getfieldvalue('keep', 'y'), 'y', 1):158 shutil.rmtree('qmu' + str(os.getpid()))159 160 155 return md -
issm/trunk-jpl/src/m/solve/solveiceocean.m
r22948 r24538 135 135 disp('Model results must be loaded manually with md=loadresultsfromcluster(md);'); 136 136 end 137 138 %post processes qmu results if necessary139 if md.qmu.isdakota,140 if ~strncmpi(getfieldvalue(options,'keep','y'),'y',1)141 system(['rm -rf qmu' num2str(feature('GetPid'))]);142 end143 end
Note:
See TracChangeset
for help on using the changeset viewer.