Changeset 20784
- Timestamp:
- 06/20/16 23:46:17 (9 years ago)
- Location:
- issm/trunk-jpl/src/m/classes/clusters
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/clusters/vilje.m
r20316 r20784 9 9 properties (SetAccess=public) 10 10 % {{{ 11 11 name = 'vilje'; 12 12 login = ''; 13 13 numnodes = 2; 14 14 cpuspernode = 32; 15 16 15 procspernodes = 16; 16 mem = 28; 17 17 queue = 'workq'; 18 18 time = 2*60; … … 20 20 executionpath = ''; 21 21 interactive = 0; 22 port = []; 23 accountname = ''; 24 22 port = []; 23 accountname = ''; 25 24 26 25 end … … 44 43 disp(sprintf(' name: %s',cluster.name)); 45 44 disp(sprintf(' login: %s',cluster.login)); 46 45 disp(sprintf(' accountname: %s',cluster.accountname)); 47 46 disp(sprintf(' numnodes: %i',cluster.numnodes)); 48 47 disp(sprintf(' cpuspernode: %i',cluster.cpuspernode)); 49 disp(sprintf(' np: %i', ... 50 cluster.cpuspernode*cluster.numnodes)); 48 disp(sprintf(' np: %i', cluster.cpuspernode*cluster.numnodes)); 51 49 disp(sprintf(' procspernodes: %i',cluster.procspernodes)); 52 50 disp(sprintf(' queue: %s',cluster.queue)); … … 68 66 %Miscelaneous 69 67 if isempty(cluster.login), md = checkmessage(md,'login empty'); end 70 68 if isempty(cluster.accountname), md = checkmessage(md,'accountname empty'); end 71 69 if isempty(cluster.codepath), md = checkmessage(md,'codepath empty'); end 72 70 if isempty(cluster.executionpath), md = checkmessage(md,'executionpath empty'); end … … 86 84 fprintf(fid,'#PBS -S /bin/bash\n'); 87 85 fprintf(fid,'#PBS -N %s\n',modelname); 88 fprintf(fid,'#PBS -l select=%i:ncpus=%i:mpiprocs=%i\n',cluster.numnodes,cluster.cpuspernode,16); 89 fprintf(fid,'#PBS -l walltime=%s\n',cluster.time); %walltime is in seconds. 90 fprintf(fid,'#PBS -A %s\n',cluster.accountname); 91 % fprintf(fid,'#PBS -q %s \n',cluster.queue); 92 % fprintf(fid,'#PBS -l mem=%igb\n',cluster.memory); 93 % fprintf(fid,'#PBS -M mmorligh@uci.edu\n'); 86 fprintf(fid,'#PBS -l select=%i:ncpus=%i:mpiprocs=%i\n',cluster.numnodes,cluster.cpuspernode,16); 87 fprintf(fid,'#PBS -l walltime=%s\n',cluster.time); %walltime is in seconds. 88 fprintf(fid,'#PBS -A %s\n',cluster.accountname); 94 89 fprintf(fid,'#PBS -o %s.outlog \n',modelname); 95 90 fprintf(fid,'#PBS -e %s.errlog \n\n',modelname); … … 118 113 119 114 %compute number of processors 120 cluster.np=cluster.numnodes*cluster.cpuspernode; 121 122 123 shortname = substring(modelname,1,min(12,length(modelname))); 115 cluster.np=cluster.numnodes*cluster.cpuspernode; 116 shortname = substring(modelname,1,min(12,length(modelname))); 124 117 125 118 %write queuing script … … 128 121 fprintf(fid,'#PBS -N %s\n',shortname); 129 122 fprintf(fid,'#PBS -q %s \n',cluster.queue); 130 123 fprintf(fid,'#PBS -l select=%i:ncpus=%i:mpiprocs=%i\n',cluster.numnodes,cluster.cpuspernode,cluster.procspernodes); 131 124 fprintf(fid,'#PBS -l walltime=%s\n',duration(0,cluster.time,0)); %walltime is in minutes. 132 125 fprintf(fid,'#PBS -A %s\n',cluster.accountname); 133 126 fprintf(fid,'#PBS -o %s.outlog \n',[cluster.executionpath '/' dirname '/' modelname]); 134 127 fprintf(fid,'#PBS -e %s.errlog \n\n',[cluster.executionpath '/' dirname '/' modelname]); 135 128 fprintf(fid,'export ISSM_DIR="%s/../"\n',cluster.codepath); %FIXME 136 129 fprintf(fid,'source $ISSM_DIR/etc/environment.sh\n'); %FIXME 137 fprintf(fid,'cd %s/%s\n\n', ... 138 cluster.executionpath,dirname); 139 fprintf(fid,'mpiexec -np %i %s/%s %s %s %s\n',cluster.np,cluster.codepath,executable,EnumToString(solution),[cluster.executionpath '/' dirname],modelname); 130 fprintf(fid,'cd %s/%s\n\n',cluster.executionpath,dirname); 131 fprintf(fid,'mpiexec -np %i %s/%s %s %s %s\n',cluster.np,cluster.codepath,executable,EnumToString(solution),[cluster.executionpath '/' dirname],modelname); 140 132 141 133 if ~io_gather, %concatenate the output files: … … 167 159 compressstring = [compressstring ' ' filelist{i}]; 168 160 end 169 170 161 system(compressstring); 171 172 162 disp('uploading input file and queueing script'); 173 174 163 directory=cluster.executionpath; 175 176 issmbbftpout(cluster.name,directory, ... 177 cluster.login,cluster.port,cluster.numstreams,{[dirname '.tar.gz']}); 164 issmbbftpout(cluster.name,directory,cluster.login,cluster.port,cluster.numstreams,{[dirname '.tar.gz']}); 178 165 179 166 end … … 188 175 issmssh(cluster.name,cluster.login,cluster.port,launchcommand); 189 176 end %}}} 177 190 178 function Download(cluster,dirname,filelist)% {{{ 191 179 -
issm/trunk-jpl/src/m/classes/clusters/vilje.py
r20301 r20784 27 27 self.numnodes = 2 28 28 self.cpuspernode = 32 29 30 29 self.procspernodes = 16 30 self.mem = 28 31 31 self.queue = 'workq' 32 32 self.time = 2*60 … … 34 34 self.executionpath = '' 35 35 self.interactive = 0 36 37 36 self.port = [] 37 self.accountname = '' 38 38 39 39 #use provided options to change fields … … 95 95 96 96 #write queuing script 97 97 shortname=modelname[0:min(12,len(modelname))] 98 98 fid=open(modelname+'.queue','w') 99 99 fid.write('#PBS -S /bin/bash\n') … … 107 107 fid.write('#PBS -o %s/%s/%s.outlog \n' % (self.executionpath,dirname,modelname)) 108 108 fid.write('#PBS -e %s/%s/%s.errlog \n\n' % (self.executionpath,dirname,modelname)) 109 fid.write('export PATH="$PATH:."\n\n')110 fid.write('export MPI_GROUP_MAX=64\n\n')111 109 fid.write('export ISSM_DIR="%s/../"\n' % self.codepath) 112 110 fid.write('source $ISSM_DIR/etc/environment.sh\n') … … 117 115 # }}} 118 116 def UploadQueueJob(self,modelname,dirname,filelist): 119 117 # {{{ 120 118 121 119 #compress the files into one zip. 122 120 compressstring='tar -zcf %s.tar.gz ' % dirname 123 121 for file in filelist: 124 122 compressstring += ' %s' % file 125 123 subprocess.call(compressstring,shell=True) 126 124 … … 130 128 # }}} 131 129 def LaunchQueueJob(self,modelname,dirname,filelist,restart,batch): 132 130 # {{{ 133 131 134 132 print 'launching solution sequence on remote cluster'
Note:
See TracChangeset
for help on using the changeset viewer.