Skip to content

Commit 2bd2b59

Browse files
Merge branch 'fix-periodic-ib-issues' of github.com:danieljvickers/MFC into fix-periodic-ib-issues
2 parents 3449699 + 4a2cb4c commit 2bd2b59

11 files changed

Lines changed: 147 additions & 162 deletions

src/common/m_boundary_common.fpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -171,23 +171,22 @@ contains
171171
subroutine s_finalize_boundary_common_module()
172172

173173
if (bc_io) then
174-
deallocate (bc_buffers(1, 1)%sf)
175-
deallocate (bc_buffers(1, 2)%sf)
174+
@:DEALLOCATE(bc_buffers(1, 1)%sf)
175+
@:DEALLOCATE(bc_buffers(1, 2)%sf)
176176
#:if not MFC_CASE_OPTIMIZATION or num_dims > 1
177177
if (n > 0) then
178-
deallocate (bc_buffers(2, 1)%sf)
179-
deallocate (bc_buffers(2, 2)%sf)
178+
@:DEALLOCATE(bc_buffers(2, 1)%sf)
179+
@:DEALLOCATE(bc_buffers(2, 2)%sf)
180180
#:if not MFC_CASE_OPTIMIZATION or num_dims > 2
181181
if (p > 0) then
182-
deallocate (bc_buffers(3, 1)%sf)
183-
deallocate (bc_buffers(3, 2)%sf)
182+
@:DEALLOCATE(bc_buffers(3, 1)%sf)
183+
@:DEALLOCATE(bc_buffers(3, 2)%sf)
184184
end if
185185
#:endif
186186
end if
187187
#:endif
188188
end if
189-
190-
deallocate (bc_buffers)
189+
@:DEALLOCATE(bc_buffers)
191190

192191
end subroutine s_finalize_boundary_common_module
193192

src/common/m_mpi_common.fpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,7 +1504,12 @@ contains
15041504
impure subroutine s_finalize_mpi_common_module
15051505

15061506
#ifdef MFC_MPI
1507+
#ifndef __NVCOMPILER_GPU_UNIFIED_MEM
1508+
@:DEALLOCATE(buff_send, buff_recv)
1509+
#else
1510+
$:GPU_EXIT_DATA(delete='[buff_send, buff_recv]')
15071511
deallocate (buff_send, buff_recv)
1512+
#endif
15081513
#endif
15091514

15101515
end subroutine s_finalize_mpi_common_module

src/common/m_variables_conversion.fpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,6 +1237,9 @@ contains
12371237
if (bubbles_euler) then
12381238
@:DEALLOCATE(bubrs_vc)
12391239
end if
1240+
if (viscous) then
1241+
@:DEALLOCATE(Res_vc)
1242+
end if
12401243
#else
12411244
@:DEALLOCATE(gammas, gs_min, pi_infs, ps_inf, cvs, qvs, qvps, Gs_vc)
12421245
if (bubbles_euler) then

0 commit comments

Comments
 (0)