def _get_submit_arguments(self, jobnum, job_name, reqs, sandbox, stdout, stderr): def _time_str(secs): return '%02d:%02d:%02d' % (secs / 3600, (secs / 60) % 60, secs % 60) req_map = { WMS.MEMORY: ('h_vmem', lambda m: '%dM' % m), WMS.WALLTIME: ('s_rt', _time_str), WMS.CPUTIME: ('h_cpu', _time_str) } # Restart jobs = no params = ' -r n -notify' if self._project: params += ' -P %s' % self._project # Job requirements (queue, nodes) = (reqs.get(WMS.QUEUES, [''])[0], reqs.get(WMS.SITES)) if not nodes and queue: params += ' -q %s' % queue elif nodes and queue: params += ' -q %s' % str.join( ',', imap(lambda node: '%s@%s' % (queue, node), nodes)) elif nodes: raise ConfigError( 'Please also specify queue when selecting nodes!') return params + PBSGECommon._get_common_submit_arguments( self, jobnum, job_name, reqs, sandbox, stdout, stderr, req_map)
def _get_submit_arguments(self, jobnum, job_name, reqs, sandbox, stdout, stderr): req_map = {WMS.MEMORY: ('pvmem', lambda m: '%dmb' % m)} params = PBSGECommon._get_common_submit_arguments(self, jobnum, job_name, reqs, sandbox, stdout, stderr, req_map) # Job requirements if reqs.get(WMS.QUEUES): params += ' -q %s' % reqs[WMS.QUEUES][0] if reqs.get(WMS.SITES): params += ' -l host=%s' % str.join('+', reqs[WMS.SITES]) return params
def _get_submit_arguments(self, jobnum, job_name, reqs, sandbox, stdout, stderr): req_map = {WMS.MEMORY: ('pvmem', lambda m: '%dmb' % m)} params = PBSGECommon._get_common_submit_arguments( self, jobnum, job_name, reqs, sandbox, stdout, stderr, req_map) # Job requirements if reqs.get(WMS.QUEUES): params += ' -q %s' % reqs[WMS.QUEUES][0] if reqs.get(WMS.SITES): params += ' -l host=%s' % str.join('+', reqs[WMS.SITES]) return params
def _get_submit_arguments(self, jobnum, job_name, reqs, sandbox, stdout, stderr): def _time_str(secs): return '%02d:%02d:%02d' % (secs / 3600, (secs / 60) % 60, secs % 60) req_map = {WMS.MEMORY: ('h_vmem', lambda m: '%dM' % m), WMS.WALLTIME: ('s_rt', _time_str), WMS.CPUTIME: ('h_cpu', _time_str)} # Restart jobs = no params = ' -r n -notify' if self._project: params += ' -P %s' % self._project # Job requirements (queue, nodes) = (reqs.get(WMS.QUEUES, [''])[0], reqs.get(WMS.SITES)) if not nodes and queue: params += ' -q %s' % queue elif nodes and queue: params += ' -q %s' % str.join(',', imap(lambda node: '%s@%s' % (queue, node), nodes)) elif nodes: raise ConfigError('Please also specify queue when selecting nodes!') return params + PBSGECommon._get_common_submit_arguments(self, jobnum, job_name, reqs, sandbox, stdout, stderr, req_map)