Skip to content

Commit

Permalink
Address PR reivew comments
Browse files Browse the repository at this point in the history
  • Loading branch information
abbotts committed Nov 8, 2024
1 parent 0246cb0 commit ab4a3c4
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 25 deletions.
6 changes: 6 additions & 0 deletions src/simulation/m_cbc.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ module m_cbc
real(kind(0d0)), allocatable, dimension(:, :, :, :) :: F_rsy_vf, F_src_rsy_vf !<
real(kind(0d0)), allocatable, dimension(:, :, :, :) :: F_rsz_vf, F_src_rsz_vf !<

!! There is a CCE bug that is causing some subset of these variables to interfere
!! with variables of the same name in m_riemann_solvers.fpp, and giving this versions
!! unique "_l" names works around the bug. Other private module allocatable arrays
!! in `acc declare create` clauses don't have this problem, so we still need to
!! isolate this bug.
real(kind(0d0)), allocatable, dimension(:, :, :, :) :: flux_rsx_vf_l, flux_src_rsx_vf_l !<
real(kind(0d0)), allocatable, dimension(:, :, :, :) :: flux_rsy_vf_l, flux_src_rsy_vf_l
real(kind(0d0)), allocatable, dimension(:, :, :, :) :: flux_rsz_vf_l, flux_src_rsz_vf_l
Expand Down
2 changes: 1 addition & 1 deletion src/simulation/m_data_output.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ contains

integer, intent(in) :: t_step

if (parallel_io .neqv. .true.) then
if (.not. parallel_io) then
call s_write_serial_data_files(q_cons_vf, q_prim_vf, t_step)
else
call s_write_parallel_data_files(q_cons_vf, q_prim_vf, t_step)
Expand Down
39 changes: 15 additions & 24 deletions src/simulation/m_start_up.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,28 +94,28 @@ module m_start_up
s_perform_time_step, s_save_data, &
s_save_performance_metrics

abstract interface ! ===================================================

!! @param q_cons_vf Conservative variables
subroutine s_read_abstract_data_files(q_cons_vf)

import :: scalar_field, sys_size, pres_field

type(scalar_field), &
dimension(sys_size), &
intent(inout) :: q_cons_vf
type(scalar_field), allocatable, dimension(:) :: grad_x_vf, grad_y_vf, grad_z_vf, norm_vf

end subroutine s_read_abstract_data_files
real(kind(0d0)) :: dt_init

end interface ! ========================================================
contains

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

procedure(s_read_abstract_data_files), pointer :: s_read_data_files => null()
type(scalar_field), &
dimension(sys_size), &
intent(inout) :: q_cons_vf

real(kind(0d0)) :: dt_init
if (.not. parallel_io) then
call s_read_serial_data_files(q_cons_vf)
else
call s_read_parallel_data_files(q_cons_vf)
end if

contains
end subroutine s_read_data_files

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

! Associate pointers for serial or parallel I/O
if (parallel_io .neqv. .true.) then
s_read_data_files => s_read_serial_data_files
else
s_read_data_files => s_read_parallel_data_files
end if

! Reading in the user provided initial condition and grid data
call s_read_data_files(q_cons_ts(1)%vf)

Expand Down Expand Up @@ -1490,8 +1483,6 @@ contains
end subroutine s_initialize_gpu_vars

subroutine s_finalize_modules
! Disassociate pointers for serial and parallel I/O
s_read_data_files => null()

call s_finalize_time_steppers_module()
call s_finalize_derived_variables_module()
Expand Down

0 comments on commit ab4a3c4

Please sign in to comment.