Changeset 26744 for issm/trunk/src/m/classes/clusters/pfe.m
- Timestamp:
- 12/22/21 10:39:44 (3 years ago)
- Location:
- issm/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk
- Property svn:mergeinfo changed
/issm/trunk-jpl merged: 25837-25866,25868-25993,25995-26330,26332-26733,26736-26739,26741
- Property svn:mergeinfo changed
-
issm/trunk/src
- Property svn:mergeinfo changed
-
issm/trunk/src/m/classes/clusters/pfe.m
r25836 r26744 1 %PFE cl ass definition1 %PFE cluster class definition 2 2 % 3 3 % Usage: … … 7 7 8 8 classdef pfe 9 properties (SetAccess=public) 9 properties (SetAccess=public) 10 10 % {{{ 11 11 name = 'pfe' 12 12 login = ''; 13 modules = {'comp-intel/2016.2.181' 'mp i-sgi/mpt'};13 modules = {'comp-intel/2016.2.181' 'mpt'}; 14 14 numnodes = 20; 15 15 cpuspernode = 8; … … 21 21 codepath = ''; 22 22 executionpath = ''; 23 grouplist = 's1690';23 grouplist = ''; 24 24 interactive = 0; 25 25 bbftp = 0; … … 39 39 %}}} 40 40 function disp(cluster) % {{{ 41 % 41 % display the object 42 42 disp(sprintf('class ''%s'' object ''%s'' = ',class(cluster),inputname(1))); 43 43 disp(sprintf(' name: %s',cluster.name)); 44 44 disp(sprintf(' login: %s',cluster.login)); 45 modules=''; for i=1:length(cluster.modules), modules=[modules cluster.modules{i} ',']; end; modules=modules(1:end-1); 46 disp(sprintf(' modules: %s',modules)); 45 disp(sprintf(' modules: %s',strjoin(cluster.modules,', '))); 46 disp(sprintf(' numnodes: %s',cluster.numnodes)); 47 disp(sprintf(' cpuspernode: %s',cluster.cpuspernode)); 48 disp(sprintf(' np: %i',cluster.nprocs())); 47 49 disp(sprintf(' port: %i',cluster.port)); 48 disp(sprintf(' numnodes: %i',cluster.numnodes)); 49 disp(sprintf(' cpuspernode: %i',cluster.cpuspernode)); 50 disp(sprintf(' np: %i',cluster.cpuspernode*cluster.numnodes)); 51 disp(sprintf(' queue: %s',cluster.queue)); 50 disp(sprintf(' queue: %i',cluster.queue)); 52 51 disp(sprintf(' time: %i',cluster.time)); 53 disp(sprintf(' processor: % s',cluster.processor));54 disp(sprintf(' srcpath: %s ($ISSM_DIR on pfe)',cluster.srcpath));55 disp(sprintf(' codepath: %s ($ISSM_DIR/bin on pfe)',cluster.codepath));56 disp(sprintf(' executionpath: %s (directory containing issm.exe on pfe)',cluster.executionpath));52 disp(sprintf(' processor: %i',cluster.processor)); 53 disp(sprintf(' srcpath: %s',cluster.srcpath)); 54 disp(sprintf(' codepath: %s',cluster.codepath)); 55 disp(sprintf(' executionpath: %s',cluster.executionpath)); 57 56 disp(sprintf(' grouplist: %s',cluster.grouplist)); 58 disp(sprintf(' interactive: %i',cluster.interactive)); 59 disp(sprintf(' hyperthreading: %i',cluster.hyperthreading)); 60 end 61 %}}} 62 function numprocs=np(cluster) % {{{ 57 disp(sprintf(' interactive: %s',cluster.interactive)); 58 disp(sprintf(' bbftp: %s',cluster.bbftp)); 59 disp(sprintf(' numstreams: %s',cluster.numstreams)); 60 disp(sprintf(' hyperthreading: %s',cluster.hyperthreading)); 61 end 62 %}}} 63 function numprocs=nprocs(cluster) % {{{ 63 64 %compute number of processors 64 65 numprocs=cluster.numnodes*cluster.cpuspernode; … … 71 72 queue_requirements_np=[2048 2048 150 150 2048]; 72 73 73 QueueRequirements(available_queues,queue_requirements_time,queue_requirements_np,cluster.queue,cluster.np ,cluster.time)74 QueueRequirements(available_queues,queue_requirements_time,queue_requirements_np,cluster.queue,cluster.nprocs(),cluster.time) 74 75 75 76 %now, check cluster.cpuspernode according to processor type … … 128 129 129 130 else 130 md = checkmessage(md,'unknown processor type, should be ''bro'' or ''has'' or ''ivy'' or ''san''or ''cas_ait''');131 md = checkmessage(md,'unknown processor type, should be ''bro'', ''has'', ''ivy'', ''san'', or ''cas_ait'''); 131 132 end 132 133 … … 161 162 fprintf(fid,'#PBS -l select=%i:ncpus=%i:model=%s\n',cluster.numnodes,cluster.cpuspernode,cluster.processor); 162 163 fprintf(fid,'#PBS -l walltime=%i\n',cluster.time*60); %walltime is in seconds. 163 fprintf(fid,'#PBS -q %s 164 fprintf(fid,'#PBS -q %s\n',cluster.queue); 164 165 fprintf(fid,'#PBS -W group_list=%s\n',cluster.grouplist); 165 166 fprintf(fid,'#PBS -m e\n'); 166 fprintf(fid,'#PBS -o %s .outlog \n',[cluster.executionpath '/' dirname '/' modelname]);167 fprintf(fid,'#PBS -e %s .errlog \n\n',[cluster.executionpath '/' dirname '/' modelname]);167 fprintf(fid,'#PBS -o %s/%s/%s.outlog \n',cluster.executionpath,dirname,modelname); 168 fprintf(fid,'#PBS -e %s/%s/%s.errlog \n\n',cluster.executionpath,dirname,modelname); 168 169 fprintf(fid,'. /usr/share/modules/init/bash\n\n'); 169 170 for i=1:numel(cluster.modules), fprintf(fid,['module load ' cluster.modules{i} '\n']); end … … 176 177 fprintf(fid,'cd %s/%s/\n\n',cluster.executionpath,dirname); 177 178 if ~isvalgrind, 178 fprintf(fid,'/u/scicon/tools/bin/ several_tries mpiexec -np %i /u/scicon/tools/bin/mbind.x -cs -n%i %s/%s %s %s %s\n',cluster.np,cluster.cpuspernode,cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname);179 else 180 fprintf(fid,'mpiexec -np %i valgrind --leak-check=full %s/%s %s %s %s\n',cluster.np ,cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname);179 fprintf(fid,'/u/scicon/tools/bin/toss3/several_tries mpiexec -np %i %s/%s %s %s/%s %s\n',cluster.nprocs(),cluster.codepath,executable,solution,cluster.executionpath,dirname,modelname); 180 else 181 fprintf(fid,'mpiexec -np %i valgrind --leak-check=full %s/%s %s %s %s\n',cluster.nprocs(),cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname); 181 182 end 182 183 if ~io_gather, %concatenate the output files: … … 190 191 if cluster.interactive==10, 191 192 fprintf(fid,'module unload mpi-mvapich2/1.4.1/gcc\n'); 192 fprintf(fid,'mpiexec -np %i %s/%s %s %s %s\n',cluster.np ,cluster.codepath,executable,solution,[pwd() '/run'],modelname);193 fprintf(fid,'mpiexec -np %i %s/%s %s %s %s\n',cluster.nprocs(),cluster.codepath,executable,solution,[pwd() '/run'],modelname); 193 194 else 194 195 if ~isvalgrind, 195 fprintf(fid,'mpiexec -np %i %s/%s %s %s %s\n',cluster.np ,cluster.codepath,executable,solution,[cluster.executionpath '/Interactive' num2str(cluster.interactive)],modelname);196 fprintf(fid,'mpiexec -np %i %s/%s %s %s %s\n',cluster.nprocs(),cluster.codepath,executable,solution,[cluster.executionpath '/Interactive' num2str(cluster.interactive)],modelname); 196 197 else 197 fprintf(fid,'mpiexec -np %i valgrind --leak-check=full %s/%s %s %s %s\n',cluster.np ,cluster.codepath,executable,solution,[cluster.executionpath '/Interactive' num2str(cluster.interactive)],modelname);198 fprintf(fid,'mpiexec -np %i valgrind --leak-check=full %s/%s %s %s %s\n',cluster.nprocs(),cluster.codepath,executable,solution,[cluster.executionpath '/Interactive' num2str(cluster.interactive)],modelname); 198 199 end 199 200 end … … 214 215 215 216 %what is the executable being called? 216 executable='issm_sl r.exe';217 218 if ispc (), error('BuildQueueScriptMultipleModels not support yet on windows machines');end;217 executable='issm_slc.exe'; 218 219 if ispc & ~ismingw, error('BuildQueueScriptMultipleModels not support yet on windows machines');end; 219 220 220 221 %write queuing script … … 318 319 fprintf(fid,'export MPI_GROUP_MAX=64\n\n'); 319 320 fprintf(fid,'cd %s/%s/\n\n',cluster.executionpath,modelname); 320 fprintf(fid,'mpiexec -np %i %s/kriging.exe %s %s\n',cluster.np ,cluster.codepath,[cluster.executionpath '/' modelname],modelname); %FIXME321 fprintf(fid,'mpiexec -np %i %s/kriging.exe %s %s\n',cluster.nprocs(),cluster.codepath,[cluster.executionpath '/' modelname],modelname); %FIXME 321 322 if ~io_gather, %concatenate the output files: 322 323 fprintf(fid,'cat %s.outbin.* > %s.outbin',modelname,modelname); … … 328 329 fid=fopen([modelname '.run'],'w'); 329 330 if ~isvalgrind, 330 fprintf(fid,'mpiexec -np %i %s/kriging.exe %s %s\n',cluster.np ,cluster.codepath,[cluster.executionpath '/' modelname],modelname);331 else 332 fprintf(fid,'mpiexec -np %i valgrind --leak-check=full %s/kriging.exe %s %s\n',cluster.np ,cluster.codepath,[cluster.executionpath '/' modelname],modelname);331 fprintf(fid,'mpiexec -np %i %s/kriging.exe %s %s\n',cluster.nprocs(),cluster.codepath,[cluster.executionpath '/' modelname],modelname); 332 else 333 fprintf(fid,'mpiexec -np %i valgrind --leak-check=full %s/kriging.exe %s %s\n',cluster.nprocs(),cluster.codepath,[cluster.executionpath '/' modelname],modelname); 333 334 end 334 335 if ~io_gather, %concatenate the output files: … … 382 383 383 384 end %}}} 384 function UploadQueueJob(cluster,modelname,dirname,filelist) % {{{385 function UploadQueueJob(cluster,modelname,dirname,filelist) % {{{ 385 386 386 387 %compress the files into one zip. 387 compressstring=['tar -zcf ' dirname '.tar.gz 388 compressstring=['tar -zcf ' dirname '.tar.gz']; 388 389 for i=1:numel(filelist), 389 390 compressstring = [compressstring ' ' filelist{i}]; … … 403 404 end 404 405 405 if ~cluster.bbftp, 406 if cluster.bbftp, 407 issmbbftpout(cluster.name,directory,cluster.login,cluster.port,cluster.numstreams,{[dirname '.tar.gz']}); 408 else 406 409 issmscpout(cluster.name,directory,cluster.login,cluster.port,{[dirname '.tar.gz']}); 407 else 408 issmbbftpout(cluster.name,directory,cluster.login,cluster.port,cluster.numstreams,{[dirname '.tar.gz']}); 409 end 410 411 end 412 %}}} 413 function LaunchQueueJob(cluster,modelname,dirname,filelist,restart,batch)% {{{ 414 415 %lauch command, to be executed via ssh 416 if ~cluster.interactive, 417 if ~isempty(restart) 418 launchcommand=['cd ' cluster.executionpath ' && cd ' dirname ' && qsub ' modelname '.queue ']; 419 else 420 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ... 421 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz && qsub ' modelname '.queue ']; 422 end 423 else 410 end 411 412 end 413 %}}} 414 function LaunchQueueJob(cluster,modelname,dirname,filelist,restart,batch) % {{{ 415 416 %launch command, to be executed via ssh 417 if cluster.interactive, 424 418 if ~isempty(restart) 425 419 launchcommand=['cd ' cluster.executionpath '/Interactive' num2str(cluster.interactive)]; … … 431 425 end 432 426 end 427 else 428 if ~isempty(restart) 429 launchcommand=['cd ' cluster.executionpath ' && cd ' dirname ' && qsub ' modelname '.queue ']; 430 else 431 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ... 432 ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz && qsub ' modelname '.queue ']; 433 end 433 434 end 434 435 … … 437 438 end 438 439 %}}} 439 function Download(cluster,dirname,filelist) % {{{440 function Download(cluster,dirname,filelist) % {{{ 440 441 441 442 %copy files from cluster to current directory … … 448 449 end 449 450 450 if ~cluster.bbftp, 451 if cluster.bbftp, 452 issmbbftpin(cluster.name, cluster.login, cluster.port, cluster.numstreams, directory, filelist); 453 else 451 454 issmscpin(cluster.name,cluster.login,cluster.port,directory,filelist); 452 else453 issmbbftpin(cluster.name, cluster.login, cluster.port, cluster.numstreams, directory, filelist);454 455 end 455 456
Note:
See TracChangeset
for help on using the changeset viewer.