Skip to content

Commit 4cb49ae

Browse files
committed
src: broadcast wall-velocity BC members in pre and post
bc_x/y/z%{vb1,vb2,vb3,ve1,ve2,ve3} are read from the namelist on rank 0 and consumed on all ranks by s_slip_wall/s_no_slip_wall in src/common/m_boundary_common.fpp (~833-1155). These routines are compiled into all three targets and are reached from pre_process (m_data_output, m_perturbation) and post_process (m_start_up) code paths. Without the broadcast, non-root ranks use uninitialised values for the wall-velocity components, producing rank-dependent ghost cells for any multi-rank wall-BC pre-process or post-process run. The sim residue has always broadcast these; pre and post were missing them. Add the matching broadcasts to both pre and post using the same nested Fypp loop idiom as the simulation residue.
1 parent a5a3b0e commit 4cb49ae

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

src/post_process/m_mpi_proxy.fpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,14 @@ contains
8585
call MPI_BCAST(${VAR}$, 1, MPI_LOGICAL, 0, MPI_COMM_WORLD, ierr)
8686
#:endfor
8787

88+
! wall-velocity members consumed by s_slip_wall/s_no_slip_wall on all ranks
89+
#:for DIM in ['x', 'y', 'z']
90+
#:for DIR in [1, 2, 3]
91+
call MPI_BCAST(bc_${DIM}$%vb${DIR}$, 1, mpi_p, 0, MPI_COMM_WORLD, ierr)
92+
call MPI_BCAST(bc_${DIM}$%ve${DIR}$, 1, mpi_p, 0, MPI_COMM_WORLD, ierr)
93+
#:endfor
94+
#:endfor
95+
8896
! manual: cfl_dt (runtime-computed logical), bc_io (BC-file existence)
8997
call MPI_BCAST(cfl_dt, 1, MPI_LOGICAL, 0, MPI_COMM_WORLD, ierr)
9098
call MPI_BCAST(bc_io, 1, MPI_LOGICAL, 0, MPI_COMM_WORLD, ierr)

src/pre_process/m_mpi_proxy.fpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ contains
4949
call MPI_BCAST(${VAR}$, 1, mpi_p, 0, MPI_COMM_WORLD, ierr)
5050
#:endfor
5151

52+
! wall-velocity members consumed by s_slip_wall/s_no_slip_wall on all ranks
53+
#:for DIM in ['x', 'y', 'z']
54+
#:for DIR in [1, 2, 3]
55+
call MPI_BCAST(bc_${DIM}$%vb${DIR}$, 1, mpi_p, 0, MPI_COMM_WORLD, ierr)
56+
call MPI_BCAST(bc_${DIM}$%ve${DIR}$, 1, mpi_p, 0, MPI_COMM_WORLD, ierr)
57+
#:endfor
58+
#:endfor
59+
5260
! manual: cfl_dt (runtime-computed logical), bc_io (BC-file existence)
5361
call MPI_BCAST(cfl_dt, 1, MPI_LOGICAL, 0, MPI_COMM_WORLD, ierr)
5462
call MPI_BCAST(bc_io, 1, MPI_LOGICAL, 0, MPI_COMM_WORLD, ierr)

0 commit comments

Comments
 (0)