Skip to content

Commit

Permalink
Add warning for AWS Batch mem request lower than 4 GB
Browse files Browse the repository at this point in the history
  • Loading branch information
pditommaso committed Nov 1, 2020
1 parent e590e0a commit e9240fc
Showing 1 changed file with 7 additions and 2 deletions.
Expand Up @@ -546,8 +546,13 @@ class AwsBatchTaskHandler extends TaskHandler implements BatchHandler<String,Job
def container = new ContainerOverrides()
container.command = getSubmitCommand()
// set the task memory
if( task.config.getMemory() )
container.memory = (int)task.config.getMemory().toMega()
if( task.config.getMemory() ) {
final mega = (int)task.config.getMemory().toMega()
if( mega >= 4 )
container.memory = mega
else
log.warn "Ignoring task $bean.name memory directive: ${task.config.getMemory()} -- AWS Batch job memory request cannot be lower than 4 MB"
}
// set the task cpus
if( task.config.getCpus() > 1 )
container.vcpus = task.config.getCpus()
Expand Down

0 comments on commit e9240fc

Please sign in to comment.