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

Bug In BoundsCheck for DynRankView #516

Closed
crtrott opened this issue Oct 31, 2016 · 3 comments
Closed

Bug In BoundsCheck for DynRankView #516

crtrott opened this issue Oct 31, 2016 · 3 comments
Assignees
Labels
Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos)
Milestone

Comments

@crtrott
Copy link
Member

crtrott commented Oct 31, 2016

This killed all the Trilinos Debug builds tonight since BoundsCheck on is not getting tested nightly ....

@crtrott crtrott added the Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos) label Oct 31, 2016
@crtrott crtrott added this to the Fall 2016 milestone Oct 31, 2016
@crtrott
Copy link
Member Author

crtrott commented Oct 31, 2016

Reproduce: kokkos/generate_makefile.bash --with-openmp -dbg ; make build-test

/home/crtrott/kokkos/containers/unit_tests/TestDynViewAPI.hpp:742:5:   required from ‘Test::TestDynViewAPI<T, DeviceType>::TestDynViewAPI() [with T = double; DeviceType = Kokkos::OpenMP]’
/home/crtrott/kokkos/containers/unit_tests/TestOpenMP.cpp:97:45:   required from here
/home/crtrott/kokkos/containers/src/Kokkos_DynRankView.hpp:570:7: error: no matching function for call to ‘view_verify_operator_bounds(const map_type&, const unsigned int&)’
/home/crtrott/kokkos/containers/src/Kokkos_DynRankView.hpp:570:7: note: candidates are:
In file included from /home/crtrott/kokkos/core/src/Kokkos_View.hpp:372:0,
                 from /home/crtrott/kokkos/core/src/Kokkos_Parallel.hpp:52,
                 from /home/crtrott/kokkos/core/src/Kokkos_OpenMP.hpp:60,
                 from /home/crtrott/kokkos/core/src/Kokkos_Core.hpp:57,
                 from /home/crtrott/kokkos/containers/unit_tests/TestOpenMP.cpp:46:
/home/crtrott/kokkos/core/src/impl/Kokkos_ViewMapping.hpp:2970:6: note: template<unsigned int <anonymous>, class MapType> bool Kokkos::Impl::view_verify_operator_bounds(const MapType&)
/home/crtrott/kokkos/core/src/impl/Kokkos_ViewMapping.hpp:2970:6: note:   template argument deduction/substitution failed:
In file included from /home/crtrott/kokkos/containers/unit_tests/TestOpenMP.cpp:61:0:
/home/crtrott/kokkos/containers/src/Kokkos_DynRankView.hpp:570:7: note:   candidate expects 1 argument, 2 provided
In file included from /home/crtrott/kokkos/core/src/Kokkos_View.hpp:372:0,
                 from /home/crtrott/kokkos/core/src/Kokkos_Parallel.hpp:52,
                 from /home/crtrott/kokkos/core/src/Kokkos_OpenMP.hpp:60,
                 from /home/crtrott/kokkos/core/src/Kokkos_Core.hpp:57,
                 from /home/crtrott/kokkos/containers/unit_tests/TestOpenMP.cpp:46:
/home/crtrott/kokkos/core/src/impl/Kokkos_ViewMapping.hpp:2975:6: note: template<unsigned int R, class MapType, class iType, class ... Args> bool Kokkos::Impl::view_verify_operator_bounds(const MapType&, const iType&, Args ...)
/home/crtrott/kokkos/core/src/impl/Kokkos_ViewMapping.hpp:2975:6: note:   template argument deduction/substitution failed:
In file included from /home/crtrott/kokkos/containers/unit_tests/TestOpenMP.cpp:61:0:
/home/crtrott/kokkos/containers/src/Kokkos_DynRankView.hpp:570:7: note:   couldn't deduce template parameter ‘R’
In file included from /home/crtrott/kokkos/core/src/Kokkos_View.hpp:372:0,
                 from /home/crtrott/kokkos/core/src/Kokkos_Parallel.hpp:52,
                 from /home/crtrott/kokkos/core/src/Kokkos_OpenMP.hpp:60,
                 from /home/crtrott/kokkos/core/src/Kokkos_Core.hpp:57,
                 from /home/crtrott/kokkos/containers/unit_tests/TestOpenMP.cpp:46:
/home/crtrott/kokkos/core/src/impl/Kokkos_ViewMapping.hpp:3011:6: note: template<class MapType, class ... Args> void Kokkos::Impl::view_verify_operator_bounds(const char*, const MapType&, Args ...)
/home/crtrott/kokkos/core/src/impl/Kokkos_ViewMapping.hpp:3011:6: note:   template argument deduction/substitution failed:
In file included from /home/crtrott/kokkos/containers/unit_tests/TestOpenMP.cpp:61:0:
/home/crtrott/kokkos/containers/src/Kokkos_DynRankView.hpp:570:7: note:   cannot convert ‘((const Kokkos::Experimental::DynRankView<int, Kokkos::LayoutStride, Kokkos::OpenMP>*)this)->Kokkos::Experimental::DynRankView<int, Kokkos::LayoutStride, Kokkos::OpenMP>::m_map’ (type ‘const map_type {aka const Kokkos::Experimental::Impl::ViewMapping<Kokkos::ViewTraits<int*******, Kokkos::LayoutStride, Kokkos::OpenMP>, void>}’) to type ‘const char*’

@crtrott
Copy link
Member Author

crtrott commented Oct 31, 2016

Debug build was added to nightlies.

@crtrott crtrott self-assigned this Oct 31, 2016
ndellingwood added a commit to ndellingwood/kokkos that referenced this issue Oct 31, 2016
This commit is a bug fix with regards to Kokkos Github iss kokkos#516

view_verify_operator_bounds function call in the debug macros was
missing a template argument for the rank causing compilation failures
when debugging enabled. This was added to fix the issue.
	modified:   Kokkos_DynRankView.hpp
ndellingwood added a commit to ndellingwood/kokkos that referenced this issue Oct 31, 2016
This commit is a bug fix with regards to Kokkos Github issue kokkos#516

Debug macro call for checking DynRankView bounds
 within operator()( ... ) needed updating to match use in Kokkos View

In addition, CXX_FLAGS in Makefile.kokkos was modified
to receive -lineinfo rather than -G due to compilation error with Cuda
and debug mode

	modified:   Makefile.kokkos
	modified:   containers/src/Kokkos_DynRankView.hpp
@ndellingwood
Copy link
Contributor

ndellingwood commented Oct 31, 2016

Pull request #519 issued with fix.
The calls to bounds checking macros in operator()(...) (enabled only when in debug mode) needed to be updated to match those as used by Kokkos::View

An additional issue surfaced when building with Cuda and debug enabled. Discussed with @crtrott and resolved by passing -lineinfo to CXX_FLAGS, rather than -G in Makefile.kokkos. This can be further discussed if necessary; compilation error messages are included below for reference.


    Error: Internal Compiler Error (codegen): "unexpected: typeref type encountered!"

    make[1]: *** [TestSerial.o] Error 2
    make[1]: *** Waiting for unfinished jobs....
    Error: Internal Compiler Error (codegen): "unexpected: typeref type encountered!"

    make[1]: *** [TestCuda.o] Error 2
    make[1]: Leaving directory `/home/ndellin/kokkos/testing/DebugBuilds/CudaDebug/containers/unit_t
    make: *** [all] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos)
Projects
None yet
Development

No branches or pull requests

3 participants