Skip to content

Commit ab4a3c4

Browse files
committed
Address PR reivew comments
1 parent 0246cb0 commit ab4a3c4

File tree

3 files changed

+22
-25
lines changed

3 files changed

+22
-25
lines changed

src/simulation/m_cbc.fpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ module m_cbc
5353
real(kind(0d0)), allocatable, dimension(:, :, :, :) :: F_rsy_vf, F_src_rsy_vf !<
5454
real(kind(0d0)), allocatable, dimension(:, :, :, :) :: F_rsz_vf, F_src_rsz_vf !<
5555

56+
!! There is a CCE bug that is causing some subset of these variables to interfere
57+
!! with variables of the same name in m_riemann_solvers.fpp, and giving this versions
58+
!! unique "_l" names works around the bug. Other private module allocatable arrays
59+
!! in `acc declare create` clauses don't have this problem, so we still need to
60+
!! isolate this bug.
61+
5662
real(kind(0d0)), allocatable, dimension(:, :, :, :) :: flux_rsx_vf_l, flux_src_rsx_vf_l !<
5763
real(kind(0d0)), allocatable, dimension(:, :, :, :) :: flux_rsy_vf_l, flux_src_rsy_vf_l
5864
real(kind(0d0)), allocatable, dimension(:, :, :, :) :: flux_rsz_vf_l, flux_src_rsz_vf_l

src/simulation/m_data_output.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ contains
8686

8787
integer, intent(in) :: t_step
8888

89-
if (parallel_io .neqv. .true.) then
89+
if (.not. parallel_io) then
9090
call s_write_serial_data_files(q_cons_vf, q_prim_vf, t_step)
9191
else
9292
call s_write_parallel_data_files(q_cons_vf, q_prim_vf, t_step)

src/simulation/m_start_up.fpp

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -94,28 +94,28 @@ module m_start_up
9494
s_perform_time_step, s_save_data, &
9595
s_save_performance_metrics
9696

97-
abstract interface ! ===================================================
9897

99-
!! @param q_cons_vf Conservative variables
100-
subroutine s_read_abstract_data_files(q_cons_vf)
101-
102-
import :: scalar_field, sys_size, pres_field
103-
104-
type(scalar_field), &
105-
dimension(sys_size), &
106-
intent(inout) :: q_cons_vf
98+
type(scalar_field), allocatable, dimension(:) :: grad_x_vf, grad_y_vf, grad_z_vf, norm_vf
10799

108-
end subroutine s_read_abstract_data_files
100+
real(kind(0d0)) :: dt_init
109101

110-
end interface ! ========================================================
102+
contains
111103

112-
type(scalar_field), allocatable, dimension(:) :: grad_x_vf, grad_y_vf, grad_z_vf, norm_vf
104+
!> Read data files. Dispatch subroutine that replaces procedure pointer.
105+
!! @param q_cons_vf Conservative variables
106+
subroutine s_read_data_files(q_cons_vf)
113107

114-
procedure(s_read_abstract_data_files), pointer :: s_read_data_files => null()
108+
type(scalar_field), &
109+
dimension(sys_size), &
110+
intent(inout) :: q_cons_vf
115111

116-
real(kind(0d0)) :: dt_init
112+
if (.not. parallel_io) then
113+
call s_read_serial_data_files(q_cons_vf)
114+
else
115+
call s_read_parallel_data_files(q_cons_vf)
116+
end if
117117

118-
contains
118+
end subroutine s_read_data_files
119119

120120
!> The purpose of this procedure is to first verify that an
121121
!! input file has been made available by the user. Provided
@@ -1350,13 +1350,6 @@ contains
13501350
call acc_present_dump()
13511351
#endif
13521352

1353-
! Associate pointers for serial or parallel I/O
1354-
if (parallel_io .neqv. .true.) then
1355-
s_read_data_files => s_read_serial_data_files
1356-
else
1357-
s_read_data_files => s_read_parallel_data_files
1358-
end if
1359-
13601353
! Reading in the user provided initial condition and grid data
13611354
call s_read_data_files(q_cons_ts(1)%vf)
13621355

@@ -1490,8 +1483,6 @@ contains
14901483
end subroutine s_initialize_gpu_vars
14911484

14921485
subroutine s_finalize_modules
1493-
! Disassociate pointers for serial and parallel I/O
1494-
s_read_data_files => null()
14951486

14961487
call s_finalize_time_steppers_module()
14971488
call s_finalize_derived_variables_module()

0 commit comments

Comments
 (0)