Skip to content

Commit

Permalink
Add disk labels (#390)
Browse files Browse the repository at this point in the history
* Add disk labels

* Set disk label denoising

* set disk storage to memory

* remove disk label

* refactor config

* Update src/wf_utils/labels_tw.config

---------

Co-authored-by: Robrecht Cannoodt <[email protected]>
  • Loading branch information
KaiWaldrant and rcannood authored Mar 13, 2024
1 parent 2201492 commit ee79ec8
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/tasks/denoising/methods/alra/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ platforms:
github: KlugerLab/ALRA
- type: nextflow
directives:
label: [ "midtime", highmem, highcpu ]
label: [ midtime, highmem, highcpu]
2 changes: 1 addition & 1 deletion src/tasks/denoising/methods/knn_smoothing/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ platforms:
- scottgigante-immunai/knn-smoothing@python_package
- type: nextflow
directives:
label: [ "midtime", highmem, highcpu ]
label: [ midtime, highmem, highcpu ]
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ platforms:
bioc: [ SingleCellExperiment, NewWave ]
- type: nextflow
directives:
label: [ "midtime", highmem, highcpu ]
label: [ midtime, highmem, highcpu ]
19 changes: 16 additions & 3 deletions src/wf_utils/labels_tw.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
process {
executor = 'awsbatch'

// Default disk space
disk = 50.GB

// Retry for exit codes that have something to do with memory issues
errorStrategy = { task.attempt < 3 && task.exitStatus in ((130..145) + 104) ? 'retry' : 'ignore' }
maxRetries = 3
Expand All @@ -11,9 +14,19 @@ process {
withLabel: midcpu { cpus = 15 }
withLabel: highcpu { cpus = 30 }

withLabel: lowmem { memory = { get_memory( 20.GB * task.attempt ) } }
withLabel: midmem { memory = { get_memory( 50.GB * task.attempt ) } }
withLabel: highmem { memory = { get_memory( 100.GB * task.attempt ) } }
withLabel: lowmem {
memory = { get_memory( 20.GB * task.attempt ) }
disk = { 50.GB * task.attempt }
}
withLabel: midmem {
memory = { get_memory( 50.GB * task.attempt ) }
disk = { 100.GB * task.attempt }
}
withLabel: highmem {
memory = { get_memory( 100.GB * task.attempt ) }
disk = { 200.GB * task.attempt }
}

}

def get_memory(to_compare) {
Expand Down

0 comments on commit ee79ec8

Please sign in to comment.