Comments (4)
We can not have this name. DRB076-flush-orig-no.c
already exists. Please change DRB170-
name.
@chunhualiao
Can we add -npb-
before -no/-yes
to all NPB kernels to idenitfy in general?
from dataracebench.
from dataracebench.
Okay.
from dataracebench.
Below is a properly indented version of this program. Whatever nowait
and flush
are doing, we have already included that nature.
#include <stdio.h>
#include <stdbool.h>
#define ISIZ 12
#define OMEGA_DEFAULT 1.2
static bool flag[ISIZ/2*2+1];
int len = sizeof(flag)/sizeof(flag[0]);
int main(int argh, char* argv[])
{
int i,j,k,m,ist,iend,jst,jend,nx,ny,nz,iglob,xi,jglob,eta,zeta;
double omega;
double v[ISIZ][ISIZ/2*2+1][ISIZ/2*2+1][5];
omega = OMEGA_DEFAULT;
nx = ISIZ;
ny = ISIZ;
nz = ISIZ;
ist = 1;
iend = nx-2;
jst =1;
jend = ny -2;
printf("%d\n",len);
for (i=0;i<len;i++)printf("%d ",flag[i]);
printf("\n");
/* inintal value */
for (i = 0; i < nx; i++) {
iglob = i;
xi = ( (double)(iglob) ) / ( nx - 1 );
for (j = 0; j < ny; j++) {
jglob = j;
eta = ( (double)(jglob) ) / ( ny - 1 );
for (k = 0; k < nz; k++) {
zeta = ( (double)(k) ) / ( nz - 1 );
for (m = 0; m < 5; m++) {
v[i][j][k][m] = xi + eta + zeta;
}
}
}
}
#pragma omp parallel private(k)
{
for(k = 1; k <= nz - 2; k++){
#pragma omp for nowait schedule(static)
for (i = ist; i <= iend; i++) {
for (j = jst; j <= jend; j++) {
for (m = 0; m < 5; m++) {
v[i][j][k][m] = v[i][j][k][m] - omega * ( v[i][j][k-1][0] + v[i][j][k-1][1] + v[i][j][k-1][2] + v[i][j][k-1][3] + v[i][j][k-1][4] );
}
}
}
#pragma omp for nowait schedule(static)
for (i = ist; i <= iend; i++) {
if (i != ist) {
while (flag[i-1] == 0) {
#pragma omp flush(flag)
}
}
if (i != iend) {
while (flag[i] == 1) {
#pragma omp flush(flag)
}
}
for (j = jst; j<= jend; j++) {
for (m = 0; m < 5; m++) {
v[i][j][k][m] = v[i][j][k][m] - omega * ( v[i][j-1][k][0] + v[i][j-1][k][1] + v[i-1][j][k][1] + v[i][j-1][k][2] + v[i-1][j][k][3] + v[i-1][j][k][4] );
}
v[i][j][k][1] = v[i][j][k][1] - v[i][j][k][0];
}
if (i != ist) flag[i-1] = 0;
if (i != iend) flag[i] = 1;
#pragma omp flush(flag)
}
}
}
for (i=0;i<len;i++)printf("%d ",flag[i]);
printf("\n");
return 0;
}
from dataracebench.
Related Issues (20)
- Add verfication of data race reports in the test harness HOT 3
- doubts about high recall value for Intel inspector
- a potential paper HOT 1
- More metadata for existing tests for version and category information HOT 2
- getSourceRaceInfo.py and read/write sets HOT 1
- make a new release 1.4.0
- static tools: may vs. must analysis
- address paper review comments
- DRB136: possible wrong comments HOT 2
- merge pending pull requests
- ISCP project report
- a possible new pattern from NPB LU
- update dashboard based on the latest v1.4.0
- updating benchmark lists
- -q is not a gnu time flag HOT 3
- DRB181-SmithWaterman-yes.c uses abs with long HOT 2
- support C++ templates
- Survey Question on the For loop in source file micro-benchmarks/DRB178-input-dependence-var-yes.c line 41
- DRB189-barrier3-yes.c does not contain a data race HOT 4
- mismatch between C vs. Fortran for some files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dataracebench.