Commit de6add6
committed
fix: use MOVE_ALLOC for 1-rank/no-MPI to avoid patch_ib truncation
For single-rank and no-MPI cases every IB patch is local, so shrinking
patch_ib to num_aware_ibs (e.g. 54k for 3D) and then keeping num_ibs at
num_gbl_ibs was a latent out-of-bounds: IBM loops over num_ibs would
access patch_ib beyond its capacity.
MOVE_ALLOC transfers patch_ib_gbl (sized exactly num_gbl_ibs) directly
into patch_ib — no copy, no truncation, patch_ib size matches num_ibs.
The num_aware_ibs resize is still done for multi-rank cases where each
rank genuinely only needs its local neighbourhood subset.1 parent 0af6cb9 commit de6add6
1 file changed
Lines changed: 13 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1212 | 1212 | | |
1213 | 1213 | | |
1214 | 1214 | | |
1215 | | - | |
| 1215 | + | |
1216 | 1216 | | |
1217 | 1217 | | |
1218 | 1218 | | |
| |||
1231 | 1231 | | |
1232 | 1232 | | |
1233 | 1233 | | |
1234 | | - | |
1235 | | - | |
1236 | | - | |
1237 | | - | |
1238 | | - | |
1239 | 1234 | | |
1240 | 1235 | | |
1241 | 1236 | | |
1242 | 1237 | | |
1243 | 1238 | | |
1244 | 1239 | | |
| 1240 | + | |
| 1241 | + | |
1245 | 1242 | | |
1246 | | - | |
1247 | | - | |
1248 | 1243 | | |
1249 | | - | |
1250 | | - | |
| 1244 | + | |
| 1245 | + | |
1251 | 1246 | | |
1252 | | - | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
1253 | 1251 | | |
1254 | 1252 | | |
1255 | 1253 | | |
| |||
1269 | 1267 | | |
1270 | 1268 | | |
1271 | 1269 | | |
| 1270 | + | |
| 1271 | + | |
1272 | 1272 | | |
1273 | 1273 | | |
1274 | | - | |
1275 | | - | |
1276 | | - | |
| 1274 | + | |
| 1275 | + | |
1277 | 1276 | | |
1278 | 1277 | | |
1279 | | - | |
1280 | | - | |
1281 | 1278 | | |
1282 | 1279 | | |
1283 | 1280 | | |
| |||
0 commit comments