Changeset 23210
- Timestamp:
- 09/04/18 06:14:48 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/clusters/stallo.py
r22270 r23210 12 12 except ImportError: 13 13 print 'You need stallo_settings.py to proceed, check presence and sys.path' 14 14 15 15 class stallo(object): 16 16 """ 17 17 Stallo cluster class definition 18 18 This is a SLURM queue 19 The priorities are given to: 19 The priorities are given to: 20 20 - Large jobs 21 21 - Short jobs … … 23 23 24 24 There are some 20cpu nodes and 16cpu nodes, with 32GB (a few with 128GB) mem per node, you can ask for part of a node if you need more memory.(1 node, 2 CPUS and 10GB per cpu for example) 25 25 26 26 27 27 Usage: … … 53 53 self.np=self.numnodes*self.cpuspernode 54 54 # }}} 55 55 56 56 def __repr__(self): 57 57 # {{{ … … 104 104 if isoceancoupling: 105 105 executable='issm_ocean.exe' 106 #write queuing script 106 #write queuing script 107 107 shortname=modelname[0:min(12,len(modelname))] 108 108 fid=open(modelname+'.queue','w') 109 109 110 110 fid.write('#!/bin/bash -l\n') 111 111 fid.write('#SBATCH --job-name=%s \n' % shortname) 112 fid.write('#SBATCH --partition %s \n' % self.queue) 113 fid.write('#SBATCH --nodes=%i' % self.numnodes) 114 fid.write('#SBATCH --ntasks-per-nodes==%i \n' % self.cpuspernode) 115 fid.write('#SBATCH --time=%s\n' % self.time) #walltime is minutes 112 if self.queue=='devel': 113 fid.write('#SBATCH --qos %s \n' % self.queue) 114 else: 115 fid.write('#SBATCH --partition %s \n' % self.queue) 116 fid.write('#SBATCH --nodes=%i \n' % self.numnodes) 117 fid.write('#SBATCH --ntasks-per-node=%i \n' % self.cpuspernode) 118 timeobj=datetime.timedelta(minutes=self.time) 119 m,s=divmod(timeobj.total_seconds(), 60) 120 h,m=divmod(m, 60) 121 d,h=divmod(h, 60) 122 timestring="%02d-%02d:%02d:%02d" % (d, h, m, s) 123 fid.write('#SBATCH --time=%s\n' % timestring) #walltime is minutes 116 124 fid.write('#SBATCH --mem-per-cpu=%iGB\n' % self.mem)# mem is in GB 117 125 if (np.mod(self.np,16)+np.mod(self.np,20))==0: 118 126 fid.write('#SBATCH --ntask=%i\n' % self.np) 119 fid.write('#SBATCH --account=%s\n' % self.accountname) 127 fid.write('#SBATCH --account=%s\n' % self.accountname) 120 128 fid.write('#SBATCH --output %s/%s/%s.outlog \n' % (self.executionpath,dirname,modelname)) 121 129 fid.write('#SBATCH --error %s/%s/%s.errlog \n\n' % (self.executionpath,dirname,modelname))
Note:
See TracChangeset
for help on using the changeset viewer.