Skip to content

Commit 1782b1a

Browse files
sbryngelsonclaude
andcommitted
Fix time_real used uninitialized in Lagrangian bubble output
time_real is declared but never assigned from file_time after the MPI broadcast. The time column in output contains garbage. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e417c68 commit 1782b1a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/post_process/m_data_output.fpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,6 +1099,7 @@ contains
10991099
call MPI_BCAST(file_time, 1, mpi_p, 0, MPI_COMM_WORLD, ierr)
11001100
call MPI_BCAST(file_dt, 1, mpi_p, 0, MPI_COMM_WORLD, ierr)
11011101
call MPI_BCAST(file_num_procs, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr)
1102+
time_real = file_time
11021103
11031104
allocate (proc_bubble_counts(file_num_procs))
11041105
@@ -1267,6 +1268,7 @@ contains
12671268
call MPI_BCAST(file_time, 1, mpi_p, 0, MPI_COMM_WORLD, ierr)
12681269
call MPI_BCAST(file_dt, 1, mpi_p, 0, MPI_COMM_WORLD, ierr)
12691270
call MPI_BCAST(file_num_procs, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr)
1271+
time_real = file_time
12701272
12711273
allocate (proc_bubble_counts(file_num_procs))
12721274

0 commit comments

Comments
 (0)