Remove the fluid center-of-mass output, which no case can ask for or turn off - #1873
Remove the fluid center-of-mass output, which no case can ask for or turn off#1873sbryngelson wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Pull request overview
Removes an always-on (when probe_wrt is enabled) center-of-mass (CoM) reduction + file output pipeline that had no user-facing parameter to enable/disable it, eliminating unnecessary per-timestep GPU atomics and MPI reductions and stopping unexpected fluid<i>_com.dat outputs.
Changes:
- Removed CoM file lifecycle routines (
s_open_com_files,s_write_com_files,s_close_com_files) and their call sites. - Removed the CoM reduction routine (
s_derive_center_of_mass) and associatedc_massstorage/allocation. - Dropped
m_mpi_proxydependency fromm_derived_variablessince CoM allreduces were its only use there.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/simulation/m_derived_variables.fpp |
Removes CoM derivation + I/O calls and simplifies finalization to only close probe files when enabled. |
src/simulation/m_data_output.fpp |
Removes CoM-related public APIs, c_mass storage, and CoM file open/write/close implementations. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Lines of Code
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1873 +/- ##
==========================================
+ Coverage 61.26% 61.35% +0.08%
==========================================
Files 84 84
Lines 22330 22215 -115
Branches 3265 3254 -11
==========================================
- Hits 13680 13629 -51
+ Misses 6207 6151 -56
+ Partials 2443 2435 -8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
s_derive_center_of_masscomputes each fluid's mass, mass-weighted position and total volume every timestep and writes them tofluid<i>_com.dat. There is nocom_wrtparameter — the feature has no switch anywhere intoolchain/mfc/params/, so no case can request it and no case can turn it off. It is instead gated onprobe_wrt:So every probe-enabled case pays for a full-domain reduction per step — three to five
GPU_ATOMICaccumulations per cell per fluid, then up to fiveMPI_ALLREDUCEs per fluid — and getsfluid<i>_com.datfiles in the case directory that nobody asked for. Nothing inexamples/,tests/,benchmarks/or the docs reads them.Removed:
s_open_com_files,s_write_com_files,s_close_com_files,s_derive_center_of_mass, thec_massarray with itsGPU_DECLARE/ALLOCATE/DEALLOCATE, and the four call sites.m_derived_variablesno longer needsm_mpi_proxy— the allreduces were its only use of it.Not touched:
s_compute_centroid_offsetinm_ibm.fpp, whose localcenter_of_massis the immersed-body centroid. Different quantity, and it is used.248 lines net removed. Goldens are unaffected — the CoM files were written to the case root, not
D/.Verified:
./mfc.sh precheckclean; CPU build; 25/25 on the probe, hypoelastic and IBM tests (the probe case18DB27D5is the only one that reached this code), and no*_com.datis produced.