From e864b9e4d041f733566a5356245b2f4c82050cee Mon Sep 17 00:00:00 2001 From: adamrtalbot <12817534+adamrtalbot@users.noreply.github.com> Date: Mon, 9 Dec 2024 18:48:28 +0000 Subject: [PATCH] Handle resource vs osdisk size Signed-off-by: adamrtalbot <12817534+adamrtalbot@users.noreply.github.com> --- .../src/main/nextflow/cloud/azure/batch/AzBatchService.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/nf-azure/src/main/nextflow/cloud/azure/batch/AzBatchService.groovy b/plugins/nf-azure/src/main/nextflow/cloud/azure/batch/AzBatchService.groovy index 3843f602e5..fc788ad84a 100644 --- a/plugins/nf-azure/src/main/nextflow/cloud/azure/batch/AzBatchService.groovy +++ b/plugins/nf-azure/src/main/nextflow/cloud/azure/batch/AzBatchService.groovy @@ -219,7 +219,7 @@ class AzBatchService implements Closeable { protected Double computeScore(int cpus, MemoryUnit mem, MemoryUnit disk, Map entry) { def vmCores = entry.numberOfCores as int double vmMemGb = (entry.memoryInMB as int) /1024 - double vmDiskGb = (entry.resourceDiskSizeInMB as int) /1024 + double vmDiskGb = entry.resourceDiskSizeInMB ? (entry.resourceDiskSizeInMB as int) / 1024 :entry.osDiskSizeInMB ? (entry.osDiskSizeInMB as int) / 1024 : 0.001 // If requested CPUs exceed available, disqualify if( cpus > vmCores )