Skip to content

Commit

Permalink
Fixes #3627: multilocale choice failures (#3636)
Browse files Browse the repository at this point in the history
This PR (fixes #3627) I leftover some logic that I used to call `orderToIndex` when I was tryig to make `choice` work for multi-dimensional arrays. This was causing an assertion error. Since `choice` doesn't support multidim yet, I just switched back to looping over the array directly

Co-authored-by: Tess Hayes <stress-tess@users.noreply.github.com>
  • Loading branch information
stress-tess and stress-tess committed Aug 8, 2024
1 parent 63a9d3e commit c9d5ee2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/RandMsg.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,8 @@ module RandMsg
const arrEntry = st[aName]: borrowed SymEntry(array_dtype, array_nd);
const myArr = arrEntry.a;

forall (idx, arrIdx) in zip(choiceIdx, 0..) with (var agg = newSrcAggregator(array_dtype)) {
agg.copy(choiceArr[choiceArr.domain.orderToIndex(arrIdx)], myArr[idx]);
forall (c, idx) in zip(choiceArr, choiceIdx) with (var agg = newSrcAggregator(array_dtype)) {
agg.copy(c, myArr[idx]);
}

return st.insert(createSymEntry(choiceArr));
Expand Down

0 comments on commit c9d5ee2

Please sign in to comment.