Skip to content

Commit 55b50a5

Browse files
Fix kernels bug hopefully (#931)
Co-authored-by: Spencer Bryngelson <sbryngelson@gmail.com>
1 parent 6824521 commit 55b50a5

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

docs/documentation/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- [Running MFC](running.md)
1010
- [Flow Visualization](visualization.md)
1111
- [Performance](expectedPerformance.md)
12+
- [GPU Parallelization](gpuParallelization.md)
1213
- [MFC's Authors](authors.md)
1314
- [References](references.md)
1415

src/simulation/m_data_output.fpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -316,14 +316,14 @@ contains
316316
Rc_min_loc = minval(Rc_sf)
317317
end if
318318
#else
319-
!$acc kernels
320-
icfl_max_loc = maxval(icfl_sf)
321-
!$acc end kernels
319+
#:call GPU_PARALLEL(copyout='[icfl_max_loc]', copyin='[icfl_sf]')
320+
icfl_max_loc = maxval(icfl_sf)
321+
#:endcall GPU_PARALLEL
322322
if (viscous) then
323-
!$acc kernels
324-
vcfl_max_loc = maxval(vcfl_sf)
325-
Rc_min_loc = minval(Rc_sf)
326-
!$acc end kernels
323+
#:call GPU_PARALLEL(copyout='[vcfl_max_loc, Rc_min_loc]', copyin='[vcfl_sf,Rc_sf]')
324+
vcfl_max_loc = maxval(vcfl_sf)
325+
Rc_min_loc = minval(Rc_sf)
326+
#:endcall GPU_PARALLEL
327327
end if
328328
#endif
329329

src/simulation/m_time_steppers.fpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -993,9 +993,9 @@ contains
993993
end do
994994
end do
995995

996-
!$acc kernels
997-
dt_local = minval(max_dt)
998-
!$acc end kernels
996+
#:call GPU_PARALLEL(copyout='[dt_local]', copyin='[max_dt]')
997+
dt_local = minval(max_dt)
998+
#:endcall GPU_PARALLEL
999999

10001000
if (num_procs == 1) then
10011001
dt = dt_local

0 commit comments

Comments
 (0)