chapel-lang / chapel

a Productive Parallel Programming Language
https://chapel-lang.org
Other
1.78k stars 420 forks source link

Multiple sync variable declarations cause runtime hang for GPU locale model #23582

Open daviditen opened 1 year ago

daviditen commented 1 year ago

With the GPU locale model and CHPL_GPU=nvidia, the example codes release/examples/primers.chpl and release/examples/benchmarks/shootout/threadring.chpl produce all of their expected output and then hang. I reduced the error down to the tiny code below, but we should verify that these two larger tests are fixed before declaring this issue fixed. These pass with CHPL_GPU=cpu.

Steps to Reproduce

Source Code:

var si: sync int;
var sb: sync bool;

Compile command: chpl --no-checks syncs.chpl

Execution command: ./syncs

Configuration Information

$ printchplenv --anonymize
CHPL_TARGET_PLATFORM: linux64
CHPL_TARGET_COMPILER: llvm *
CHPL_TARGET_ARCH: x86_64
CHPL_TARGET_CPU: native
CHPL_LOCALE_MODEL: gpu *
  CHPL_GPU: nvidia *
CHPL_COMM: none *
CHPL_TASKS: qthreads
CHPL_LAUNCHER: none
CHPL_TIMERS: generic
CHPL_UNWIND: bundled *
CHPL_MEM: jemalloc
CHPL_ATOMICS: cstdlib
CHPL_GMP: bundled *
CHPL_HWLOC: bundled
CHPL_RE2: bundled
CHPL_LLVM: bundled *
CHPL_AUX_FILESYS: none
$ chpl --version --no-checks
chpl version 1.33.0 pre-release (30ff6893f3)
  built with LLVM version 15.0.7
  available LLVM targets: amdgcn, r600, nvptx64, nvptx, aarch64_32, aarch64_be, aarch64, arm64_32, arm64, x86-64, x86
Copyright 2020-2023 Hewlett Packard Enterprise Development LP
Copyright 2004-2019 Cray Inc.
(See LICENSE file for more details)
e-kayrakli commented 10 hours ago

On 2.2, the code in the OP works without hanging. threadring.chpl also ran successfully in 100 trials for each execopts. Whatever was causing the issue might have been resolved, but I am keeping the issue open for the time being, in case the issue occurs on some other system.