New Issue: Disallow duplicates for BlockDist targetLocales

20162, "ronawho", "Disallow duplicates for BlockDist targetLocales", "2022-07-05T21:53:31Z"

Currently block allows duplicate targetLocales entires, but ends up breaking for various operations. At the very least I know it breaks for localAccess, but there are probably others things that don't work.

use BlockDist;

config const useLocalAccess = false;

const space = {1..10};
const Dom = space dmapped Block(space, targetLocales=[here,here]);
var A: [Dom] int;

if useLocalAccess {
  A.localAccess[1] = 1;
  A.localAccess[10] = 10;
} else {
  A[1] = 1;
  A[10] = 10;
}

writeln(A);
./dupeTargetLocs --useLocalAccess
dupeTargetLocs.chpl:10: error: halt reached - array index out of bounds
note: index was 1 but array bounds are 6..10

Given that duplicate target locales doesn't work today (and there are some optimizations we want to pursue that don't allow duplicates) I think we should make it illegal today and if there's interest in the future we could consider adding it or adding a new distribution that supports it.