With GCC/LLVM-GCC/LLVM, don’t call omp_get_num_threads() and omp_get_max_threads() in a thread method. It will crash.
I confirmed this just a minutes ago.

I think this is a bug. At least GraphicsMagick and ImageMagick were written considering that they didn’t cause crash, or they thought that Magick::Image class is always created and accessed in a single thread function.

Magick::Image class uses omp_get_max_threads() in its constructor and its read() method.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: