Page 1 of 1

OpenMP Assert Error: `id < (int) cache_info->number_threads'

Posted: 2013-09-05T20:56:49-07:00
by jonoomph
Greetings! When I recently updated ImageMagick to version 6.7.7-10, it started giving me an assertion failure related to the number of threads. My program uses OpenMP as well, so I imagine this is related to that fact. But previous versions of ImageMagick worked fine with no assertion failures. Now, I receive the following error when an Image() instance is created:

Code: Select all

example: magick/cache.c:4536: QueueAuthenticPixels: Assertion `id < (int) cache_info->number_threads' failed.
Here are some details about my environment:

Code: Select all

$ convert -version

Version: ImageMagick 6.7.7-10 2013-02-25 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP   

Code: Select all

$ identify -list resource

resourceFile         Area       Memory          Map         Disk    Thread         Time
-------------------------------------------------------------------------------
 768     33.559GB    15.627GiB    31.254GiB    unlimited         8    unlimited
Work Around
The only way I can invoke a new Image() instance without trigging the assertion failure is by first invoking: omp_set_num_threads(4). Strangely, if I use any value greater than 4 it throws the assertion failure. Any value less than or equal to 4, it works fine. I have spent a few hours debugging this issue without much success. Any thoughts or suggestions would be most appreciated. Thanks!

Re: OpenMP Assert Error: `id < (int) cache_info->number_thre

Posted: 2013-09-06T04:56:18-07:00
by magick
OpenMP support is much improved in recent releases of ImageMagick. The current version is 6.8.6-9. If you get a chance, install 6.8.6-9 and see if the problem persists. If it does, let us know and we will investigate further.

Re: OpenMP Assert Error: `id < (int) cache_info->number_thre

Posted: 2013-09-08T13:56:22-07:00
by jonoomph
Thanks for the response. I will install the newest version of ImageMagick (6.8.6-9) and let you know if I have the same issues.

Re: OpenMP Assert Error: `id < (int) cache_info->number_thre

Posted: 2014-10-04T11:33:46-07:00
by jonoomph
I have tested with the latest version, ImageMagick 6.8.9-8, and everything works correctly. But with version 6.7.7.X, it always throws this error, "QueueAuthenticPixels: Assertion `id < (int) cache_info->number_threads' failed.", if I allow more than 4 threads. Anyway, if you are having this issue, just build from source and everything will work correctly.

Thanks,
-Jonathan