16872, “mppf”, “problem with nil locale”, “2020-12-15T16:20:25Z”
In working on PR #16871 I am running into an odd problem with code like the following. I am seeing a failed !
on nil
error for a locale. The below program prints out nil
as the value of a locale in a comm=none configuration.
use BlockDist;
config const n = 100000;
record R {
var firstLocaleId = 0;
var lastLocaleId = 0;
iter localeAndIds(A) {
const ref tgtLocs = A.targetLocales();
for tid in firstLocaleId..lastLocaleId {
yield (tgtLocs[tid], tid);
}
}
}
proc mytest() {
writeln("iterating over locales");
for loc in Locales {
writeln("loc=", loc, " loc.id=", loc.id);
}
writeln("iterating over locales with localeAndIds");
var D = {0..#n};
var DD: domain(1) dmapped Block(boundingBox=D) = D;
var A: [DD] int;
var myR = new R();
coforall (loc,tid) in myR.localeAndIds(A) do
on loc do {
writeln("loc=", loc, " loc.id=", loc.id, " tid=", tid);
}
}
mytest();