Skip to content

Commit f70208c

Browse files
committed
Fix target nowait test.
1 parent 65415a0 commit f70208c

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

t-target-nowait/test.c

+8-5
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ int main() {
117117
}
118118
#endif
119119

120-
121120
#if TEST_CONCURRENT
122121
// This test cannot run correctly with libomptarget because the library does
123122
// not support proper async. Fake the output in this case.
@@ -129,30 +128,34 @@ int main() {
129128
// Run actual test
130129
for (i=0; i<N; i++) a[i] = b[i] = i;
131130

132-
#pragma omp target nowait map(to:b) map(from: a)
131+
#pragma omp target enter data map(to:a)
132+
133+
#pragma omp target nowait map(to:b)
133134
{
134135
int j;
135136
for(j=0; j<N/4; j++) a[j] = b[j]+1;
136137
}
137138

138-
#pragma omp target nowait map(to:b) map(from: a)
139+
#pragma omp target nowait map(to:b)
139140
{
140141
int j;
141142
for(j=N/4; j<N/2; j++) a[j] = b[j]+1;
142143
}
143144

144-
#pragma omp target nowait map(to:b) map(from: a)
145+
#pragma omp target nowait map(to:b)
145146
{
146147
int j;
147148
for(j=N/2; j<3*(N/4); j++) a[j] = b[j]+1;
148149
}
149150

150-
#pragma omp target nowait map(to:b) map(from: a)
151+
#pragma omp target nowait map(to:b)
151152
{
152153
int j;
153154
for(j=3*(N/4); j<N; j++) a[j] = b[j]+1;
154155
}
155156

157+
#pragma omp target exit data map(from: a)
158+
156159
#pragma omp taskwait
157160

158161
error=0;

0 commit comments

Comments
 (0)