Changeset 21425


Ignore:
Timestamp:
11/29/16 00:48:00 (8 years ago)
Author:
aplach
Message:

hexagon.py+vilje.py: fixed issue with walltime requests greater than 24h; timestring=str(datetime.timedelta(minutes=self.time)) does not provide the right format of HH:MM:SS for requests greater than 24h

Location:
issm/trunk-jpl/src/m/classes/clusters
Files:
2 edited

Legend:

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

    r21415 r21425  
    9797                fid.write('#PBS -N %s \n' % shortname)
    9898                fid.write('#PBS -l mppwidth=%i,mppnppn=%i\n' % (self.np,self.procspernodes))
    99                 timestring= str(datetime.timedelta(minutes=self.time))
     99                timeobj=datetime.timedelta(minutes=self.time)
     100                m,s=divmod(timeobj.total_seconds(), 60)
     101                h,m=divmod(m, 60)
     102                timestring="%02d:%02d:%02d" % (h, m, s)
    100103                fid.write('#PBS -l walltime=%s\n' % timestring) #walltime is hh:mm:ss
    101104                fid.write('#PBS -l mppmem=%imb\n' % int(self.mem/self.procspernodes))
  • issm/trunk-jpl/src/m/classes/clusters/vilje.py

    r21415 r21425  
    9898                fid.write('#PBS -q %s \n' % self.queue)
    9999                fid.write('#PBS -l select=%i:ncpus=%i:mpiprocs=%s\n' % (self.numnodes,self.cpuspernode,self.procspernodes))
    100                 timestring= str(datetime.timedelta(minutes=self.time))
     100                timeobj=datetime.timedelta(minutes=self.time)
     101                m,s=divmod(timeobj.total_seconds(), 60)
     102                h,m=divmod(m, 60)
     103                timestring="%02d:%02d:%02d" % (h, m, s)
    101104                fid.write('#PBS -l walltime=%s\n' % timestring) #walltime is hh:mm:ss
    102105                #fid.write('#PBS -l mem=%igb\n' % self.mem)
Note: See TracChangeset for help on using the changeset viewer.