Skip to content

Commit 27cad3b

Browse files
sbryngelsonclaude
andcommitted
Fix fluid_rho broadcast using MPI_LOGICAL instead of mpi_p
fluid_rho is a real(wp) array but is broadcast with MPI_LOGICAL type, silently corrupting reference densities via bit reinterpretation on non-root ranks. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 84c46e0 commit 27cad3b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/pre_process/m_mpi_proxy.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ contains
5858
& 'igr', 'down_sample', 'simplex_perturb','fft_wrt', 'hyper_cleaning' ]
5959
call MPI_BCAST(${VAR}$, 1, MPI_LOGICAL, 0, MPI_COMM_WORLD, ierr)
6060
#:endfor
61-
call MPI_BCAST(fluid_rho(1), num_fluids_max, MPI_LOGICAL, 0, MPI_COMM_WORLD, ierr)
61+
call MPI_BCAST(fluid_rho(1), num_fluids_max, mpi_p, 0, MPI_COMM_WORLD, ierr)
6262

6363
#:for VAR in [ 'x_domain%beg', 'x_domain%end', 'y_domain%beg', &
6464
& 'y_domain%end', 'z_domain%beg', 'z_domain%end', 'a_x', 'a_y', &

0 commit comments

Comments
 (0)