diff --git a/plugins/nf-amazon/src/main/nextflow/cloud/aws/batch/AwsContainerOptionsMapper.groovy b/plugins/nf-amazon/src/main/nextflow/cloud/aws/batch/AwsContainerOptionsMapper.groovy index 8a35732c33..a4e628834c 100644 --- a/plugins/nf-amazon/src/main/nextflow/cloud/aws/batch/AwsContainerOptionsMapper.groovy +++ b/plugins/nf-amazon/src/main/nextflow/cloud/aws/batch/AwsContainerOptionsMapper.groovy @@ -22,6 +22,7 @@ import com.amazonaws.services.batch.model.Tmpfs import com.amazonaws.services.batch.model.Ulimit import groovy.transform.CompileStatic import nextflow.util.CmdLineOptionMap +import nextflow.util.MemoryUnit /** * Maps task container options to AWS container properties @@ -106,7 +107,8 @@ class AwsContainerOptionsMapper { // shared Memory Size def value = findOptionWithSingleValue(options, 'shm-size') if ( value ) { - params.setSharedMemorySize(value as Integer) + MemoryUnit sharedMemorySize = (value as MemoryUnit) + params.setSharedMemorySize(sharedMemorySize.mega as Integer) atLeastOneSet = true } @@ -156,6 +158,7 @@ class AwsContainerOptionsMapper { * @return the value, if any, or empty */ protected static String findOptionWithSingleValue(CmdLineOptionMap options, String name) { + println "Inside findOptionWithSingleValue looking for $name in $options" options.getFirstValueOrDefault(name,null) as String }