External Issue: DistributedBag module: Insertion of Chapel Array inside the bag

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:
CHPL_TARGET_PLATFORM: linux64
CHPL_TARGET_COMPILER: gnu
CHPL_TARGET_ARCH: native *
CHPL_TARGET_CPU: native
CHPL_LOCALE_MODEL: flat
CHPL_COMM: none
CHPL_TASKS: qthreads *
CHPL_LAUNCHER: none
CHPL_TIMERS: generic
CHPL_UNWIND: none
CHPL_MEM: jemalloc
CHPL_ATOMICS: cstdlib
CHPL_GMP: bundled
CHPL_HWLOC: bundled
CHPL_RE2: bundled
CHPL_LLVM: none *
CHPL_AUX_FILESYS: none
  • Back-end compiler and version: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0