/* Manually transformed CIVL-C code for the openMP data race benchmakr 028 example. */ /* tmp should be annotated as private to avoid race condition. Data race pairs: tmp@65:5 vs. tmp@66:12 tmp@65:5 vs. tmp@65:5 */ /* ############################### ###### Origianl program ###### #include #include int main(int argc, char* argv[]) { int i; int tmp; int len=100; int a[100]; for (i=0;i #include #include #ifndef NTHREADS #define NTHREADS 10 #endif /* Eventually these two sets shall be stored in $omp_team locally. */ $mem reads[NTHREADS], writes[NTHREADS]; /*@ executes_when \true; @ depends_on \nothing; */ void capture_start(int tid); /*@ executes_when \true; @ depends_on \nothing; */ void capture_end(int tid); /*@ executes_when \true; @ depends_on \nothing; */ void check_data_race(); int main() { int i; int tmp; int len=100; int a[100]; for (i=0;i