Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map.keys() and .values() parallel iterators? #24056

Open
cassella opened this issue Dec 9, 2023 · 1 comment · May be fixed by #26519
Open

Map.keys() and .values() parallel iterators? #24056

cassella opened this issue Dec 9, 2023 · 1 comment · May be fixed by #26519

Comments

@cassella
Copy link
Contributor

cassella commented Dec 9, 2023

Summary of Problem

A forall loop over a map's keys() or values() iterator fails to compile.

Steps to Reproduce

Source Code:

use Map;

var m: map(int, int);

for i in 1..100 do m[i] = i;

var s = 0;
forall k in m.keys() with (+ reduce s) do s += k;
writeln(s);

Compile command:
chpl foo.chpl

foo.chpl:1: In module 'foo':
foo.chpl:8: error: A standalone or leader iterator is not found for the iterable expression in this forall loop

Ditto for m.values().

Associated Future Test(s):

None yet

Configuration Information

chpl version 1.33.0
  built with LLVM version 14.0.0
(really, today's main)

gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0

Ubuntu clang version 14.0.0-1ubuntu1.1

CHPL_TARGET_PLATFORM: linux64
CHPL_TARGET_COMPILER: llvm
CHPL_TARGET_ARCH: x86_64
CHPL_TARGET_CPU: native *
CHPL_LOCALE_MODEL: flat
CHPL_COMM: gasnet *
  CHPL_COMM_SUBSTRATE: udp
  CHPL_GASNET_SEGMENT: everything
CHPL_TASKS: qthreads
CHPL_LAUNCHER: amudprun
CHPL_TIMERS: generic
CHPL_UNWIND: none
CHPL_MEM: jemalloc
CHPL_ATOMICS: cstdlib
  CHPL_NETWORK_ATOMICS: none
CHPL_GMP: bundled
CHPL_HWLOC: bundled
CHPL_RE2: none
CHPL_LLVM: system
CHPL_AUX_FILESYS: none
@cassella cassella changed the title Map.keys() parallel iterator? Map.keys() and .values() parallel iterators? Dec 9, 2023
@bradcray
Copy link
Member

bradcray commented Dec 9, 2023

Boy, sure looks like they don't (and haven't since Map was introduced).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants