Skip to content

Check and Fix Warnings during Compiling #843

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions src/common/m_boundary_common.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ contains
real(wp), dimension(idwbuff(1)%beg:, idwbuff(2)%beg:, idwbuff(3)%beg:, 1:, 1:), intent(inout) :: pb, mv
type(integer_field), dimension(1:num_dims, -1:1), intent(in) :: bc_type

integer :: bc_loc, bc_dir
integer :: k, l

! Population of Buffers in x-direction
Expand Down Expand Up @@ -249,7 +248,7 @@ contains
integer, intent(in) :: bc_dir, bc_loc
integer, intent(in) :: k, l

integer :: j, q, i
integer :: j, i

if (qbmm .and. .not. polytropic) then
call s_qbmm_extrapolation(pb, mv, bc_dir, bc_loc, k, l)
Expand Down Expand Up @@ -789,7 +788,7 @@ contains
integer, intent(in) :: bc_dir, bc_loc
integer, intent(in) :: k, l

integer :: j, q, i
integer :: j, i

if (qbmm .and. .not. polytropic) then
call s_qbmm_extrapolation(pb, mv, bc_dir, bc_loc, k, l)
Expand Down Expand Up @@ -888,7 +887,7 @@ contains
integer, intent(in) :: bc_dir, bc_loc
integer, intent(in) :: k, l

integer :: j, q, i
integer :: j, i

if (qbmm .and. .not. polytropic) then
call s_qbmm_extrapolation(pb, mv, bc_dir, bc_loc, k, l)
Expand Down Expand Up @@ -1023,7 +1022,7 @@ contains
integer, intent(in) :: bc_dir, bc_loc
integer, intent(in) :: k, l

integer :: j, i, q
integer :: j, i

#ifdef MFC_PRE_PROCESS
call s_ghost_cell_extrapolation(q_prim_vf, pb, mv, 1, -1, k, l)
Expand Down Expand Up @@ -1162,7 +1161,7 @@ contains
type(scalar_field), dimension(num_dims + 1), intent(inout) :: c_divs
type(integer_field), dimension(1:num_dims, -1:1), intent(in) :: bc_type

integer :: i, j, k, l
integer :: k, l

!< x-direction
if (bcxb >= 0) then
Expand Down Expand Up @@ -1290,7 +1289,7 @@ contains
integer, intent(in) :: bc_dir, bc_loc
integer, intent(in) :: k, l

integer :: j, i, q
integer :: j, i

if (bc_dir == 1) then !< x-direction
if (bc_loc == -1) then !bc_x%beg
Expand Down Expand Up @@ -1348,7 +1347,7 @@ contains
integer, intent(in) :: bc_dir, bc_loc
integer, intent(in) :: k, l

integer :: j, i, q
integer :: j, i

if (bc_dir == 1) then !< x-direction
if (bc_loc == -1) then !bc_x%beg
Expand Down Expand Up @@ -1430,7 +1429,7 @@ contains
integer, intent(in) :: bc_dir, bc_loc
integer, intent(in) :: k, l

integer :: j, i, q
integer :: j, i

if (bc_dir == 1) then !< x-direction
if (bc_loc == -1) then !bc_x%beg
Expand Down Expand Up @@ -1485,7 +1484,7 @@ contains
#ifdef MFC_MPI
integer :: dir, loc
integer, dimension(3) :: sf_start_idx, sf_extents_loc
integer :: ifile, ierr, data_size
integer :: ierr

do dir = 1, num_dims
do loc = -1, 1, 2
Expand Down
2 changes: 1 addition & 1 deletion src/common/m_chemistry.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ contains
type(int_bounds_info), dimension(1:3), intent(in) :: bounds

integer :: x, y, z, eqn
real(wp) :: energy, mean_molecular_weight
real(wp) :: energy
real(wp), dimension(num_species) :: Ys

do z = bounds(3)%beg, bounds(3)%end
Expand Down
4 changes: 2 additions & 2 deletions src/common/m_eigen_solver.f90
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ subroutine corth(nm, nl, low, igh, ar, ai, ortr, orti)
real(wp), dimension(igh), intent(out) :: ortr, orti

integer :: i, j, ml, ii, jj, la, mp, kp1, mll
real(wp) :: f, g, h, fi, fr, scale, c
real(wp) :: f, g, h, fi, fr, scale

mll = 6

Expand Down Expand Up @@ -353,7 +353,7 @@ subroutine comqr2(nm, nl, low, igh, ortr, orti, hr, hi, wr, wi, zr, zi, ierr)

integer :: i, j, k, l, ml, en, ii, jj, ll, nn, ip1, itn, its, lp1, enm1, iend
real(wp) :: si, sr, ti, tr, xi, xr, xxi, xxr, yi, yr, zzi, zzr, &
norm, tst1, tst2, c, d
norm, tst1, tst2, c
!
ierr = 0
! initialize eigenvector matrix
Expand Down
2 changes: 0 additions & 2 deletions src/common/m_helper.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,6 @@ contains

integer :: i

real(wp), dimension(1:4) :: tmp

do i = 1, 3
call s_transform_vec(triangle%v(i, :), matrix)
end do
Expand Down
6 changes: 3 additions & 3 deletions src/common/m_mpi_common.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ contains
#ifdef MFC_MPI

! Generic loop iterator
integer :: i, j, q, k, l
integer :: i, j

!Altered system size for the lagrangian subgrid bubble model
integer :: alt_sys
Expand Down Expand Up @@ -309,7 +309,7 @@ contains
integer, intent(in) :: root ! Rank of the root process
real(wp), allocatable, intent(out) :: gathered_vector(:) ! Gathered vector on the root process

integer :: i, offset, ierr
integer :: i, ierr
integer, allocatable :: recounts(:), displs(:)

#ifdef MFC_MPI
Expand Down Expand Up @@ -1076,7 +1076,7 @@ contains
type(scalar_field), dimension(num_dims + 1), intent(inout) :: c_divs_vf
integer, intent(in) :: mpi_dir, pbc_loc

integer :: i, j, k, l, r, q !< Generic loop iterators
integer :: i, j, k, l, r !< Generic loop iterators

integer :: buffer_counts(1:3), buffer_count

Expand Down
18 changes: 7 additions & 11 deletions src/common/m_variables_conversion.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -846,15 +846,15 @@ contains

real(wp) :: rhoYks(1:num_species)

real(wp) :: vftmp, nR3, nbub_sc, R3tmp
real(wp) :: vftmp, nbub_sc

real(wp) :: G_K

real(wp) :: pres, Yksum
real(wp) :: pres

integer :: i, j, k, l, q !< Generic loop iterators
integer :: i, j, k, l !< Generic loop iterators

real(wp) :: ntmp, T
real(wp) :: T
real(wp) :: pres_mag

real(wp) :: Ga ! Lorentz factor (gamma in relativity)
Expand Down Expand Up @@ -885,7 +885,7 @@ contains

!$acc parallel loop collapse(3) gang vector default(present) &
!$acc private(alpha_K, alpha_rho_K, Re_K, nRtmp, rho_K, gamma_K, &
!$acc pi_inf_K, qv_K, dyn_pres_K, R3tmp, rhoYks, B)
!$acc pi_inf_K, qv_K, dyn_pres_K, rhoYks, B)
do l = ibounds(3)%beg, ibounds(3)%end
do k = ibounds(2)%beg, ibounds(2)%end
do j = ibounds(1)%beg, ibounds(1)%end
Expand Down Expand Up @@ -1181,13 +1181,12 @@ contains
real(wp) :: pi_inf
real(wp) :: qv
real(wp) :: dyn_pres
real(wp) :: nbub, R3, vftmp, R3tmp
real(wp) :: nbub, R3tmp
real(wp), dimension(nb) :: Rtmp
real(wp) :: G
real(wp), dimension(2) :: Re_K

integer :: i, j, k, l, q !< Generic loop iterators
integer :: spec
integer :: i, j, k, l !< Generic loop iterators

real(wp), dimension(num_species) :: Ys
real(wp) :: e_mix, mix_mol_weight, T
Expand Down Expand Up @@ -1592,8 +1591,6 @@ contains

subroutine s_finalize_variables_conversion_module()

integer :: i !< Generic loop iterators

! Deallocating the density, the specific heat ratio function and the
! liquid stiffness function
#ifdef MFC_POST_PROCESS
Expand Down Expand Up @@ -1698,7 +1695,6 @@ contains
integer, intent(in) :: norm

real(wp) :: B2, term, disc
real(wp) :: term2

B2 = sum(B**2)

Expand Down
2 changes: 1 addition & 1 deletion src/post_process/m_data_input.f90
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ subroutine s_read_parallel_data_files(t_step)

integer :: ifile, ierr, data_size
integer, dimension(MPI_STATUS_SIZE) :: status
real(wp) :: start, finish

integer(KIND=MPI_OFFSET_KIND) :: disp
integer(KIND=MPI_OFFSET_KIND) :: m_MOK, n_MOK, p_MOK
integer(KIND=MPI_OFFSET_KIND) :: WP_MOK, var_MOK, str_MOK
Expand Down
24 changes: 10 additions & 14 deletions src/post_process/m_data_output.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,6 @@ contains

! Generic loop iterator
integer :: i, j, k
real(wp) :: start, finish

! Silo-HDF5 Database Format

Expand Down Expand Up @@ -1092,23 +1091,22 @@ contains
subroutine s_write_lag_bubbles_results(t_step)

integer, intent(in) :: t_step
character(len=len_trim(case_dir) + 2*name_len) :: t_step_dir

character(len=len_trim(case_dir) + 3*name_len) :: file_loc
logical :: dir_check
integer :: id, nlg_bubs

integer :: id

#ifdef MFC_MPI
real(wp), dimension(20) :: inputvals
real(wp) :: id_real, time_real
real(wp) :: time_real
integer, dimension(MPI_STATUS_SIZE) :: status
integer(KIND=MPI_OFFSET_KIND) :: disp
integer :: view

integer, dimension(3) :: cell
logical :: indomain, lg_bub_file, lg_bub_data, file_exist
logical :: lg_bub_file, file_exist

integer, dimension(2) :: gsizes, lsizes, start_idx_part
integer :: ifile, ireq, ierr, data_size, tot_data
integer :: ifile, ierr, tot_data
integer :: i

write (file_loc, '(A,I0,A)') 'lag_bubbles_mpi_io_', t_step, '.dat'
Expand Down Expand Up @@ -1196,12 +1194,11 @@ contains
subroutine s_write_intf_data_file(q_prim_vf)

type(scalar_field), dimension(sys_size), intent(IN) :: q_prim_vf
integer :: i, j, k, l, w, cent !< Generic loop iterators
integer :: ierr, counter, root !< number of data points extracted to fit shape to SH perturbations
real(wp), dimension(num_fluids) :: alpha, vol_fluid, xcom, ycom, zcom
integer :: i, j, k, l, cent !< Generic loop iterators
integer :: counter, root !< number of data points extracted to fit shape to SH perturbations
real(wp), parameter :: pi = 4._wp*tan(1._wp)
real(wp), allocatable :: x_td(:), y_td(:), x_d1(:), y_d1(:), y_d(:), x_d(:)
real(wp) :: axp, axm, ayp, aym, azm, azp, tgp, euc_d, thres, maxalph_loc, maxalph_glb
real(wp) :: axp, axm, ayp, aym, tgp, euc_d, thres, maxalph_loc, maxalph_glb

allocate (x_d1(m*n))
allocate (y_d1(m*n))
Expand Down Expand Up @@ -1290,9 +1287,8 @@ contains
real(wp) :: Elk, Egk, Elp, Egint, Vb, Vl, pres_av, Et
real(wp) :: rho, pres, dV, tmp, gamma, pi_inf, MaxMa, MaxMa_glb, maxvel, c, Ma, H
real(wp), dimension(num_vels) :: vel
real(wp), dimension(num_fluids) :: gammas, pi_infs, adv
real(wp), dimension(num_fluids) :: adv
integer :: i, j, k, l, s !looping indices
integer :: ierr, counter, root !< number of data points extracted to fit shape to SH perturbations

Egk = 0_wp
Elp = 0_wp
Expand Down
7 changes: 1 addition & 6 deletions src/post_process/m_derived_variables.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,6 @@ contains
real(wp), dimension(ndim), intent(inout) :: b
real(wp), dimension(ndim), intent(out) :: sol

integer, dimension(ndim) :: ipiv

integer :: nrhs, lda, ldb, info
!EXTERNAL DGESV

integer :: i, j, k
Expand Down Expand Up @@ -491,7 +488,7 @@ contains
real(wp), &
dimension(1:3, 1:3) :: q_jacobian_sf, S, S2, O, O2

real(wp) :: trS, trS2, trO2, Q, IIS
real(wp) :: trS, Q, IIS
integer :: j, k, l, r, jj, kk !< Generic loop iterators

do l = -offset_z%beg, p + offset_z%end
Expand Down Expand Up @@ -585,8 +582,6 @@ contains
!! The first position in the variable contains the maximum value and
!! the second contains the rank of the processor on which it occurred.

real(wp) :: alpha_unadv !< Unadvected volume fraction

integer :: i, j, k, l !< Generic loop iterators

! Computing Gradient Magnitude of Density
Expand Down
13 changes: 0 additions & 13 deletions src/pre_process/m_assign_variables.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,7 @@ contains
type(scalar_field), dimension(1:sys_size), intent(inout) :: q_prim_vf
integer, dimension(0:m, 0:n, 0:p), intent(inout) :: patch_id_fp

real(wp) :: rho !< density
real(wp), dimension(int(E_idx - mom_idx%beg)) :: vel !< velocity
real(wp) :: pres !< pressure
real(wp) :: gamma !< specific heat ratio function
real(wp) :: x_centroid, y_centroid
real(wp) :: epsilon, beta
real(wp) :: Ys(1:num_species)
real(wp) :: mean_molecular_weight

integer :: smooth_patch_id
integer :: i !< generic loop operator
Expand Down Expand Up @@ -308,13 +301,7 @@ contains
real(wp) :: rcoord, theta, phi, xi_sph
real(wp), dimension(3) :: xi_cart

real(wp), dimension(int(E_idx - mom_idx%beg)) :: vel !< velocity
real(wp) :: pres !< pressure
real(wp) :: x_centroid, y_centroid
real(wp) :: epsilon, beta

real(wp) :: Ys(1:num_species)
real(wp) :: mean_molecular_weight

real(wp), dimension(sys_size) :: orig_prim_vf !<
!! Vector to hold original values of cell for smoothing purposes
Expand Down
10 changes: 4 additions & 6 deletions src/pre_process/m_boundary_conditions.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ contains
type(integer_field), dimension(1:num_dims, -1:1), intent(inout) :: bc_type
integer, intent(in) :: patch_id

integer :: i, j, k, l
integer :: j

! Patch is a vertical line at x_beg or x_end
if (patch_bc(patch_id)%dir == 1) then
Expand Down Expand Up @@ -86,7 +86,7 @@ contains

integer, intent(in) :: patch_id

integer :: i, j, k, l
integer :: j, k
if (patch_bc(patch_id)%dir == 1) then
y_centroid = patch_bc(patch_id)%centroid(2)
z_centroid = patch_bc(patch_id)%centroid(3)
Expand Down Expand Up @@ -149,7 +149,7 @@ contains
type(integer_field), dimension(1:num_dims, -1:1), intent(inout) :: bc_type

integer, intent(in) :: patch_id
integer :: i, j, k, l
integer :: j, k
if (patch_bc(patch_id)%dir == 1) then
y_centroid = patch_bc(patch_id)%centroid(2)
z_centroid = patch_bc(patch_id)%centroid(3)
Expand Down Expand Up @@ -274,7 +274,7 @@ contains

character(LEN=*), intent(in) :: step_dirpath

integer :: dir, loc, i
integer :: dir, loc
character(len=path_len) :: file_path

character(len=10) :: status
Expand Down Expand Up @@ -315,8 +315,6 @@ contains
integer :: dir, loc
character(len=path_len) :: file_loc, file_path

character(len=10) :: status

#ifdef MFC_MPI
integer :: ierr
integer :: file_id
Expand Down
Loading
Loading