From c9d5ee28a6d8e49ebf65b1d61376fb8064a04528 Mon Sep 17 00:00:00 2001 From: tess <48131946+stress-tess@users.noreply.github.com> Date: Thu, 8 Aug 2024 19:09:12 -0400 Subject: [PATCH] Fixes #3627: multilocale choice failures (#3636) 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 --- src/RandMsg.chpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/RandMsg.chpl b/src/RandMsg.chpl index 6837302676..3d2e9b198b 100644 --- a/src/RandMsg.chpl +++ b/src/RandMsg.chpl @@ -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));