Skip to content

Commit 0f81515

Browse files
author
Michael Boulton
committed
fixes from reference version
1 parent 3271b8e commit 0f81515

File tree

6 files changed

+24
-16
lines changed

6 files changed

+24
-16
lines changed

data.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ MODULE data_module
2323

2424
IMPLICIT NONE
2525

26-
REAL(KIND=8), PARAMETER :: g_version=2.0
26+
REAL(KIND=8), PARAMETER :: g_version=1.2
2727

2828
INTEGER, PARAMETER :: g_ibig=640000
2929

ocl_common.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <cstdlib>
88
#include <map>
99

10-
#define JACOBI_BLOCK_SIZE 4
10+
#define JACOBI_BLOCK_SIZE 1
1111

1212
// 2 dimensional arrays - use a 2D tile for local group
1313
const static size_t LOCAL_Y = JACOBI_BLOCK_SIZE;

start.f90

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ SUBROUTINE start
5151

5252
CALL tea_get_num_chunks(number_of_chunks)
5353

54-
ALLOCATE(chunks(1:number_of_chunks))
55-
ALLOCATE(left(1:number_of_chunks))
56-
ALLOCATE(right(1:number_of_chunks))
57-
ALLOCATE(bottom(1:number_of_chunks))
58-
ALLOCATE(top(1:number_of_chunks))
54+
ALLOCATE(chunks(1:chunks_per_task))
55+
ALLOCATE(left(1:chunks_per_task))
56+
ALLOCATE(right(1:chunks_per_task))
57+
ALLOCATE(bottom(1:chunks_per_task))
58+
ALLOCATE(top(1:chunks_per_task))
5959

6060
CALL tea_decompose(grid%x_cells,grid%y_cells,left,right,bottom,top)
6161

tea.f90

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,14 +237,15 @@ SUBROUTINE tea_exchange(fields,depth)
237237
LOGICAL :: test_complete
238238

239239
! Assuming 1 patch per task, this will be changed
240+
chunk = 1
241+
242+
IF (ALL(chunks(chunk)%chunk_neighbours .eq. external_face)) return
240243

241244
request_lr=0
242245
message_count_lr=0
243246
request_ud = 0
244247
message_count_ud = 0
245248

246-
chunk = 1
247-
248249
end_pack_index_left_right=0
249250
end_pack_index_bottom_top=0
250251
left_right_offset = 0

tea.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ tl_preconditioner_type=jac_block
1919
tl_ppcg_inner_steps=249
2020
tl_check_result
2121
tl_eps=1.0e-12
22-
profiler_on
22+
!profiler_on
2323

2424
!use_fortran_kernels
2525

tea_solve.f90

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,13 @@ SUBROUTINE tea_leaf()
325325
IF (cheby_calc_steps .EQ. 0) THEN
326326
cheby_calc_steps = 1
327327

328+
fields=0
329+
fields(FIELD_U) = 1
330+
IF (profiler_on) halo_time=timer()
331+
CALL update_halo(fields,1)
332+
!IF (profiler_on) profiler%halo_exchange = profiler%halo_exchange + (timer() - halo_time)
333+
IF (profiler_on) init_time=init_time+(timer()-halo_time)
334+
328335
IF(use_opencl_kernels) THEN
329336
call tea_leaf_kernel_ppcg_init_ocl(ch_alphas, ch_betas, &
330337
theta, tl_ppcg_inner_steps)
@@ -344,12 +351,6 @@ SUBROUTINE tea_leaf()
344351
ELSEIF(use_opencl_kernels) THEN
345352
CALL tea_leaf_calc_residual_ocl()
346353
ENDIF
347-
348-
IF (profiler_on) halo_time = timer()
349-
! update p
350-
CALL update_halo(fields,1)
351-
!IF (profiler_on) profiler%halo_exchange = profiler%halo_exchange + (timer() - halo_time)
352-
IF (profiler_on) solve_time = solve_time + (timer()-halo_time)
353354
ENDIF
354355

355356
IF(use_fortran_kernels) THEN
@@ -556,6 +557,12 @@ SUBROUTINE tea_leaf()
556557
ENDDO
557558

558559
IF (tl_check_result) THEN
560+
fields = 0
561+
fields(FIELD_U) = 1
562+
IF (profiler_on) halo_time = timer()
563+
CALL update_halo(fields,1)
564+
!IF (profiler_on) profiler%halo_exchange = profiler%halo_exchange + (timer() - halo_time)
565+
IF (profiler_on) solve_time = solve_time + (timer()-halo_time)
559566
IF(use_fortran_kernels) THEN
560567
CALL tea_leaf_calc_residual(chunks(c)%field%x_min,&
561568
chunks(c)%field%x_max, &

0 commit comments

Comments
 (0)