Skip to content

Commit

Permalink
Revert #4799 (#4800)
Browse files Browse the repository at this point in the history
  • Loading branch information
lecriste authored Mar 7, 2019
1 parent ae58c6e commit 3fd5972
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
1 change: 0 additions & 1 deletion src/python/CRABClient/ClientMapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
'eventsperlumi' : {'default': None, 'config': ['JobType.eventsPerLumi'], 'type': 'IntType', 'required': False},
'addoutputfiles' : {'default': [], 'config': ['JobType.outputFiles'], 'type': 'ListType', 'required': False},
'maxjobruntime' : {'default': 1250, 'config': ['JobType.maxJobRuntimeMin'], 'type': 'IntType', 'required': False},
'minAutomaticRuntimeMins' : {'default': 180, 'config': ['Data.unitsPerJob'], 'type': 'IntType', 'required': False},
'numcores' : {'default': 1, 'config': ['JobType.numCores'], 'type': 'IntType', 'required': False},
'maxmemory' : {'default': 2000, 'config': ['JobType.maxMemoryMB'], 'type': 'IntType', 'required': False},
'priority' : {'default': 10, 'config': ['JobType.priority'], 'type': 'IntType', 'required': False},
Expand Down
15 changes: 4 additions & 11 deletions src/python/CRABClient/Commands/submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,17 +192,13 @@ def validateConfig(self):
msg = "Invalid CRAB configuration: Parameter General.requestName should not be longer than %d characters." % (requestNameLenLimit)
return False, msg

splitting = getattr(self.configuration.Data, 'splitting', 'Automatic')
autoSplitt = True if splitting == 'Automatic' else False
autoSplittUnitsMin = parametersMapping['on-server']['minAutomaticRuntimeMins']['default']
autoSplittUnitsMax = 2700 # 45 hours
## Check that maxJobRuntimeMin is not used with Automatic splitting
if autoSplitt and hasattr(self.configuration.JobType, 'maxJobRuntimeMin'):
if getattr(self.configuration.Data, 'splitting', 'Automatic') == 'Automatic' and hasattr(self.configuration.JobType, 'maxJobRuntimeMin'):
msg = "The 'maxJobRuntimeMin' parameter is not compatible with the 'Automatic' splitting mode (default)."
return False, msg

## Check that --dryrun is not used with Automatic splitting
if autoSplitt and self.options.dryrun:
if getattr(self.configuration.Data, 'splitting', 'Automatic') == 'Automatic' and self.options.dryrun:
msg = "The 'dryrun' option is not compatible with the 'Automatic' splitting mode (default)."
return False, msg

Expand All @@ -216,12 +212,9 @@ def validateConfig(self):
if not int(self.configuration.Data.unitsPerJob) > 0:
msg = "Invalid CRAB configuration: Parameter Data.unitsPerJob must be > 0, not %s." % (self.configuration.Data.unitsPerJob)
return False, msg
if autoSplitt and (self.configuration.Data.unitsPerJob > autoSplittUnitsMax or self.configuration.Data.unitsPerJob < autoSplittUnitsMin):
msg = "Invalid CRAB configuration: In case of Automatic splitting, the Data.unitsPerJob parameter must be in the [%d, %d] minutes range. You asked for %d minutes." % (autoSplittUnitsMin, autoSplittUnitsMax, self.configuration.Data.unitsPerJob)
return False, msg
elif not autoSplitt:
elif getattr(self.configuration.Data, 'splitting', 'Automatic') != 'Automatic':
# The default value is only valid for automatic splitting!
msg = "Invalid CRAB configuration: Parameter Data.unitsPerJob is mandatory for '%s' splitting mode." % splitting
msg = "Invalid CRAB configuration: Parameter Data.unitsPerJob is missing."
return False, msg

## Check that JobType.pluginName and JobType.externalPluginFile are not both specified.
Expand Down

0 comments on commit 3fd5972

Please sign in to comment.