Remove airfoil and stl paramters#1524
Conversation
Claude Code ReviewHead SHA: 0d27a5e Files changed:
Findings1. Unguarded print *, " * Reading model: " // trim(stl_models(stl_id)%model_filepath)The old code had 2. Potential out-of-bounds array access in airfoil IB checker — correctness bug @:PROHIBIT(n == 0 .or. p > 0 .or. patch_ib(patch_id)%airfoil_id <= 0 &
& .or. ib_airfoil(patch_ib(patch_id)%airfoil_id)%c <= 0._wp &When 3. Wrong Fortran constant in -NIB = _fc("num_ib_patches_max_namelist", 50000) # patch_ib namelist limit
+NIB = _fc("num_ib_patches_max", 50000) # patch_ib (Fortran array bound)Both constants exist in |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1524 +/- ##
==========================================
+ Coverage 60.63% 60.80% +0.16%
==========================================
Files 73 73
Lines 20219 20199 -20
Branches 2937 2932 -5
==========================================
+ Hits 12259 12281 +22
+ Misses 5972 5932 -40
+ Partials 1988 1986 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@sbryngelson approval for benchmark? |
|
AI commanets have been addressed, btw |
|
@danieljvickers Benchmark results are not looking good, even with NVHPC. A quick look through the diff didn't give me any idea why either. |
|
@wilfonba the only test with slow down was Phoenix openACC. It showed 20% slowdowns in pre-process and post-process, and 40% in simulation. Slow down is even for cases without IBM enabled. But Phoenix openMP did not show slow down in any execution times. Because pre-process and post-process are CPU only, that must mean that the binaries being run in the ACC test are identical to the MP test. I think this indicates that the slowdown is just some acute/random failure on the node and not a real slowdown. I will rerun this for safety, but nothing about the results lead me to think this PR introduces an NVHPC openACC slowdown yet. |
|
Reran the case and got back good execution/grind times. It looks like the previous run was just randomly slow. |
|
Case Pre Process Simulation Post Process |
|
@sbryngelson I thought I checked all cases last night and the only one out of place was Phoenix OpenACC, which reran fine. What is that from? Edit, looking at the old run: https://github.com/MFlowCode/MFC/actions/runs/26841117410/job/79221540422 |
|
@sbryngelson The new benchmark times are all good. Ready to merge. |
Description
The patch_ib array has become bloated as many variable have been added to this struct, growing each element to 962 bytes. Several of these variables are unused except in niche cases. Two such examples are the STL models and airfoils. Particularly the STL model is responsible for 492 bytes of this usage (over half).
Since we are not MPI communicating the patch_ib elements regularly, it is important to try to optimize their size. This will improve communication time as well as likely providing a noticeable performance benefit. This was done by creating separate smaller data structures that the patches will call out to that actually contain airfoil and STL information. This will make minor modifications to the case file, which other users should be made aware of.
Fixes #1451
Type of change
Testing
Ran test suite.
Checklist