Skip to content

Commit bf347bd

Browse files
deprecate numcores option (#5373)
* deprecate numcores option * numcores only to be removed from resubmit, not completely
1 parent 88608f9 commit bf347bd

File tree

2 files changed

+6
-18
lines changed

2 files changed

+6
-18
lines changed

etc/crab-bash-completion.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ _UseCrab ()
257257
"resubmit")
258258
case "$cur" in
259259
-*)
260-
COMPREPLY=( $(compgen -W '--help -h --force --publication --jobids --sitewhitelist --siteblacklist --maxjobruntime --maxmemory --numcores --priority --proxy --dir -d --task --instance' -- $cur) )
260+
COMPREPLY=( $(compgen -W '--help -h --force --publication --jobids --sitewhitelist --siteblacklist --maxjobruntime --maxmemory --priority --proxy --dir -d --task --instance' -- $cur) )
261261
;;
262262
*)
263263
COMPREPLY=( $(compgen -f $cur) )

src/python/CRABClient/Commands/resubmit.py

+5-17
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,9 @@ def getQueryParams(self):
183183
## For 'jobids', 'sitewhitelist' and 'siteblacklist', attr_value is either a list of strings or None.
184184
if attr_value is not None:
185185
configreq[attr_name] = attr_value
186-
for attr_name in ['maxjobruntime', 'maxmemory', 'numcores', 'priority']:
186+
for attr_name in ['maxjobruntime', 'maxmemory', 'priority']:
187187
attr_value = getattr(self.options, attr_name)
188-
## For 'maxjobruntime', 'maxmemory', 'numcores', and 'priority', attr_value is either an integer or None.
188+
## For 'maxjobruntime', 'maxmemory', and 'priority', attr_value is either an integer or None.
189189
if attr_value is not None:
190190
configreq[attr_name] = attr_value
191191

@@ -231,13 +231,6 @@ def setOptions(self):
231231
help="Set the maximum memory (in MB) used per job in this task." + \
232232
" Default is 2000.")
233233

234-
self.parser.add_option('--numcores',
235-
dest='numcores',
236-
default=None,
237-
type='int',
238-
help="Set the number of cores used per job in this task." + \
239-
" (e.g.: 1 for single-threaded applications).")
240-
241234
self.parser.add_option('--priority',
242235
dest='priority',
243236
default=None,
@@ -272,9 +265,9 @@ def validateOptions(self):
272265
if self.options.publication:
273266
if self.options.sitewhitelist is not None or self.options.siteblacklist is not None or \
274267
self.options.maxjobruntime is not None or self.options.maxmemory is not None or \
275-
self.options.numcores is not None or self.options.priority is not None:
268+
self.options.priority is not None:
276269
msg = "The options --sitewhitelist, --siteblacklist,"
277-
msg += " --maxjobruntime, --maxmemory, --numcores and --priority"
270+
msg += " --maxjobruntime, --maxmemory and --priority"
278271
msg += " can not be specified together with the option --publication."
279272
msg += " The last option is to only resubmit (failed) publications,"
280273
msg += " in which case all of the first options make no sense."
@@ -310,7 +303,7 @@ def validateOptions(self):
310303

311304
## Covention used for the job parameters that the user can set when doing job
312305
## resubmission (i.e. siteblacklist, sitewhitelist, maxjobruntime, maxmemory,
313-
## numcores and priority):
306+
## and priority):
314307
## - If the user doesn't set a parameter we don't pass it to the server and the
315308
## the server copies the original value the parameter had at task submission.
316309
## It copies it from the Task DB. Therefore we need to keep these parameters
@@ -354,11 +347,6 @@ def validateOptions(self):
354347
msg = "The requested per-job memory (%d MB) must be between 30 and 30720 MB." % (self.options.maxmemory)
355348
raise ConfigurationException(msg)
356349

357-
if self.options.numcores is not None:
358-
if self.options.numcores < 1 or self.options.numcores > 128:
359-
msg = "The requested number of cores (%d) must be between 1 and 128." % (self.options.numcores)
360-
raise ConfigurationException(msg)
361-
362350
if self.options.priority is not None:
363351
if self.options.priority < 1:
364352
msg = "The requested priority (%d) must be greater than 0." % (self.options.priority)

0 commit comments

Comments
 (0)