Changeset 23210


Ignore:
Timestamp:
09/04/18 06:14:48 (7 years ago)
Author:
bdef
Message:

BUG:updating Stallo cluster file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/classes/clusters/stallo.py

    r22270 r23210  
    1212except ImportError:
    1313        print 'You need stallo_settings.py to proceed, check presence and sys.path'
    14        
     14
    1515class stallo(object):
    1616        """
    1717        Stallo cluster class definition
    1818        This is a SLURM queue
    19         The priorities are given to: 
     19        The priorities are given to:
    2020           - Large jobs
    2121           - Short jobs
     
    2323
    2424        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
    2626
    2727           Usage:
     
    5353                self.np=self.numnodes*self.cpuspernode         
    5454        # }}}
    55        
     55
    5656        def __repr__(self):
    5757        # {{{
     
    104104                if isoceancoupling:
    105105                        executable='issm_ocean.exe'
    106                 #write queuing script 
     106                #write queuing script
    107107                shortname=modelname[0:min(12,len(modelname))]
    108108                fid=open(modelname+'.queue','w')
    109                                                                        
     109
    110110                fid.write('#!/bin/bash -l\n')
    111111                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
    116124                fid.write('#SBATCH --mem-per-cpu=%iGB\n' % self.mem)# mem is in GB
    117125                if (np.mod(self.np,16)+np.mod(self.np,20))==0:
    118126                        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)
    120128                fid.write('#SBATCH --output %s/%s/%s.outlog \n' % (self.executionpath,dirname,modelname))
    121129                fid.write('#SBATCH --error %s/%s/%s.errlog \n\n' % (self.executionpath,dirname,modelname))
Note: See TracChangeset for help on using the changeset viewer.