We are getting the error "Error executing request, Exception : Invalid shared memory size: 0.", which is appearing for code that was working fine just a few days ago. Our code sets the shared memory for the docker instance using the process directive:
I think the issue is that the shm-size is interpreted differently on AWS batch and on Docker.
When running with Docker, the --shm-size can take a unit suffix, but by default is measured in bytes.
On AWS Batch, the shm-size is interpreted as MiB (docs).
In 24.04.3, we just passed the argument directly through to the executor, which has two problems:
The number would be interpreted differently on each executor, giving inconsistent behaviours between executors and breaking portability of the workflow.
Docker can accept unit suffixes, but AWS cannot. If a unit suffix was applied, it would work on Docker but break on AWS Batch.
To resolve these issues, 24.04.4 will interpret a unit-less integer as a number of bytes (as per the Docker standard). If you specify a unit suffix, Nextflow will now do the conversion for you and turn the number into MiB.
I would recommend adding a unit suffix, and Nextflow will turn this into the relevant number of MiB for AWS and pass the string directly to Docker (which will do the unit conversion natively)
Any idea why the error message returns 0 as an invalid memory value, instead of 32768 bytes? I guess they could just be rounding the float number, 0.032768 mb is pretty small…
@Eric_Kofman let us know if the above solves your problem. If so then perhaps we can add a note about this to the Nextflow docs.