I have an OpenMP code segment: #pragma omp parallel for for (i = 0; i < size; i++)
Built with mingw gcc 4.4.0. Run on Windows XP SP3, AMD 64 Athlon FX62 dual core. Run in an exe application it works fine, however when invoked as code in a DLL the for loop threads do not increment properly and the loop runs infinitely repeating the same values of i. eg: 19 thread 0 26936 thread 1 20 thread 0 0 thread 1 21 thread 0 19 thread 1 22 thread 0 20 thread 1 21 thread 1 23 thread 0 22 thread 1 0 thread 0 23 thread 1 19 thread 0 24 thread 1 20 thread 0 ... -- Summary: OpenMP fails in DLLs Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgomp AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: john at quivinco dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45192