The following loop, which seems valid according to the OpenMP specification v2.5 and 3.0 fails to terminate:
int x; #pragma omp parallel for schedule(guided) for(x = 3; x < 478; x += 2) { ... } I've tested with two and eight threads and different chunksizes, with the same non-termination result. Changing the upper bound to 477, however, makes the loop terminate, which leads me to belive this is an issue in the GNU OpenMP runtime library. I have confirmed that the problems exists in 4.2, 4.3 and 4.5 (trunk, 19-06-09). To me, bug 35625 seems somewhat similar but was supposedly fixed in 4.3. /Per -- Summary: omp for loop with guided schedule fails to terminate in certain cases Product: gcc Version: 4.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgomp AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: per at bitempire dot com GCC build triplet: i686-pc-linux GCC host triplet: i686-pc-linux GCC target triplet: i686-pc-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40494