Skip to content

Commit

Permalink
More robust parsing of shm-size containerOptions
Browse files Browse the repository at this point in the history
This commit ensures that the `shm-size` option is correctly parsed from the containerOptions. This is necessary to ensure that the correct value in MiB is passed to the AWS Batch API when creating a job definition.

Signed-off-by: Rob Syme <rob.syme@gmail.com>
  • Loading branch information
robsyme committed Jul 26, 2024
1 parent bc2fb40 commit b8fa1ad
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit b8fa1ad

Please sign in to comment.