pthreads / OpenMP do not interoperate.
GCC for 32-bit and 64-bit Windows with a real installer & updater
Brought to you by:
tdragon
pthreads / OpenMP do not interoperate (i.e. crash).
Under Linux this works well with my gcc version 4.4.1.
A sample test is in attachment.
Remark : pthreads without OpenMP => works.
Remark : OpenMP without (started) threads => works.
I'm pretty desperate for the functionality : I have a raw image processor with multiple threads (ie gui and workers) and I cannot 'openmp' the workers. OpenMP adds quite some speed to image processing.
Thanks for all your efforts and feedback.
Jos
Anonymous
Crashing example.
I drafted a potential patch. It is in libgomp.
http://jdlraw.sourceforge.net/GompPatch.shtml
I can't reproduce the problem on Win 7 64-bit.
With all due respect, but I believe you might be closing this too soon.
I'm working on a 32 bit machine and Win XP, and the bug has been confirmed on several places.
(it's due to TLS issue in pthreads-win32)
The suggested patch - which would make it work on a stock tdm delivery for 32 bit - is on http://jdlraw.sourceforge.net/GompPatch.shtml
Best regards,
Jos
The patch doesn't apply cleanly to GCC 4.5.0. Can you generate a unified diff with context, please?
I'm not sure what to do or how to do it.
http://jdlraw.sourceforge.net/GompPatch.shtml contains diff files against 4.4.1
Jos
I'll try the diffs with 4.4.1 sources when I get a chance, but for future reference, unified diffs with context are preferred in most cooperative scenarios. They can be applied automatically with "fuzz" in situations where the file has changed but the context is still recognizable, they can be applied by hand, and they are easier for a human to parse. If you use the "diff" tool, try the "-u" flag. Other tools, such as Subversion or your VCS of choice, typically generate unified diffs by default or have the option to do so.
Didn't apply cleanly to 4.4.1 sources either. I'd really like to test this patch out for the next TDM-GCC release -- but I'd really like to get the next TDM-GCC release out the door as well. If you can post a working patch within the next week, I'll see what I can do, otherwise it'll have to wait for the next release.
Dear,
You are right, I apparently messed up the diff files on my site. (the originals are correct though).
For summary I add here (and on the site) the hopefully correct ones as follows :
team_ori.c : The original team.c as found under gcc-4.4.1/libgomp
libgomp_ori.h : The same for libgomp.h
team.c : My changed one
libgomp.h : My changed one.
*.patch obtained by diff -u team_ori.c team.c > team_c.patch and the same for libgomp.
Hope this gives you all needed info and sorry for the mistake.
Luckily the changed code itself does extremely stable in my case :)
Jos
I've applied your patch in the 4.5.0 release, and the testcase appears to work. Please confirm if possible.
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).