alpaka: CUDA 9.0-9.1 using gcc 6 fails to compile
It is not possible to compile an alpaka example with CUDA9.
e.g. bufferCopy
[ 75%] Building NVCC (Device) object CMakeFiles/bufferCopy.dir/src/bufferCopy_generated_bufferCopy.cpp.o
/sw/global/compilers/gcc/6.3.0/include/c++/6.3.0/tuple: In instantiation of ‘static constexpr bool std::_TC<<anonymous>, _Elements>::_MoveConstructibleTuple() [with _UElements = {const std::tuple<unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int>&}; bool <anonymous> = true; _Elements = {unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int}]’:
/sw/global/compilers/gcc/6.3.0/include/c++/6.3.0/tuple:626:248: required by substitution of ‘template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type <anonymous> > constexpr std::tuple< <template-parameter-1-1> >::tuple(_UElements&& ...) [with _UElements = {const std::tuple<unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int>&}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type <anonymous> = <missing>]’
/home/widera/src/alpaka/include/alpaka/exec/ExecCpuSerial.hpp:64:7: required from ‘class alpaka::exec::ExecCpuSerial<std::integral_constant<long unsigned int, 3ul>, long unsigned int, InitBufferKernel, unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int>’
/home/widera/src/alpaka/example/bufferCopy/src//bufferCopy.cpp:246:220: required from here
/sw/global/compilers/gcc/6.3.0/include/c++/6.3.0/tuple:483:67: error: mismatched argument pack lengths while expanding ‘std::is_constructible<_Elements, _UElements&&>’
return __and_<is_constructible<_Elements, _UElements&&>...>::value;
^~~~~
/sw/global/compilers/gcc/6.3.0/include/c++/6.3.0/tuple:484:1: error: body of constexpr function ‘static constexpr bool std::_TC<<anonymous>, _Elements>::_MoveConstructibleTuple() [with _UElements = {const std::tuple<unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int>&}; bool <anonymous> = true; _Elements = {unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int}]’ not a return-statement
}
^
/sw/global/compilers/gcc/6.3.0/include/c++/6.3.0/tuple: In instantiation of ‘static constexpr bool std::_TC<<anonymous>, _Elements>::_ImplicitlyMoveConvertibleTuple() [with _UElements = {const std::tuple<unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int>&}; bool <anonymous> = true; _Elements = {unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int}]’:
/sw/global/compilers/gcc/6.3.0/include/c++/6.3.0/tuple:626:362: required by substitution of ‘template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type <anonymous> > constexpr std::tuple< <template-parameter-1-1> >::tuple(_UElements&& ...) [with _UElements = {const std::tuple<unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int>&}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type <anonymous> = <missing>]’
/home/widera/src/alpaka/include/alpaka/exec/ExecCpuSerial.hpp:64:7: required from ‘class alpaka::exec::ExecCpuSerial<std::integral_constant<long unsigned int, 3ul>, long unsigned int, InitBufferKernel, unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int>’
/home/widera/src/alpaka/example/bufferCopy/src//bufferCopy.cpp:246:220: required from here
/sw/global/compilers/gcc/6.3.0/include/c++/6.3.0/tuple:489:65: error: mismatched argument pack lengths while expanding ‘std::is_convertible<_UElements&&, _Elements>’
return __and_<is_convertible<_UElements&&, _Elements>...>::value;
^~~~~
/sw/global/compilers/gcc/6.3.0/include/c++/6.3.0/tuple:490:1: error: body of constexpr function ‘static constexpr bool std::_TC<<anonymous>, _Elements>::_ImplicitlyMoveConvertibleTuple() [with _UElements = {const std::tuple<unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int>&}; bool <anonymous> = true; _Elements = {unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int}]’ not a return-statement
}
^
/sw/global/compilers/gcc/6.3.0/include/c++/6.3.0/tuple: In instantiation of ‘static constexpr bool std::_TC<<anonymous>, _Elements>::_NonNestedTuple() [with _SrcTuple = const std::tuple<unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int>&; bool <anonymous> = true; _Elements = {unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int}]’:
/sw/global/compilers/gcc/6.3.0/include/c++/6.3.0/tuple:662:419: required by substitution of ‘template<class ... _UElements, class _Dummy, typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int>::_ConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int>::_ImplicitlyConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int>::_NonNestedTuple<const tuple<_Elements ...>&>()), bool>::type <anonymous> > constexpr std::tuple< <template-parameter-1-1> >::tuple(const std::tuple<_Args1 ...>&) [with _UElements = {unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int}; _Dummy = void; typename std::enable_if<((std::_TC<(1ul == sizeof... (_UElements)), unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int>::_ConstructibleTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int>::_ImplicitlyConvertibleTuple<_UElements ...>()) && std::_TC<(std::is_same<_Dummy, void>::value && (1ul == 1)), unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int>::_NonNestedTuple<const tuple<_Elements ...>&>()), bool>::type <anonymous> = <missing>]’
/home/widera/src/alpaka/include/alpaka/exec/ExecCpuSerial.hpp:64:7: required from ‘class alpaka::exec::ExecCpuSerial<std::integral_constant<long unsigned int, 3ul>, long unsigned int, InitBufferKernel, unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int>’
/home/widera/src/alpaka/example/bufferCopy/src//bufferCopy.cpp:246:220: required from here
/sw/global/compilers/gcc/6.3.0/include/c++/6.3.0/tuple:495:244: error: wrong number of template arguments (4, should be 2)
return __and_<__not_<is_same<tuple<_Elements...>,
^
/sw/global/compilers/gcc/6.3.0/include/c++/6.3.0/type_traits:1558:8: note: provided for ‘template<class _From, class _To> struct std::is_convertible’
struct is_convertible
^~~~~~~~~~~~~~
/sw/global/compilers/gcc/6.3.0/include/c++/6.3.0/tuple:502:1: error: body of constexpr function ‘static constexpr bool std::_TC<<anonymous>, _Elements>::_NonNestedTuple() [with _SrcTuple = const std::tuple<unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int>&; bool <anonymous> = true; _Elements = {unsigned int*, alpaka::vec::Vec<std::integral_constant<long unsigned int, 3ul>, long unsigned int>, unsigned int}]’ not a return-statement
}
^
Software used:
- gcc 6.30
- boost 1.65.1
- cmake 3.9.0
- cuda 9.0.176
@BenjaminW3 It looks like it is something with the meta::apply
command. Could you see anything which possible triggered the error?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 19 (16 by maintainers)
I will close this ticket now because:
@ax3l I will try to add those supported combination checks today.
Thank you @tdd11235813 for this report. I have tried out CUDA 9.2 in a branch in CI yesterday as well and triggered the same error. I had not yet time to investigate this deeper and any help would be appreciated! This seems to be a newly introduced CUDA 9.2 issue.
Awesome news, I will have to try out CUDA 9.2 and see if my host side
std::tuple
woes with GCC 7 are now gone.Since we don’t have a hard dependency on Thrust/CUDA we went with forking taotuple for VTK-m ( https://gitlab.kitware.com/third-party/taotuple / https://github.com/taocpp/tuple).
Just ran into the problem and was able to roll back to gcc-5 to work around the problem. Haven’t investigated any local workarounds.
I can confirm that V9.1.85 + gcc 6.X still has problems with std::tuple.
This was already part of the original CUDA 9.0 support Pull Request description #384. The combination of CUDA and gcc 6 is not enabled in the supported compiler matrix.