example compilation errors using cuda and visual studio
System: Windows10
Cmake: 3.16.3
vtk-m: v1.5.0
cuda: 10.1
IDE: visual studio 2015
I can compile the vtk-m without building examples.
When I try to compile the example of particle_advection following errors arises:
#error directive: When VTK-m is build with CUDA enabled all compilation units that include
DeviceAdapterTagCuda must use the cuda compiler
Particle_Advection
f:\GCPS\3rdPartyLib\vtk-m\vtk-m-v1.5.0\vtkm\cont\cuda\internal\DeviceAdapterTagCuda.h
Error C2794
'type': is not a member of any direct or indirect base class of 'brigand::detail::all_impl<Sequence,brigand::detail::none_impl<Sequence,vtkm::cont::ArrayHandle<__int64,OffsetsStorageTag>>::nope<brigand::_1>>'
Particle_Advection
F:\GCPS\3rdPartyLib\vtk-m\vtk-m-v1.5.0\vtkm\internal\brigand.hpp 987
Error C2938 'all<vtkm::cont::detail::NumIndicesDecorator,brigand::detail::none_impl<DecoratorImplT,vtkm::cont::ArrayHandle<__int64,OffsetsStorageTag>>::nope<brigand::_1>>' : Failed to specialize alias template
Particle_Advection
F:\GCPS\3rdPartyLib\vtk-m\vtk-m-v1.5.0\vtkm\internal\brigand.hpp 987
Error C2672 'vtkm::cont::internal::decor::DecoratorStorageTraits<DecoratorImplT,vtkm::cont::ArrayHandle<__int64,OffsetsStorageTag>>::MakePortalOutput': no matching overloaded function found
Particle_Advection
F:\GCPS\3rdPartyLib\vtk-m\vtk-m-v1.5.0\vtkm\cont\ArrayHandleDecorator.h 762
Error C2893
Failed to specialize function template 'vtkm::cont::internal::ArrayPortalDecorator<vtkm::cont::internal::decor::DecoratorStorageTraits<DecoratorImplT,vtkm::cont::ArrayHandle<__int64,OffsetsStorageTag>>::ValueType,detail::GetFunctorTypeImpl<DecoratorImplT,PortalList>::type,detail::GetInverseFunctorTypeImpl<brigand::and_<detail::IsFunctorInvertibleImpl<DecoratorImplT,PortalList>::type,brigand::detail::any_impl<PortalList,brigand::bind<vtkm::internal::PortalSupportsSets,brigand::_1>>::integral_constant<bool,B>::type::type>::type,DecoratorImplT,PortalList>::type> vtkm::cont::internal::decor::DecoratorStorageTraits<DecoratorImplT,vtkm::cont::ArrayHandle<__int64,OffsetsStorageTag>>::MakePortalOutput(const DecoratorImplT &,simple_tuple::tuple<vtkm::cont::ArrayHandle<__int64,OffsetsStorageTag>> &,vtkm::Id,List<Indices...>,Device)' Particle_Advection
F:\GCPS\3rdPartyLib\vtk-m\vtk-m-v1.5.0\vtkm\cont\ArrayHandleDecorator.h 762
The nvcc compile command is:
"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe"
-gencode=arch=compute_75,code=\"sm_75,compute_75\"
--use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64"
-x cu -rdc=true -I"F:\GCPS\3rdPartyLib\vtk-m\vtk-m-v1.5.0"
-I"F:\GCPS\3rdPartyLib\vtk-m\build\include"
-I"F:\GCPS\3rdPartyLib\vtk-m\vtk-m-v1.5.0\vtkm\thirdparty\taotuple"
-I"F:\GCPS\3rdPartyLib\vtk-m\vtk-m-v1.5.0\vtkm\thirdparty\optionparser"
-I"F:\GCPS\3rdPartyLib\vtk-m\vtk-m-v1.5.0\vtkm\thirdparty\diy"
-I"F:\GCPS\3rdPartyLib\vtk-m\vtk-m-v1.5.0\vtkm\thirdparty\lcl\vtkmlcl"
-I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include"
--keep-dir x64\Release -maxrregcount=0 --machine 64 --compile -cudart static
-Xcudafe=--diag_suppress=1394,--diag_suppress=766 -Xcudafe=--display_error_number
--expt-relaxed-constexpr -Xcompiler="/EHsc -Ob2 -wd4702,-wd4505 /Gy /bigobj"
-D_WINDOWS -DNDEBUG -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS
-D"CMAKE_INTDIR=\"Release\"" -DWIN32 -D_WINDOWS -DNDEBUG -D_SCL_SECURE_NO_WARNINGS
-D_CRT_SECURE_NO_WARNINGS -D"CMAKE_INTDIR=\"Release\""
-D_MBCS -Xcompiler "/EHsc /W3 /nologo /O2 /FdParticle_Advection.dir\Release\vc140.pdb /FS /Zi /MD /GR"
-o Particle_Advection.dir\Release\ParticleAdvection.obj
"F:\GCPS\3rdPartyLib\vtk-m\vtk-m-v1.5.0\examples\particle_advection\ParticleAdvection.cxx"
Can you help with this issue?
Thanks, Bin
Edited by Bin Wang