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

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
User avatar
jonoomph
Posts: 27
Joined: 2011-03-27T14:25:09-07:00
Authentication code: 8675308

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

Post by jonoomph » 2013-09-05T20:56:49-07:00

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!

User avatar
magick
Site Admin
Posts: 11014
Joined: 2003-05-31T11:32:55-07:00

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

Post by magick » 2013-09-06T04:56:18-07:00

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.

User avatar
jonoomph
Posts: 27
Joined: 2011-03-27T14:25:09-07:00
Authentication code: 8675308

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

Post by jonoomph » 2013-09-08T13:56:22-07:00

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.

User avatar
jonoomph
Posts: 27
Joined: 2011-03-27T14:25:09-07:00
Authentication code: 8675308

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

Post by jonoomph » 2014-10-04T11:33:46-07:00

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

Post Reply