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

lulesh-amp: "reference to 'index' is ambiguous" #8

Open
paklui opened this issue Dec 12, 2019 · 0 comments
Open

lulesh-amp: "reference to 'index' is ambiguous" #8

paklui opened this issue Dec 12, 2019 · 0 comments

Comments

@paklui
Copy link

paklui commented Dec 12, 2019

For lulesh-amp. There appears to be some issue during compile about "reference to 'index' is ambiguous".

The workaround is to use Kalmar::index in place of index like this.

-                     HCC_ID(vnewc)](index<1> idx) restrict(amp)
+                     HCC_ID(vnewc)](Kalmar::index<1> idx) restrict(amp)

The git diff is attached. git-diff-lulesh-amp.txt

Sample error:

paklui@ixt-hq-50:~/ComputeApps/lulesh-amp$ make
Building lulesh.cc
/opt/rocm/hcc/bin/hcc -c  -hc -std=c++amp -I/opt/rocm/hcc/include -I/opt/rocm/include -DBLOCKSIZE=256 -DARRAY_VIEW -O3 -o objs/lulesh.o  lulesh.cc
lulesh.cc:347:20: error: reference to 'index' is ambiguous
                                                         HCC_ID(q)](index<1> idx) restrict(amp){
                                                                    ^
/usr/include/strings.h:68:14: note: candidate found by name lookup is 'index'
extern char *index (const char *__s, int __c)
             ^
/opt/rocm/hcc/bin/../include/hc.hpp:78:1: note: candidate found by name lookup is 'hc::index'
using index = Kalmar::index<N>;
^
lulesh.cc:631:29: error: reference to 'index' is ambiguous
...
/opt/rocm/hcc/bin/../include/hc.hpp:78:1: note: candidate found by name lookup is 'hc::index'
using index = Kalmar::index<N>;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
Makefile:57: recipe for target 'objs/lulesh.o' failed
make: *** [objs/lulesh.o] Error 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant