19859, "Guillaume-Helbecque", "DistributedBag module: Insertion of Chapel Array inside the bag", "2022-05-22T17:38:26Z"
Summary of Problem
When we tried to add a Chapel array of integers (for example) or a record containing a Chapel array in a distributed bag using bag.add(), we obtained the following error error: attempt to dereference nil (without --fast).
Possible workarounds for this is to use C array or Chapel tuple.
Steps to Reproduce
Source Codes:
use DistributedBag;
var arr: [0..4] int = [0, 1, 2, 3, 4];
var bag1 = new DistBag([0..4] int, targetLocales=Locales);
bag1.add(arr);
or
use DistributedBag;
record Node {
var x: int;
var y: [0..4] int;
}
var n = new Node(0, [0, 1, 2, 3, 4]);
var bag2 = new DistBag(Node, targetLocales=Locales);
bag2.add(n);
Compile command:
chpl foo.chpl -o foo.o
Execution command:
./foo.o
Configuration Information
Output of chpl --version: 1.26.0
Output of $CHPL_HOME/util/printchplenv --anonymize: