Skip to content

Commit 38f7dd2

Browse files
sbryngelsonclaude
andcommitted
Fix CI review findings, build errors, and remaining issues
- Fix bubs_glb=0 placement after declarations (Fortran standard violation) - Add missing max_dt declaration and GPU_DECLARE in m_time_steppers.fpp - Add @:PROHIBIT for particle restart without MPI - Deallocate beta_vars in pre_process and post_process finalizers - Change vL_field/vR_field intent(inout) to intent(in) in s_gradient_field - Fix bare integer 3 -> 3._wp in m_bubbles.fpp - Fix NVTX typo RMDA -> RDMA Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3c49f42 commit 38f7dd2

File tree

6 files changed

+19
-11
lines changed

6 files changed

+19
-11
lines changed

src/common/m_mpi_common.fpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -388,12 +388,12 @@ contains
388388
real(wp), intent(out) :: Rc_min_glb
389389
integer, intent(out) :: bubs_glb
390390

391-
bubs_glb = 0
392-
393391
#ifdef MFC_SIMULATION
394392
#ifdef MFC_MPI
395393
integer :: ierr !< Generic flag used to identify and report MPI errors
396394

395+
bubs_glb = 0
396+
397397
! Reducing local extrema of ICFL, VCFL, CCFL and Rc numbers to their
398398
! global extrema and bookkeeping the results on the rank 0 processor
399399
call MPI_REDUCE(icfl_max_loc, icfl_max_glb, 1, &
@@ -417,6 +417,7 @@ contains
417417
#else
418418

419419
icfl_max_glb = icfl_max_loc
420+
bubs_glb = 0
420421

421422
if (viscous) then
422423
vcfl_max_glb = vcfl_max_loc
@@ -1341,7 +1342,7 @@ contains
13411342
call nvtxStartRange("BETA-COMM-DEV2HOST")
13421343
$:GPU_UPDATE(host='[buff_send]')
13431344
call nvtxEndRange
1344-
call nvtxStartRange("BETA-COMM-SENDRECV-NO-RMDA")
1345+
call nvtxStartRange("BETA-COMM-SENDRECV-NO-RDMA")
13451346

13461347
call MPI_SENDRECV( &
13471348
buff_send, buffer_count, mpi_p, dst_proc, send_tag, &

src/post_process/m_global_parameters.fpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,7 @@ contains
11081108
#endif
11091109

11101110
if (allocated(neighbor_ranks)) deallocate (neighbor_ranks)
1111+
if (allocated(beta_vars)) deallocate (beta_vars)
11111112

11121113
end subroutine s_finalize_global_parameters_module
11131114

src/pre_process/m_global_parameters.fpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,6 +1114,7 @@ contains
11141114
#endif
11151115
11161116
if (allocated(neighbor_ranks)) deallocate (neighbor_ranks)
1117+
if (allocated(beta_vars)) deallocate (beta_vars)
11171118
11181119
end subroutine s_finalize_global_parameters_module
11191120

src/simulation/m_bubbles.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ contains
597597
do l = 1, num_dims
598598
f_bTemp = f_get_bubble_force(fPos(l), fR, fV, fVel(l), fmass_g, fmass_v, &
599599
fRe, fRho, cell, l, q_prim_vf)
600-
aTemp(l) = 2._wp*f_bTemp/(fmass_g + fmass_v) - 3*fV*fVel(l)/fR
600+
aTemp(l) = 2._wp*f_bTemp/(fmass_g + fmass_v) - 3._wp*fV*fVel(l)/fR
601601
end do
602602
do l = 1, num_dims
603603
fVel(l) = fVel(l) + h*aTemp(l)

src/simulation/m_particles_EL.fpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,9 @@ contains
603603
real(wp) :: file_time, file_dt
604604
integer :: file_num_procs, file_tot_part, tot_part
605605

606-
#ifdef MFC_MPI
606+
#ifndef MFC_MPI
607+
@:PROHIBIT(.true., "Lagrangian particle restart requires MPI (--mpi)")
608+
#else
607609
real(wp), dimension(20) :: inputvals
608610
integer, dimension(MPI_STATUS_SIZE) :: status
609611
integer(kind=MPI_OFFSET_KIND) :: disp
@@ -778,10 +780,10 @@ contains
778780
real(wp) :: myMass, myR, myBeta_c, myBeta_t, myR0, myRe, mydrhodt, myVolumeFrac, myGamma, rmass_add, func_sum
779781
real(wp), dimension(3) :: myVel, myPos, force_vec, s_cell
780782
logical :: only_beta
781-
only_beta = .false.
782-
783783
integer :: k, l, i, j
784784

785+
only_beta = .false.
786+
785787
if (lag_params%pressure_force .or. lag_params%added_mass_model > 0) then
786788
do l = 1, num_dims
787789
if (l == 1) then
@@ -1650,10 +1652,11 @@ contains
16501652
integer :: patch_id, newBubs, new_idx
16511653
integer, dimension(3) :: cell
16521654
logical :: inc_ghost
1653-
inc_ghost = .false.
16541655
real(wp) :: myR, func_sum
16551656
real(wp), dimension(3) :: myPos, myVel, myForce
16561657
logical :: only_beta
1658+
1659+
inc_ghost = .false.
16571660
only_beta = .true.
16581661
16591662
call nvtxStartRange("LAG-BC")
@@ -2030,8 +2033,8 @@ contains
20302033
subroutine s_gradient_field(vL_field, vR_field, dq, dir, field_var)
20312034

20322035
real(stp), dimension(idwbuff(1)%beg:, idwbuff(2)%beg:, idwbuff(3)%beg:), intent(out) :: dq
2033-
real(wp), dimension(idwbuff(1)%beg:, idwbuff(2)%beg:, idwbuff(3)%beg:, 1:), intent(inout) :: vL_field
2034-
real(wp), dimension(idwbuff(1)%beg:, idwbuff(2)%beg:, idwbuff(3)%beg:, 1:), intent(inout) :: vR_field
2036+
real(wp), dimension(idwbuff(1)%beg:, idwbuff(2)%beg:, idwbuff(3)%beg:, 1:), intent(in) :: vL_field
2037+
real(wp), dimension(idwbuff(1)%beg:, idwbuff(2)%beg:, idwbuff(3)%beg:, 1:), intent(in) :: vR_field
20352038
integer, intent(in) :: dir, field_var
20362039

20372040
integer :: i, j, k

src/simulation/m_time_steppers.fpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,16 @@ module m_time_steppers
7070

7171
real(wp), allocatable, dimension(:, :, :, :, :) :: rhs_mv
7272

73+
real(wp), allocatable, dimension(:, :, :) :: max_dt
74+
7375
integer, private :: num_ts !<
7476
!! Number of time stages in the time-stepping scheme
7577

7678
integer :: stor !< storage index
7779
real(wp), allocatable, dimension(:, :) :: rk_coef
7880
integer, private :: num_probe_ts
7981

80-
$:GPU_DECLARE(create='[q_cons_ts,q_prim_vf,q_T_sf,rhs_vf,q_prim_ts1,q_prim_ts2,rhs_mv,rhs_pb,rk_coef,stor,bc_type]')
82+
$:GPU_DECLARE(create='[q_cons_ts,q_prim_vf,q_T_sf,rhs_vf,q_prim_ts1,q_prim_ts2,rhs_mv,rhs_pb,max_dt,rk_coef,stor,bc_type]')
8183

8284
!> @cond
8385
#if defined(__NVCOMPILER_GPU_UNIFIED_MEM)

0 commit comments

Comments
 (0)