https://llvm.org/bugs/show_bug.cgi?id=27877
Bug ID: 27877
Summary: ordered clause on pragma for does not respect
semantics
Product: OpenMP
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Runtime Library
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
The following testcase:
#include <stdio.h>
int main() {
int s[10];
int count = 0;
#pragma omp target if(0)
#pragma omp parallel num_threads(8)
{
#pragma omp for ordered
{
for (int i=0;i<10;i++) {
s[i] = count;
count++;
}
}
}
for (int i=0;i<10;i++) {
printf("%d\n", s[i]);
}
return 1;
}
prints out:
2
4
1
5
6
0
7
4
3
8
on latest clang+openMP from git repositories. Successive re-runs show different
orders.
I would have instead expected an ordered print of numbers from 0 to 9.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs