Search found 10 matches

by langer
2011-02-16T13:51:21-07:00
Forum: Bugs
Topic: MAGICK_THREAD_LIMIT = 0 doesn't disable OpenMP
Replies: 22
Views: 88218

Re: MAGICK_THREAD_LIMIT = 0 doesn't disable OpenMP

The last time I checked, the MacPorts version of ImageMagick didn't have a built-in option for disabling OpenMP. You have to modify the portfile. See http://www.ctcms.nist.gov/oof/oof2/install.html#osx for the instructions that we give our users.

-- Steve
by langer
2010-06-18T11:08:25-07:00
Forum: Bugs
Topic: MAGICK_THREAD_LIMIT = 0 doesn't disable OpenMP
Replies: 22
Views: 88218

Re: MAGICK_THREAD_LIMIT = 0 doesn't disable OpenMP

No. I tried setting it to 1 and also to 0, just to be sure. It seems that any call to an OpenMP routine makes the program crash, even if it's just querying the number of OpenMP threads, or if there aren't any OpenMP threads.
by langer
2010-06-18T10:57:31-07:00
Forum: Bugs
Topic: MAGICK_THREAD_LIMIT = 0 doesn't disable OpenMP
Replies: 22
Views: 88218

Re: MAGICK_THREAD_LIMIT = 0 doesn't disable OpenMP

magick wrote:We know of no run-time method to disable OpenMP. If you discover a method, let us know.

Code: Select all

if(using_openmp)
  process_image_with_openmp();
else
  process_image_without_openmp();
by langer
2010-06-18T10:44:18-07:00
Forum: Bugs
Topic: MAGICK_THREAD_LIMIT = 0 doesn't disable OpenMP
Replies: 22
Views: 88218

Re: MAGICK_THREAD_LIMIT = 0 doesn't disable OpenMP

Yes, I would expect it to, because it works with Linux pthreads. But the whole point is ImageMagick is relying on OpenMP behavior that is not defined in the OpenMP or pthreads standards, does not work with OS X pthreads, and is not guaranteed to work with future versions of Linux pthreads. By not su...
by langer
2010-06-18T08:34:39-07:00
Forum: Bugs
Topic: MAGICK_THREAD_LIMIT = 0 doesn't disable OpenMP
Replies: 22
Views: 88218

Re: MAGICK_THREAD_LIMIT = 0 doesn't disable OpenMP

It's short, I'll just post it here. All it does is try to open an image file on a subthread. // -*- C++ -*- // compile with // g++ -o magicktest magicktest.C `Magick++-config --cppflags --ldflags --libs` // #include <Magick++.h> #include <pthread.h> #include <iostream> void *subthread(void *threadid...
by langer
2010-06-18T07:24:30-07:00
Forum: Bugs
Topic: MAGICK_THREAD_LIMIT = 0 doesn't disable OpenMP
Replies: 22
Views: 88218

Re: MAGICK_THREAD_LIMIT = 0 doesn't disable OpenMP

Its libgomp that is seg faulting, not the ImageMagick API. Yes, I know that. I wasn't implying that ImageMagick was seg faulting. But ImageMagick is using OpenMP in a way that causes OpenMP to seg fault if ImageMagick is used within a posix thread. This severely limits the ways in which ImageMagick...
by langer
2010-06-18T06:47:54-07:00
Forum: Bugs
Topic: MAGICK_THREAD_LIMIT = 0 doesn't disable OpenMP
Replies: 22
Views: 88218

Re: MAGICK_THREAD_LIMIT = 0 doesn't disable OpenMP

No, using "#pragma omp single" on the ImageMagick calls doesn't help. It just moves the location of the seg fault from the OpenMP calls in ImageMagick to the OpenMP code generated in the calling routine by the pragma. I don't doubt that ImageMagick is much faster with OpenMP. But it's also...
by langer
2010-06-17T18:44:03-07:00
Forum: Bugs
Topic: MAGICK_THREAD_LIMIT = 0 doesn't disable OpenMP
Replies: 22
Views: 88218

Re: MAGICK_THREAD_LIMIT = 0 doesn't disable OpenMP

My understanding, from discussions at OpenMP.org, is that the OpenMP standard doesn't say anything about how it interacts with threads, and so the behavior is undefined. See http://openmp.org/forum/viewtopic.php?f=3&t=642&p=2556&hilit=pthread#p2556, for example. This means that libMagick...
by langer
2010-06-17T13:51:10-07:00
Forum: Bugs
Topic: MAGICK_THREAD_LIMIT = 0 doesn't disable OpenMP
Replies: 22
Views: 88218

Re: MAGICK_THREAD_LIMIT = 0 doesn't disable OpenMP

I forgot to mention that I'm using IM 6.6.1 and OS X 10.6.4.
by langer
2010-06-17T13:48:42-07:00
Forum: Bugs
Topic: MAGICK_THREAD_LIMIT = 0 doesn't disable OpenMP
Replies: 22
Views: 88218

MAGICK_THREAD_LIMIT = 0 doesn't disable OpenMP

Hi -- I develop and distribute a program that uses pthreads and Magick++. Since pthreads aren't compatible with OpenMP on many platforms (including OS X) users of our software have to build Magick++ with the --disable-openmp option. (If it's omitted, the program crashes on the first Magick++ call fr...