Changeset 1111
- Timestamp:
- 06/25/09 17:51:18 (15 years ago)
- Location:
- issm/trunk/src/m/classes/public
- Files:
-
- 1 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/classes/public/BuildQueueingScript.m
r465 r1111 9 9 %First try and figure out if there is a special script for thie particular cluster 10 10 function_name=['BuildQueueingScript' md.cluster]; 11 12 %some specific treatment of identical cluster, gemini, castor and pollux 13 if strcmpi(md.cluster,'castor') || strcmpi(md.cluster,'pollux'), 14 function_name='BuildQueueingScriptgemini'; 15 end 16 11 17 if exist(function_name,'file'), 18 19 12 20 %Call this function: 13 21 eval([function_name '(md,executionpath,codepath);']); -
issm/trunk/src/m/classes/public/BuildQueueingScriptGeneric.m
r961 r1111 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 ',md.np); 18 19 if strcmpi(md.analysis_type,'diagnostic'), 20 fprintf(fid,'%s/diagnostic.exe',codepath); 21 elseif strcmpi(md.analysis_type,'control'), 22 fprintf(fid,'%s/control.exe',codepath); 23 elseif strcmpi(md.analysis_type,'thermal'), 24 fprintf(fid,'%s/thermal.exe',codepath); 25 elseif strcmpi(md.analysis_type,'prognostic'), 26 fprintf(fid,'%s/prognostic.exe',codepath); 27 elseif strcmpi(md.analysis_type,'transient'), 28 fprintf(fid,'%s/transient.exe',codepath); 29 else 30 error('BuildQueueingScriptGeneric error message: unsupported solution type!'); 31 end 32 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); 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); 34 18 fclose(fid); -
issm/trunk/src/m/classes/public/BuildQueueingScriptgemini.m
r465 r1111 1 function BuildQueueingScriptgemini(md, solutiontype,executionpath,codepath)1 function BuildQueueingScriptgemini(md,executionpath,codepath) 2 2 %BUILDQUEUEINGSCRIPTGEMINI - ... 3 3 % … … 12 12 end 13 13 14 fprintf(fid,'#!/bin/ sh\n');15 fprintf(fid,'# BSUB -n %i -W %i\n',md.np,md.time);16 fprintf(fid,'# BSUB -J %s\n',md.name);14 fprintf(fid,'#!/bin/csh\n'); 15 fprintf(fid,'#PBS -l walltime=%i\n',md.time); 16 fprintf(fid,'#PBS -l ncpus=%i\n',md.np); 17 17 if ~isempty(md.queue), 18 fprintf(fid,'# BSUB-q %s\n',md.queue);18 fprintf(fid,'#PBS -q %s\n',md.queue); 19 19 end 20 fprintf(fid,'#BSUB -o %s.outlog -e %s.errlog\n',md.name,md.name); 21 fprintf(fid,'cd %s\n',executionpath); 22 fprintf(fid,'rm -rf %s.outlog %s.errlog %s.lock\n',md.name,md.name,md.name); 20 fprintf(fid,'#PBS -o %s.outlog \n',md.name); 21 fprintf(fid,'#PBS -e %s.errlog \n',md.name); 23 22 24 if strcmpi(solutiontype,'diagnostic') , 25 fprintf(fid,'mpirun -np %i %s/diagnostic.exe %s %s.bin %s.outbin %s.lock',md.np,codepath,executionpath,md.name,md.name,md.name); 26 elseif strcmpi(solutiontype,'control') , 27 fprintf(fid,'mpirun -np %i %s/control.exe %s %s.bin %s.outbin %s.lock',md.np,codepath,executionpath,md.name,md.name,md.name); 28 elseif strcmpi(solutiontype,'thermal') , 29 fprintf(fid,'mpirun -np %i %s/thermal.exe %s %s.bin %s.outbin %s.lock',md.np,codepath,executionpath,md.name,md.name,md.name); 30 else 31 error('BuildQueueingScriptgemini error message: unsupported solution type!'); 32 end 23 fprintf(fid,'setenv PBS_O_WORKDIR %s\n',executionpath); 24 fprintf(fid,'cd $PBS_O_WORKDIR\n'); 25 fprintf(fid,'setenv OMP_NUM_THREADS 1\n'); 26 fprintf(fid,'mpirun -np %i %s/%s.exe %s %s.bin %s.outbin %s.lock',md.np,codepath,md.analysis_type,executionpath,md.name,md.name,md.name); 27 33 28 fclose(fid); -
issm/trunk/src/m/classes/public/LaunchQueueJob.m
r1 r1111 7 7 %First try and figure out if there is a special script for thie particular cluster 8 8 function_name=['LaunchQueueJob' md.cluster]; 9 10 %some specific treatment of identical cluster, gemini, castor and pollux 11 if strcmpi(md.cluster,'castor') || strcmpi(md.cluster,'pollux'), 12 function_name='LaunchQueueJobgemini'; 13 end 14 15 16 9 17 if exist(function_name,'file'), 10 18 %Call this function: -
issm/trunk/src/m/classes/public/LaunchQueueJobgemini.m
r1 r1111 16 16 %jpload both files to cluster 17 17 disp('uploading input file, queueing script and variables script'); 18 eval(['!scp ' md.name '.bin' ' ' md.name '.queue ' md.cluster ':' executionpath]); 18 if md.qmu_analysis, 19 eval(['!scp ' md.name '.bin' ' ' md.name '.queue ' md.name '.qmu.in ' md.cluster ':' executionpath]); 20 else 21 eval(['!scp ' md.name '.bin' ' ' md.name '.queue ' md.cluster ':' executionpath]); 22 end 23 24 %new gemini cannot launch across cluster using ssh 25 disp(['launch solution sequence on remote cluster by logging into it and typing qsub < ' md.name '.queue']); 26 return; 19 27 20 28 disp('launching solution sequence on remote cluster'); 29 21 30 %now call the queuing script to launch the job. 22 system(['ssh ' md.cluster ' ''cd ' executionpath ' && bsub < ' md.name '.queue ''']); 31 system(['ssh ' md.cluster ' ''cd ' executionpath ' && qsub < ' md.name '.queue ''']); 32 -
issm/trunk/src/m/classes/public/ThicknessCorrection.m
r856 r1111 34 34 %modify thickness 35 35 for i=1:length(pos_shelf) 36 37 if mod(i,100)==0, 38 fprintf('\b\b\b\b\b\b\b') 39 fprintf('%5.2f%s',i/length(pos_shelf)*100,' %'); 40 end 41 36 42 %search the grid on ice sheet the closest to i 37 43 [d posd]=min(sqrt((md.x(pos_shelf(i))-md.x(pos_GL)).^2+(md.y(pos_shelf(i))-md.y(pos_GL)).^2)); -
issm/trunk/src/m/classes/public/displayqmu.m
r965 r1111 89 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 90 disp(sprintf(' npart : %i (number of partitions for semi-descrete qmu)',md.npart)); 91 disp(sprintf(' part : [%i] (user provided mesh partition, defaults to metis if not specified)',length(md.part))); 92 91 93 end -
issm/trunk/src/m/classes/public/ismodelselfconsistent.m
r966 r1111 162 162 disp(['concurrency should be set to 1 when running dakota in library mode']); 163 163 bool=0;return; 164 end 165 if ~isempty(md.part), 166 if numel(md.part)~=md.numberofgrids, 167 disp(['user supplied partition for qmu analysis should have size md.numberofgrids x 1 ']); 168 bool=0;return; 169 end 170 if find(md.part)>=md.numberofgrids, 171 disp(['user supplied partition should be indexed from 0 (c-convention)']); 172 bool=0;return; 173 end 174 if md.npart~=md.numberofgrids, 175 disp(['user supplied partition should have same size as md.npart']); 176 bool=0;return; 177 end 178 164 179 end 165 180 end -
issm/trunk/src/m/classes/public/loadresultsfromcluster.m
r804 r1111 24 24 else 25 25 if md.qmu_analysis, 26 system(['scp ' md.cluster ':' executionpath '/' md.name '.outlog ' executionpath '/' md.name '.errlog ' executionpath '/' md.name '.outbin ' executionpath '/' md.name '.qmu.err ' executionpath '/' md.name '.qmu.out' executionpath '/dakota_tabular.dat ./']); %get outlog, errlog and outbin files26 system(['scp ' md.cluster ':' executionpath '/' md.name '.outlog ' md.cluster ':' executionpath '/' md.name '.errlog ' md.cluster ':' executionpath '/' md.name '.outbin ' md.cluster ':' executionpath '/' md.name '.qmu.err ' md.cluster ':' executionpath '/' md.name '.qmu.out ' md.cluster ':' executionpath '/dakota_tabular.dat ./']); %get outlog, errlog and outbin files 27 27 else 28 system(['scp ' md.cluster ':' executionpath '/' md.name '.outlog ' executionpath '/' md.name '.errlog' executionpath '/' md.name '.outbin ./']); %get outlog, errlog and outbin files28 system(['scp ' md.cluster ':' executionpath '/' md.name '.outlog ' md.cluster ':' executionpath '/' md.name '.errlog ' md.cluster ':' executionpath '/' md.name '.outbin ./']); %get outlog, errlog and outbin files 29 29 end 30 30 end -
issm/trunk/src/m/classes/public/marshall.m
r961 r1111 73 73 74 74 WriteData(fid,md.elementoniceshelf,'Mat','elementoniceshelf'); 75 WriteData(fid,md.elementonwater,'Mat','elementonwater'); 75 76 WriteData(fid,md.gridonicesheet,'Mat','gridonicesheet'); 76 77 WriteData(fid,md.gridoniceshelf,'Mat','gridoniceshelf'); -
issm/trunk/src/m/classes/public/mesh.m
r1 r1111 77 77 md.elementonsurface=ones(md.numberofelements,1); 78 78 79 %Now, build the connectivity tables for this mesh. 80 md.nodeconnectivity=NodeConnectivity(md.elements,md.numberofgrids); 81 md.elementconnectivity=ElementConnectivity(md.elements,md.nodeconnectivity); 82 79 83 %outline names 80 84 md.domainoutline=readfile(domainname); -
issm/trunk/src/m/classes/public/setelementstype.m
r387 r1111 127 127 128 128 %icefront for stokes 129 md.segmentonneumann_diag_stokes=md.segmentonneumann_diag(find(md.elements_type(md.segmentonneumann_diag(:,end),2)),:); 129 if ~isnan(md.segmentonneumann_diag), 130 md.segmentonneumann_diag_stokes=md.segmentonneumann_diag(find(md.elements_type(md.segmentonneumann_diag(:,end),2)),:); 131 end 130 132 131 133 %figure out solution types
Note:
See TracChangeset
for help on using the changeset viewer.