Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

an example showing strengh of static analysis #87

Closed
chunhualiao opened this issue Sep 28, 2020 · 1 comment
Closed

an example showing strengh of static analysis #87

chunhualiao opened this issue Sep 28, 2020 · 1 comment

Comments

@chunhualiao
Copy link
Collaborator

chunhualiao commented Sep 28, 2020

From OMPRacer paper:

1 int *A; int N;
2 load_from_input(A, &N);
3 #pragma omp parallel for shared(A)
4 for(int i = 0; i < N; i++) {
5 A[i] = i;
6 if (N > 10000) { A[0] = 1; }
7 }

Data races on A[0] happens only N is larger than a threshold.

@peihunglin
Copy link
Collaborator

microbenchmark added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants