Changeset 25377
- Timestamp:
- 08/11/20 19:12:22 (5 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/clusters/maui.m
r25340 r25377 1 % PFEclass definition1 %MAUI class definition 2 2 % 3 3 % Usage: 4 % cluster= greenplanet();5 % cluster= greenplanet('np',3);6 % cluster= greenplanet('np',3,'login','username');4 % cluster=maui(); 5 % cluster=maui('np',3); 6 % cluster=maui('np',3,'login','username'); 7 7 8 classdef greenplanet8 classdef maui 9 9 properties (SetAccess=public) 10 10 % {{{ 11 name = ' greenplanet'11 name = 'maui' 12 12 login = ''; 13 13 numnodes = 20; 14 14 cpuspernode = 8; 15 15 port = 8000; 16 queue = 'c6145'; 16 projectaccount = ''; 17 partition = ''; 17 18 codepath = ''; 18 19 executionpath = ''; … … 23 24 %}}} 24 25 methods 25 function cluster= greenplanet(varargin) % {{{26 function cluster=maui(varargin) % {{{ 26 27 27 28 %initialize cluster using default settings if provided 28 if (exist(' greenplanet_settings')==2), greenplanet_settings; end29 if (exist('maui_settings')==2), maui_settings; end 29 30 30 31 %use provided options to change fields … … 41 42 disp(sprintf(' cpuspernode: %i',cluster.cpuspernode)); 42 43 disp(sprintf(' np: %i',cluster.cpuspernode*cluster.numnodes)); 43 disp(sprintf(' queue: %s',cluster.queue)); 44 disp(sprintf(' projectaccount: %s',cluster.projectaccount)); 45 disp(sprintf(' partition: %s',cluster.partition)); 44 46 disp(sprintf(' codepath: %s',cluster.codepath)); 45 47 disp(sprintf(' executionpath: %s',cluster.executionpath)); … … 56 58 function md = checkconsistency(cluster,md,solution,analyses) % {{{ 57 59 58 available_queues={' c6145','ilg2.3','default'};59 queue_requirements_time=[Inf Inf];60 queue_requirements_np=[80 80];60 available_queues={'large','long','prepost','bigmem','hugemem','gpu'}; 61 partition_requirements_time=[3*24*60 3*7*24*60 3*60 3*24*60 3*24*60 3*24*60]; 62 partition_requirements_np=[1024 720 4 72 64 4]; 61 63 62 QueueRequirements(available_ queues,queue_requirements_time,queue_requirements_np,cluster.queue,cluster.np,1)64 QueueRequirements(available_partitions,partition_requirements_time,partition_requirements_np,cluster.partition,cluster.np,1) 63 65 64 66 %Miscelaneous … … 66 68 if isempty(cluster.codepath), md = checkmessage(md,'codepath empty'); end 67 69 if isempty(cluster.executionpath), md = checkmessage(md,'executionpath empty'); end 68 69 70 end 70 71 %}}} 71 72 function BuildKrigingQueueScript(cluster,dirname,modelname,solution,io_gather,isvalgrind,isgprof,isdakota,isoceancoupling) % {{{ 72 73 if(isvalgrind), disp('valgrind not supported by cluster, ignoring...'); end 74 if(isgprof), disp('gprof not supported by cluster, ignoring...'); end 75 76 %write queuing script 77 fid=fopen([modelname '.queue'],'w'); 78 fprintf(fid,'#!/bin/bash\n'); 79 fprintf(fid,'#SBATCH --job-name=%s\n',modelname); 80 fprintf(fid,'#SBATCH -p %s \n',cluster.queue); 81 fprintf(fid,'#SBATCH -N %i -n %i\n',cluster.numnodes,cluster.cpuspernode); 82 fprintf(fid,'#SBATCH --time=%i\n',cluster.time*60); %walltime is in seconds. 83 fprintf(fid,'#SBATCH --mem-per-cpu=%igb\n',cluster.memory); 84 fprintf(fid,'#SBATCH -o %s.outlog \n',modelname); 85 fprintf(fid,'#SBATCH -e %s.errlog \n\n',modelname); 86 fprintf(fid,'export ISSM_DIR="%s/../"\n',cluster.codepath); %FIXME 87 fprintf(fid,'source $ISSM_DIR/etc/environment.sh\n'); %FIXME 88 fprintf(fid,'cd %s/%s\n\n',cluster.executionpath,dirname); 89 fprintf(fid,'mpiexec -np %i %s/kriging.exe %s %s\n',cluster.np,cluster.codepath,[cluster.executionpath '/' modelname],modelname); 90 if ~io_gather, %concatenate the output files: 91 fprintf(fid,'cat %s.outbin.* > %s.outbin',modelname,modelname); 92 end 93 fclose(fid); 73 error('not implemented yet'); 94 74 end 95 75 %}}} … … 103 83 fprintf(fid,'#!/bin/bash\n'); 104 84 fprintf(fid,'#SBATCH --job-name=%s\n',modelname); 105 fprintf(fid,'#SBATCH - p %s \n',cluster.queue);85 fprintf(fid,'#SBATCH --account=%s \n',cluster.projectaccount); 106 86 fprintf(fid,'#SBATCH -N %i -n %i\n',cluster.numnodes,cluster.cpuspernode); 107 87 fprintf(fid,'#SBATCH --time=%i\n',cluster.time*60); %walltime is in seconds.
Note:
See TracChangeset
for help on using the changeset viewer.