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

Tests fail to compile: error: undefined symbol: Kokkos::OpenMP::OpenMP(), etc #1181

Open
yurivict opened this issue Dec 20, 2024 · 1 comment

Comments

@yurivict
Copy link

yurivict commented Dec 20, 2024

Kokkos was configured with OpenMP on (-DKokkos_ENABLE_OPENMP=ON):

-- Built-in Execution Spaces:
--     Device Parallel: NoTypeDefined
--     Host Parallel: Kokkos::OpenMP
--       Host Serial: SERIAL

but clad tests fail to compile:

ld: error: undefined symbol: Kokkos::OpenMP::OpenMP()
>>> referenced by ParallelReduce.cpp
>>>               unittests/Kokkos/CMakeFiles/KokkosTests.dir/ParallelReduce.cpp.o:(Kokkos::RangePolicy<Kokkos::OpenMP>::RangePolicy<int, unsigned long, false>(int, unsigned long))
>>> referenced by ParallelReduce.cpp
>>>               unittests/Kokkos/CMakeFiles/KokkosTests.dir/ParallelReduce.cpp.o:(Kokkos::RangePolicy<Kokkos::OpenMP>::set_auto_chunk_size())
>>> referenced by ParallelReduce.cpp
>>>               unittests/Kokkos/CMakeFiles/KokkosTests.dir/ParallelReduce.cpp.o:(Kokkos::RangePolicy<Kokkos::OpenMP>::RangePolicy<int, int, false>(int, int))
>>> referenced 54 more times

ld: error: undefined symbol: Kokkos::initialize(int&, char**)
>>> referenced by main.cpp
>>>               unittests/Kokkos/CMakeFiles/KokkosTests.dir/main.cpp.o:(main)

ld: error: undefined symbol: Kokkos::finalize()
>>> referenced by main.cpp
>>>               unittests/Kokkos/CMakeFiles/KokkosTests.dir/main.cpp.o:(main)

ld: error: undefined symbol: Kokkos::Impl::log_warning(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)
>>> referenced by ParallelReduce.cpp
>>>               unittests/Kokkos/CMakeFiles/KokkosTests.dir/ParallelReduce.cpp.o:(void Kokkos::RangePolicy<Kokkos::OpenMP>::check_conversion_safety<int>(int))
>>> referenced by ParallelReduce.cpp
>>>               unittests/Kokkos/CMakeFiles/KokkosTests.dir/ParallelReduce.cpp.o:(Kokkos::RangePolicy<Kokkos::OpenMP>::check_bounds_validity())
>>> referenced by ParallelReduce.cpp
>>>               unittests/Kokkos/CMakeFiles/KokkosTests.dir/ParallelReduce.cpp.o:(Kokkos::MDRangePolicy<Kokkos::OpenMP, Kokkos::Rank<2u, (Kokkos::Iterate)2, (Kokkos::Iterate)1>>::init_helper(Kokkos::Impl::TileSizeProperties))
>>> referenced 13 more times

ld: error: undefined symbol: Kokkos::OpenMP::concurrency(Kokkos::OpenMP const&)
>>> referenced by ParallelReduce.cpp
>>>               unittests/Kokkos/CMakeFiles/KokkosTests.dir/ParallelReduce.cpp.o:(Kokkos::RangePolicy<Kokkos::OpenMP>::set_auto_chunk_size())
>>> referenced by ViewAccess.cpp
>>>               unittests/Kokkos/CMakeFiles/KokkosTests.dir/ViewAccess.cpp.o:(Kokkos::RangePolicy<Kokkos::OpenMP, Kokkos::IndexType<int>>::set_auto_chunk_size())
>>> referenced by ViewAccess.cpp
>>>               unittests/Kokkos/CMakeFiles/KokkosTests.dir/ViewAccess.cpp.o:(Kokkos::RangePolicy<Kokkos::OpenMP, Kokkos::IndexType<long>>::set_auto_chunk_size())

ld: error: undefined symbol: Kokkos::Tools::Experimental::get_callbacks()
>>> referenced by ViewBasics.cpp
>>>               unittests/Kokkos/CMakeFiles/KokkosTests.dir/ViewBasics.cpp.o:(void Kokkos::deep_copy<double** [3], Kokkos::LayoutLeft, Kokkos::HostSpace>(Kokkos::View<double** [3], Kokkos::LayoutLeft, Kokkos::HostSpace> const&, Kokkos::ViewTraits<double** [3], Kokkos::LayoutLeft, Kokkos::HostSpace>::const_value_type&, std::__1::enable_if<std::is_same_v<Kokkos::ViewTraits<double** [3], Kokkos::LayoutLeft, Kokkos::HostSpace>::specialize, void>, void>::type*))
>>> referenced by ViewBasics.cpp
>>>               unittests/Kokkos/CMakeFiles/KokkosTests.dir/ViewBasics.cpp.o:(void Kokkos::deep_copy<double** [3], Kokkos::LayoutLeft, Kokkos::HostSpace>(Kokkos::View<double** [3], Kokkos::LayoutLeft, Kokkos::HostSpace> const&, Kokkos::ViewTraits<double** [3], Kokkos::LayoutLeft, Kokkos::HostSpace>::const_value_type&, std::__1::enable_if<std::is_same_v<Kokkos::ViewTraits<double** [3], Kokkos::LayoutLeft, Kokkos::HostSpace>::specialize, void>, void>::type*))
>>> referenced by ViewAccess.cpp
>>>               unittests/Kokkos/CMakeFiles/KokkosTests.dir/ViewAccess.cpp.o:(void Kokkos::deep_copy<double* [4], Kokkos::LayoutLeft, Kokkos::HostSpace>(Kokkos::View<double* [4], Kokkos::LayoutLeft, Kokkos::HostSpace> const&, Kokkos::ViewTraits<double* [4], Kokkos::LayoutLeft, Kokkos::HostSpace>::const_value_type&, std::__1::enable_if<std::is_same_v<Kokkos::ViewTraits<double* [4], Kokkos::LayoutLeft, Kokkos::HostSpace>::specialize, void>, void>::type*))
>>> referenced 10 more times

ld: error: undefined symbol: Kokkos::Tools::make_space_handle(char const*)
>>> referenced by ViewBasics.cpp
>>>               unittests/Kokkos/CMakeFiles/KokkosTests.dir/ViewBasics.cpp.o:(void Kokkos::deep_copy<double** [3], Kokkos::LayoutLeft, Kokkos::HostSpace>(Kokkos::View<double** [3], Kokkos::LayoutLeft, Kokkos::HostSpace> const&, Kokkos::ViewTraits<double** [3], Kokkos::LayoutLeft, Kokkos::HostSpace>::const_value_type&, std::__1::enable_if<std::is_same_v<Kokkos::ViewTraits<double** [3], Kokkos::LayoutLeft, Kokkos::HostSpace>::specialize, void>, void>::type*))
>>> referenced by ViewBasics.cpp
>>>               unittests/Kokkos/CMakeFiles/KokkosTests.dir/ViewBasics.cpp.o:(void Kokkos::deep_copy<double** [3], Kokkos::LayoutLeft, Kokkos::HostSpace>(Kokkos::View<double** [3], Kokkos::LayoutLeft, Kokkos::HostSpace> const&, Kokkos::ViewTraits<double** [3], Kokkos::LayoutLeft, Kokkos::HostSpace>::const_value_type&, std::__1::enable_if<std::is_same_v<Kokkos::ViewTraits<double** [3], Kokkos::LayoutLeft, Kokkos::HostSpace>::specialize, void>, void>::type*))
>>> referenced by ViewAccess.cpp
>>>               unittests/Kokkos/CMakeFiles/KokkosTests.dir/ViewAccess.cpp.o:(void Kokkos::deep_copy<double* [4], Kokkos::LayoutLeft, Kokkos::HostSpace>(Kokkos::View<double* [4], Kokkos::LayoutLeft, Kokkos::HostSpace> const&, Kokkos::ViewTraits<double* [4], Kokkos::LayoutLeft, Kokkos::HostSpace>::const_value_type&, std::__1::enable_if<std::is_same_v<Kokkos::ViewTraits<double* [4], Kokkos::LayoutLeft, Kokkos::HostSpace>::specialize, void>, void>::type*))
>>> referenced 7 more times

ld: error: undefined symbol: Kokkos::Tools::beginDeepCopy(Kokkos_Profiling_SpaceHandle, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, void const*, Kokkos_Profiling_SpaceHandle, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, void const*, unsigned long)
>>> referenced by ViewBasics.cpp
>>>               unittests/Kokkos/CMakeFiles/KokkosTests.dir/ViewBasics.cpp.o:(void Kokkos::deep_copy<double** [3], Kokkos::LayoutLeft, Kokkos::HostSpace>(Kokkos::View<double** [3], Kokkos::LayoutLeft, Kokkos::HostSpace> const&, Kokkos::ViewTraits<double** [3], Kokkos::LayoutLeft, Kokkos::HostSpace>::const_value_type&, std::__1::enable_if<std::is_same_v<Kokkos::ViewTraits<double** [3], Kokkos::LayoutLeft, Kokkos::HostSpace>::specialize, void>, void>::type*))
>>> referenced by ViewAccess.cpp
>>>               unittests/Kokkos/CMakeFiles/KokkosTests.dir/ViewAccess.cpp.o:(void Kokkos::deep_copy<double* [4], Kokkos::LayoutLeft, Kokkos::HostSpace>(Kokkos::View<double* [4], Kokkos::LayoutLeft, Kokkos::HostSpace> const&, Kokkos::ViewTraits<double* [4], Kokkos::LayoutLeft, Kokkos::HostSpace>::const_value_type&, std::__1::enable_if<std::is_same_v<Kokkos::ViewTraits<double* [4], Kokkos::LayoutLeft, Kokkos::HostSpace>::specialize, void>, void>::type*))
>>> referenced by ViewAccess.cpp
>>>               unittests/Kokkos/CMakeFiles/KokkosTests.dir/ViewAccess.cpp.o:(void Kokkos::deep_copy<double* [4], Kokkos::LayoutLeft, Kokkos::HostSpace, double* [4], Kokkos::LayoutLeft, Kokkos::HostSpace>(Kokkos::View<double* [4], Kokkos::LayoutLeft, Kokkos::HostSpace> const&, Kokkos::View<double* [4], Kokkos::LayoutLeft, Kokkos::HostSpace> const&, std::__1::enable_if<std::is_void_v<Kokkos::ViewTraits<double* [4], Kokkos::LayoutLeft, Kokkos::HostSpace>::specialize> && std::is_void_v<Kokkos::ViewTraits<double* [4], Kokkos::LayoutLeft, Kokkos::HostSpace>::specialize> && ((unsigned int)(ViewTraits<double* [4], Kokkos::LayoutLeft, Kokkos::HostSpace>::rank) != 0 || (unsigned int)(ViewTraits<double* [4], Kokkos::LayoutLeft, Kokkos::HostSpace>::rank) != 0), void>::type*))
>>> referenced 2 more times

clad-1.8
kokkos-4.5.00
FreeBSD 14.2

@yurivict
Copy link
Author

Probably duplicate of #993

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