IB Particle Mesh Output#1375
Conversation
…ed, and updated a mass value while I was at it. Regenerated golden files to handle IB state data output
Claude Code ReviewHead SHA: 4836c1f Files changed:
Findings1. Race condition: serial IB state write from all ranksFile: The call site in if (ib .and. proc_rank == 0) call s_write_ib_state_file()to: if (ib) call s_write_ib_state_file(t_step)The open (newunit=file_unit, file=trim(file_loc), form='unformatted', access='stream', status='replace', iostat=ios)
...
do i = 1, num_ibs
write (file_unit) ib_buf
end do
close (file_unit)All N ranks simultaneously truncate and write the same file. The resulting file content is undefined. The initial write at step 0 ( Fix: Guard 2. Silo post-process writes duplicate IB bodies from every rankFile: After the MPI broadcast, all ranks hold the complete set of err = DBPUTPM(dbfile, 'ib_bodies', 9, 3, px, py, pz, nBodies, DB_DOUBLE, DB_F77NULL, ierr)and err = DBPUTPV1(dbfile, ..., data, nBodies, DB_DOUBLE, DB_F77NULL, ierr)Each rank writes all do i = 1, num_procs
write (meshnames(i), '(A,I0,A,I0,A)') '../p', i - 1, '/', t_step, '.silo:ib_bodies'VisIt / Silo will interpret this as Fix: Either (a) only rank 0 writes the point mesh to its local file and the master mesh references only that one entry, or (b) distribute bodies across ranks matching the simulation-side 3.
|
…into parallel-state-write
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 16 minutes and 19 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (10)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1375 +/- ##
==========================================
+ Coverage 64.62% 64.73% +0.11%
==========================================
Files 71 71
Lines 18407 18527 +120
Branches 1516 1523 +7
==========================================
+ Hits 11895 11993 +98
- Misses 5555 5573 +18
- Partials 957 961 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
Updated IB state writing to write using parallel MPI IO for better write times.
Also added post-processing affects using the
ib_state_wrtflag to generate a particle mesh in the output SILO files, which can be used for analysis and smoother plotting in visualization.Type of change
Testing
I added the changes to the
2D_mibm_shock_cylinderexample case and plotted the output using the new point mesh for visualization.Checklist
GPU changes (expand if you modified
src/simulation/)