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

build error ('undefined hidden symbol') using amdclang compilers and no optimizations on frontier #55

Open
cwsmith opened this issue Jun 27, 2023 · 0 comments

Comments

@cwsmith
Copy link

cwsmith commented Jun 27, 2023

Building using the amd compilers without optimizations results in compile errors:

https://github.com/SCOREC/omega_h/wiki/Build-and-Run-on-OLCF-Frontier#build-with-mpi-enabled-using-cray-compiler-wrappers-and-amd-compilers

Adding -O1 or -O2 results in a successful build.

+ /opt/cray/pe/craype/2.7.19/bin/CC -DKOKKOS_DEPENDENCE -D__HIP_ROCclr__ -I/ccs/home/cwsmith/omegahKk/omega_h/src -I/ccs/home/cwsmith/omegahKk/buildOmegahVega90a_amd_RelWithDebInfo_MPIon/src -I/ccs/home/cwsmith/omegahKk/omega_h/tpl -isystem /ccs/home/cwsmith/omegahKk/buildKokkosVega90a_RelWithDebInfo_amd/install/include -g -fno-gpu-rdc -x hip --rocm-path=/opt/rocm-5.3.0 --offload-arch=gfx90a -std=c++17 -MD -MT src/CMakeFiles/omega_h.dir/Omega_h_adj.cpp.o -MF CMakeFiles/omega_h.dir/Omega_h_adj.cpp.o.d -o CMakeFiles/omega_h.dir/Omega_h_adj.cpp.o -c /ccs/home/cwsmith/omegahKk/omega_h/src/Omega_h_adj.cpp
In file included from /ccs/home/cwsmith/omegahKk/omega_h/src/Omega_h_adj.cpp:3:
/ccs/home/cwsmith/omegahKk/omega_h/src/Omega_h_align.hpp:132:1: warning: non-void function does not return a value in all control paths [-Wreturn-type]
}
^
1 warning generated when compiling for gfx90a.
lld: error: undefined hidden symbol: Omega_h::Read<int>::operator[](int) const
>>> referenced by Omega_h_adj.cpp:29 (/ccs/home/cwsmith/omegahKk/omega_h/src/Omega_h_adj.cpp:29)
>>>               /tmp/Omega_h_adj-26bbe5/Omega_h_adj-gfx90a.o:(Omega_h::unmap_adjacency(Omega_h::Read<int>, Omega_h::Adj)::'lambda'(int)::operator()(int) const)
>>> referenced by Omega_h_adj.cpp:29 (/ccs/home/cwsmith/omegahKk/omega_h/src/Omega_h_adj.cpp:29)
>>>               /tmp/Omega_h_adj-26bbe5/Omega_h_adj-gfx90a.o:(Omega_h::unmap_adjacency(Omega_h::Read<int>, Omega_h::Adj)::'lambda'(int)::operator()(int) const)
>>> referenced by Omega_h_adj.cpp:31 (/ccs/home/cwsmith/omegahKk/omega_h/src/Omega_h_adj.cpp:31)
>>>               /tmp/Omega_h_adj-26bbe5/Omega_h_adj-gfx90a.o:(Omega_h::unmap_adjacency(Omega_h::Read<int>, Omega_h::Adj)::'lambda'(int)::operator()(int) const)
>>> referenced 99 more times

lld: error: undefined hidden symbol: Omega_h::Write<int>::operator[](int) const
>>> referenced by Omega_h_adj.cpp:32 (/ccs/home/cwsmith/omegahKk/omega_h/src/Omega_h_adj.cpp:32)
>>>               /tmp/Omega_h_adj-26bbe5/Omega_h_adj-gfx90a.o:(Omega_h::unmap_adjacency(Omega_h::Read<int>, Omega_h::Adj)::'lambda'(int)::operator()(int) const)
>>> referenced by Omega_h_adj.cpp:32 (/ccs/home/cwsmith/omegahKk/omega_h/src/Omega_h_adj.cpp:32)
>>>               /tmp/Omega_h_adj-26bbe5/Omega_h_adj-gfx90a.o:(Omega_h::unmap_adjacency(Omega_h::Read<int>, Omega_h::Adj)::'lambda'(int)::operator()(int) const)
>>> referenced by Omega_h_adj.cpp:170 (/ccs/home/cwsmith/omegahKk/omega_h/src/Omega_h_adj.cpp:170)
>>>               /tmp/Omega_h_adj-26bbe5/Omega_h_adj-gfx90a.o:(Omega_h::form_uses(Omega_h::Read<int>, Omega_h_Family, int, int)::'lambda'(int)::operator()(int) const)
>>> referenced 37 more times

lld: error: undefined hidden symbol: Omega_h::Read<signed char>::operator[](int) const
>>> referenced by Omega_h_adj.cpp:33 (/ccs/home/cwsmith/omegahKk/omega_h/src/Omega_h_adj.cpp:33)
>>>               /tmp/Omega_h_adj-26bbe5/Omega_h_adj-gfx90a.o:(Omega_h::unmap_adjacency(Omega_h::Read<int>, Omega_h::Adj)::'lambda'(int)::operator()(int) const)
>>> referenced by Omega_h_adj.cpp:33 (/ccs/home/cwsmith/omegahKk/omega_h/src/Omega_h_adj.cpp:33)
>>>               /tmp/Omega_h_adj-26bbe5/Omega_h_adj-gfx90a.o:(Omega_h::unmap_adjacency(Omega_h::Read<int>, Omega_h::Adj)::'lambda'(int)::operator()(int) const)
>>> referenced by Omega_h_adj.cpp:212 (/ccs/home/cwsmith/omegahKk/omega_h/src/Omega_h_adj.cpp:212)
>>>               /tmp/Omega_h_adj-26bbe5/Omega_h_adj-gfx90a.o:(Omega_h::separate_upward_with_codes(int, Omega_h::Read<int>, int, Omega_h::Write<int>, Omega_h::Read<signed char>, Omega_h::Write<signed char>)::'lambda'(int)::operator()(int) const)
>>> referenced 29 more times

lld: error: undefined hidden symbol: Omega_h::Write<signed char>::operator[](int) const
>>> referenced by Omega_h_adj.cpp:33 (/ccs/home/cwsmith/omegahKk/omega_h/src/Omega_h_adj.cpp:33)
>>>               /tmp/Omega_h_adj-26bbe5/Omega_h_adj-gfx90a.o:(Omega_h::unmap_adjacency(Omega_h::Read<int>, Omega_h::Adj)::'lambda'(int)::operator()(int) const)
>>> referenced by Omega_h_adj.cpp:33 (/ccs/home/cwsmith/omegahKk/omega_h/src/Omega_h_adj.cpp:33)
>>>               /tmp/Omega_h_adj-26bbe5/Omega_h_adj-gfx90a.o:(Omega_h::unmap_adjacency(Omega_h::Read<int>, Omega_h::Adj)::'lambda'(int)::operator()(int) const)
>>> referenced by Omega_h_adj.cpp:127 (/ccs/home/cwsmith/omegahKk/omega_h/src/Omega_h_adj.cpp:127)
>>>               /tmp/Omega_h_adj-26bbe5/Omega_h_adj-gfx90a.o:(Omega_h::find_canonical_jumps(int, Omega_h::Read<int>, Omega_h::Read<int>)::'lambda'(int)::operator()(int) const)
>>> referenced 37 more times

lld: error: undefined hidden symbol: Omega_h::Read<long>::operator[](int) const
>>> referenced by Omega_h_adj.cpp:78 (/ccs/home/cwsmith/omegahKk/omega_h/src/Omega_h_adj.cpp:78)
>>>               /tmp/Omega_h_adj-26bbe5/Omega_h_adj-gfx90a.o:(Omega_h::Read<signed char> Omega_h::get_codes_to_canonical_deg<4, long>(Omega_h::Read<long>)::'lambda'(int)::operator()(int) const)
>>> referenced by Omega_h_adj.cpp:78 (/ccs/home/cwsmith/omegahKk/omega_h/src/Omega_h_adj.cpp:78)
>>>               /tmp/Omega_h_adj-26bbe5/Omega_h_adj-gfx90a.o:(Omega_h::Read<signed char> Omega_h::get_codes_to_canonical_deg<4, long>(Omega_h::Read<long>)::'lambda'(int)::operator()(int) const)
>>> referenced by Omega_h_adj.cpp:81 (/ccs/home/cwsmith/omegahKk/omega_h/src/Omega_h_adj.cpp:81)
>>>               /tmp/Omega_h_adj-26bbe5/Omega_h_adj-gfx90a.o:(Omega_h::Read<signed char> Omega_h::get_codes_to_canonical_deg<4, long>(Omega_h::Read<long>)::'lambda'(int)::operator()(int) const)
>>> referenced 35 more times
clang-15: error: amdgcn-link command failed with exit code 1 (use -v to see invocation)
@cwsmith cwsmith changed the title build error ('undefined hidden symbol') using amd compilers and no optimizations on frontier build error ('undefined hidden symbol') using amdclang compilers and no optimizations on frontier Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant