When I run a specific ImageMagick convert command (to produce an animated GIF) inside a Singularity container it is consistently giving an memory error:
convert-im6.q16: cache resources exhausted `foo.gif' @ error/cache.c/OpenPixelCache/4083.
convert-im6.q16: memory allocation failed `foo.gif' @ error/quantize.c/AssignImageColors/496.
How can I debug this?
I'm not getting any memory issues outside of Singularity which gives me the impression that either Singularity is artificially limiting my available memory or ImageMagick is configured poorly inside of Singularity. I am not seeing memory issues for any of my other applications running inside Singularity which makes me think it's an ImageMagick issue.
Here are some details about my system:
$ singularity --version
singularity version 3.7.1-1.el8
Inside the container:
Singularity> convert --version
Version: ImageMagick 6.9.10-23 Q16 x86_64 20190101 https://imagemagick.org
Copyright: © 1999-2019 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff webp wmf x xml zlib
and
Singularity> convert -list resource
Resource limits:
Width: 16KP
Height: 16KP
List length: 18.446744EP
Area: 128MP
Memory: 256MiB
Map: 512MiB
Disk: 1GiB
File: 768
Thread: 256
Throttle: 0
Time: unlimited
The Memory: 256MiB
stands out as especially low. I should have at least 2GiB. How does ImageMagick configure these limits and how can I change them?