Skip to content

Commit 3e4e32d

Browse files
author
Souheil Inati
committed
Changes to PBS pipeline plugin. Added a maximum length to the jobname, using a default value of 15 corresponding to the Torque maximum. Modified the config file to do a local hash check by default.
1 parent 97f3050 commit 3e4e32d

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

doc/users/config_file.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Execution
9595
Perform the hash check on the job submission machine. This option minimizes
9696
the number of jobs submitted to a cluster engine or a multiprocessing pool
9797
to only those that need to be rerun. (possible values: ``true`` and
98-
``false``; default value: ``false``)
98+
``false``; default value: ``true``)
9999

100100
*job_finished_timeout*
101101
When batch jobs are submitted through, SGE/PBS/Condor they could be killed

nipype/pipeline/plugins/pbs.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class PBSPlugin(SGELikeBatchManagerBase):
1919
- template : template to use for batch job submission
2020
- qsub_args : arguments to be prepended to the job execution script in the
2121
qsub call
22+
- max_jobname_len: maximum length of the job name. Default 15.
2223
2324
"""
2425

@@ -28,11 +29,14 @@ def __init__(self, **kwargs):
2829
"""
2930
self._retry_timeout = 2
3031
self._max_tries = 2
32+
self._max_jobname_length = 15
3133
if 'plugin_args' in kwargs and kwargs['plugin_args']:
3234
if 'retry_timeout' in kwargs['plugin_args']:
3335
self._retry_timeout = kwargs['plugin_args']['retry_timeout']
3436
if 'max_tries' in kwargs['plugin_args']:
3537
self._max_tries = kwargs['plugin_args']['max_tries']
38+
if 'max_jobname_len' in kwargs['plugin_args']:
39+
self._max_jobname_len = kwargs['plugin_args']['max_jobname_len']
3640
super(PBSPlugin, self).__init__(template, **kwargs)
3741

3842
def _is_pending(self, taskid):
@@ -71,6 +75,7 @@ def _submit_batchtask(self, scriptfile, node):
7175
jobnameitems = jobname.split('.')
7276
jobnameitems.reverse()
7377
jobname = '.'.join(jobnameitems)
78+
jobname = jobname[0:self._max_jobname_len]
7479
cmd.inputs.args = '%s -N %s %s' % (qsubargs,
7580
jobname,
7681
scriptfile)

nipype/utils/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
hash_method = timestamp
3737
job_finished_timeout = 5
3838
keep_inputs = false
39-
local_hash_check = false
39+
local_hash_check = true
4040
matplotlib_backend = Agg
4141
plugin = Linear
4242
remove_node_directories = false

0 commit comments

Comments
 (0)