Skip to content

AWS Batch Fargate requires exact CPU values? #5781

Open
@Shians

Description

@Shians

When running wf-human-variation from ONT on AWSBatch Fargate, I get this error

ERROR ~ Error executing process > 'ingress:minimap2_alignment (1)'

Caused by:
  Requirement of 12 CPUs is not allowed by Fargate -- Check process with name 'ingress:minimap2_alignment (1)'

From what I can tell it's because the requested CPU value does not match one from the list found here:

static final Map<Integer, MemSlot> FARGATE_MEM = [1 : MemSlot.ofGiga(2,8,1),
2 : MemSlot.ofGiga(4, 16, 1),
4 : MemSlot.ofGiga(8, 30, 1),
8 : MemSlot.ofGiga(16,60, 4),
16: MemSlot.ofGiga(32, 120, 8) ]
protected long normaliseFargateMem(Integer cpus, MemoryUnit mem) {
final mega = mem.toMega()
final slot = FARGATE_MEM.get(cpus)
if( slot==null )
throw new ProcessUnrecoverableException("Requirement of $cpus CPUs is not allowed by Fargate -- Check process with name '${task.lazyName()}'")
if( mega <slot.min ) {
log.warn "Process '${task.lazyName()}' memory requirement of ${mem} is below the minimum allowed by Fargate of ${MemoryUnit.of(mega+'MB')}"
return slot.min
}
if( mega >slot.max ) {
log.warn "Process '${task.lazyName()}' memory requirement of ${mem} is above the maximum allowed by Fargate of ${MemoryUnit.of(mega+'MB')}"
return slot.max
}
return ceilDiv(mega, slot.step) * slot.step
}

It seems a bit restrictive to require specific CPU values, am I doing something wrong or is that in fact the case?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions