Page 1 of 1

Using Magick++ pixel interface on multiple threads (OpenMP)

Posted: 2011-04-25T20:26:23-07:00
by shar10dul
Hi,

ImageMagick version - 5.5.7
Platform - Aix
I have been trying to use Magick++ Pixel interface to modify the pixels of an image in parallel.
However it always gives me an segmentation fault. I have tried using both mpi and openmp and it gives a segmentation fault in both the cases.
Each of the threads have a pixel pointer of their own and access a segment of the image (via pixel::get() ).
However trying to modify the pixels throws a segmentation fault.

Do you guys have an idea of what might be wrong. The programs run fine when i run them using 1 thread.

Thanks,
Shardul

Re: Using Magick++ pixel interface on multiple threads (Open

Posted: 2012-01-12T09:35:10-07:00
by Gui_tou[]
Hi Shardul,

Same thing here. Executing this simple piece of code creates a segmentation fault.

Code: Select all

#pragma omp parallel 
{
      Magick::Image image(Magick::Geometry(800, 600), Magick::ColorRGB(1,0,0));
}
It seems to be a conflict between my use of openMP and the use of Magick+. Disabling openMP when compiling the library (./configure --disable-openmp) fixes it.
I'm running on OSX10.7 with ImageMagick-6.7.4-4

If anyone has an other idea to fix this bug I would be glad to hear it because disabling the use of openMP inside imageMagick cannot be called a nice solution.

Regards,
Guitou