Skip to content

Fill ib_markers halo cells in post_process - #2011

Closed
sbryngelson wants to merge 3 commits into
MFlowCode:masterfrom
sbryngelson:fix-ib-markers-halo
Closed

sbryngelson wants to merge 3 commits into
MFlowCode:masterfrom
sbryngelson:fix-ib-markers-halo

Conversation

@sbryngelson

@sbryngelson sbryngelson commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

Fixes #2010

post_process writes ib_markers including its ghost layers, but reads only the interior, so the ghosts were 0. The viz silo assembler let those zeros overwrite the neighbor rank's real cells, showing 2 fluid planes inside the body before each internal rank boundary.

Add s_exchange_ib_markers_halo, which copies the markers into a real scalar_field and fills the MPI-boundary ghosts with the existing s_mpi_sendrecv_variables_buffers, then returns the ghost-inclusive array that s_save_data writes. No new exchange code. Physical-boundary ghosts are left as before.

Verified on test A2036630 (2D IBM rectangle, 50x40, CPU+MPI, silo output at step 1), solid cells per x column for columns 15-34:

run columns 15-22 columns 23-24 columns 25-34
1 rank 16 16 16
2 ranks, master 16 0 16
2 ranks, this PR 16 16 16

The 2-rank output with this PR is identical to the 1-rank output. ./mfc.sh test --no-mpi --no-gpu -j 24 --only IBM passes (61 passed, 0 failed), and ./mfc.sh precheck passes. Only post_process output changes; simulation results are unaffected. The 3D multi-rank case from the issue was not re-run.

The silo ib_markers field includes the ghost layers, but post_process
reads only the interior, so the ghosts were 0 and overwrote the
neighbor rank's real cells when the files were assembled. Fill them
with the existing MPI buffer exchange.
@github-actions

Copy link
Copy Markdown

Lines of Code

File Lines Diff
src/post_process/m_start_up.fpp 808 +16
Directory Lines Diff
post_process 3515 +16
total 47530 +16

@sbryngelson

Copy link
Copy Markdown
Member Author

Closing this for now to bring the number of open PRs from me down to four, so the ones that stay open get real review attention rather than being lost in a queue of 35.

No work is lost and nothing needs re-doing. The branch fix-ib-markers-halo remains on the fork at d001228cb1, this PR's diff and discussion stay here, and the head commit is additionally archived in a local verified bundle. Reopening takes no force-push and no rebase:

gh pr reopen 2011 -R MFlowCode/MFC

I intend to reopen these in small batches as the open slots free up. Apologies for the notification noise.

Opened and closed with Claude Code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

post_process writes unfilled ghost cells of ib_markers on multi-rank runs

1 participant