Commit cf38077
committed
data: Fix strided slice with start inside a subdomain
index_glb_to_loc mis-converted a strided global slice when its start (or,
for a negative step, its high end) fell strictly inside the owning
subdomain: the stride phase was computed from the subdomain boundary
instead of the slice start, so the local block picked spurious leading or
trailing elements (e.g. global 2:8:2 gave rank 0 local [0, 2] instead of
[2]). This disagreed with the induced decomposition and made data_gather
on such slices raise a shape mismatch.
Begin the stride phase at the slice start when it lies within the
subdomain, for both the positive (loc_min) and negative (loc_max) cases.
Add a serial regression test for the conversion and exercise the failing
gather slices (2:8:2, 7:0:-2) in the 2D/3D sliced-gather tests.1 parent 9b29276 commit cf38077
2 files changed
Lines changed: 41 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
299 | | - | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
300 | 307 | | |
301 | 308 | | |
302 | 309 | | |
| |||
319 | 326 | | |
320 | 327 | | |
321 | 328 | | |
322 | | - | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
323 | 337 | | |
324 | 338 | | |
325 | 339 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
451 | 451 | | |
452 | 452 | | |
453 | 453 | | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
454 | 473 | | |
455 | 474 | | |
456 | 475 | | |
| |||
1551 | 1570 | | |
1552 | 1571 | | |
1553 | 1572 | | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
1554 | 1577 | | |
1555 | 1578 | | |
1556 | 1579 | | |
| |||
1585 | 1608 | | |
1586 | 1609 | | |
1587 | 1610 | | |
| 1611 | + | |
| 1612 | + | |
1588 | 1613 | | |
1589 | 1614 | | |
1590 | 1615 | | |
| |||
0 commit comments