[Qt-interest] [1/2 OT] ImageMagick, OpenMP and QThread [Mac OS X]?
Oliver.Knoll at comit.ch
Oliver.Knoll at comit.ch
Thu Jan 28 10:32:25 CET 2010
Knoll Oliver, ITS-CMT-SUI-SL-SFR-FIN-DEV wrote on Thursday, January 28, 2010 9:49 AM:
>> ...
>> Interesting:
>> http://www.qtcentre.org/threads/20079-QThread-and-OpenMP-on-Mac-problem:
>
> I have reduced my previous example to "QThread vs OpenMP" - it is
> http://sire.googlecode.com/svn-history/r639/corelib/branches/users/chr
> yswoods/techdocs/test_openmp_and_qthread.cpp,
> as mentioned in above link).
Sorry for replying to myself all the time, but I hope this might help others in the future/is of interest to anyone else, too. I found this very interesting converstation:
http://lists.apple.com/archives/coreaudio-api/2009/May/msg00035.html:
"The gcc / OpenMP version that ships with Leopard/Xcode has a known bug that it does not work on any thread other than the main thread. This was apparently fixed on a later version of gcc, but I expect you would be installing and using a later version at your own risk."
So apparently this was still not fixed with the gcc (respective with the "gomp" support library) that comes with Snow Leopard/XCode and it really seems that calling OpenMP code within any thread other than the "main" thread fails:
"
Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000028
Thread 13 Crashed:
libgomp.1.dylib 0x000129cc gomp_resolve_num_threads + 76 (libgomp.h:380)
"
gomp_resolve_num_threads: that is the same function crashing as in my example. So this /is/ rather an "Apple gcc/gomp" issue than QThread one. Doh!
Cheers, Oliver
--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22
More information about the Qt-interest-old
mailing list