mphowardlab / azplugins

A HOOMD-blue component for soft matter simulations.
BSD 3-Clause "New" or "Revised" License
21 stars 13 forks source link

CUDA 9 & 10 compatibility with MPCD reverse perturbation #4

Closed mphoward closed 5 years ago

mphoward commented 5 years ago

Reported by Arash:

There are some template incompatibilities in thrust (calling cub underneath) for CUDA 9 & 10, which are not present in CUDA 8. The necessary changes are the same as in commit b5cd5ba. This shows the need for addressing issue #2.

/cluster/easybuild/nehalem/software/system/CUDA/10.0.130/include/thrust/system/cuda/detail/util.h(290): error: function "azplugins::gpu::GetMomentum::operator()" cannot be called with the given argument list
            argument types are: (thrust::device_reference<Scalar2>)
            object type is: azplugins::gpu::GetMomentum
          detected during:
            instantiation of "thrust::cuda_cub::transform_input_iterator_t<ValueType, InputIt, UnaryOp>::reference thrust::cuda_cub::transform_input_iterator_t<ValueType, InputIt, UnaryOp>::operator[](thrust::cuda_cub::transform_input_iterator_t<ValueType, InputIt, UnaryOp>::difference_type) const [with ValueType=double, InputIt=thrust::device_ptr<Scalar2>, UnaryOp=azplugins::gpu::GetMomentum]" 
/cluster/easybuild/nehalem/software/system/CUDA/10.0.130/include/thrust/system/cuda/detail/cub/device/dispatch/../../agent/agent_reduce.cuh(290): here
            instantiation of "void thrust::cuda_cub::cub::AgentReduce<AgentReducePolicy, InputIteratorT, OutputIteratorT, OffsetT, ReductionOp>::ConsumeTile<IS_FIRST_TILE,CAN_VECTORIZE>(thrust::cuda_cub::cub::AgentReduce<AgentReducePolicy, InputIteratorT, OutputIteratorT, OffsetT, ReductionOp>::OutputT &, OffsetT, int, thrust::cuda_cub::cub::Int2Type<0>, thrust::cuda_cub::cub::Int2Type<CAN_VECTORIZE>) [with AgentReducePolicy=thrust::cuda_cub::cub::AgentReducePolicy<128, 16, 4, thrust::cuda_cub::cub::BLOCK_REDUCE_WARP_REDUCTIONS, thrust::cuda_cub::cub::LOAD_LDG>, InputIteratorT=thrust::cuda_cub::transform_input_iterator_t<double, thrust::device_ptr<Scalar2>, azplugins::gpu::GetMomentum>, OutputIteratorT=double *, OffsetT=int, ReductionOp=thrust::plus<float>, IS_FIRST_TILE=1, CAN_VECTORIZE=0]" 
/cluster/easybuild/nehalem/software/system/CUDA/10.0.130/include/thrust/system/cuda/detail/cub/device/dispatch/../../agent/agent_reduce.cuh(322): here
            instantiation of "thrust::cuda_cub::cub::AgentReduce<AgentReducePolicy, InputIteratorT, OutputIteratorT, OffsetT, ReductionOp>::OutputT thrust::cuda_cub::cub::AgentReduce<AgentReducePolicy, InputIteratorT, OutputIteratorT, OffsetT, ReductionOp>::ConsumeRange(thrust::cuda_cub::cub::GridEvenShare<OffsetT> &, thrust::cuda_cub::cub::Int2Type<CAN_VECTORIZE>) [with AgentReducePolicy=thrust::cuda_cub::cub::AgentReducePolicy<128, 16, 4, thrust::cuda_cub::cub::BLOCK_REDUCE_WARP_REDUCTIONS, thrust::cuda_cub::cub::LOAD_LDG>, InputIteratorT=thrust::cuda_cub::transform_input_iterator_t<double, thrust::device_ptr<Scalar2>, azplugins::gpu::GetMomentum>, OutputIteratorT=double *, OffsetT=int, ReductionOp=thrust::plus<float>, CAN_VECTORIZE=0]" 
/cluster/easybuild/nehalem/software/system/CUDA/10.0.130/include/thrust/system/cuda/detail/cub/device/dispatch/../../agent/agent_reduce.cuh(360): here
            instantiation of "thrust::cuda_cub::cub::AgentReduce<AgentReducePolicy, InputIteratorT, OutputIteratorT, OffsetT, ReductionOp>::OutputT thrust::cuda_cub::cub::AgentReduce<AgentReducePolicy, InputIteratorT, OutputIteratorT, OffsetT, ReductionOp>::ConsumeRange(OffsetT, OffsetT) [with AgentReducePolicy=thrust::cuda_cub::cub::AgentReducePolicy<128, 16, 4, thrust::cuda_cub::cub::BLOCK_REDUCE_WARP_REDUCTIONS, thrust::cuda_cub::cub::LOAD_LDG>, InputIteratorT=thrust::cuda_cub::transform_input_iterator_t<double, thrust::device_ptr<Scalar2>, azplugins::gpu::GetMomentum>, OutputIteratorT=double *, OffsetT=int, ReductionOp=thrust::plus<float>]" 
/cluster/easybuild/nehalem/software/system/CUDA/10.0.130/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_reduce.cuh(143): here
            instantiation of "void thrust::cuda_cub::cub::DeviceReduceSingleTileKernel<ChainedPolicyT,InputIteratorT,OutputIteratorT,OffsetT,ReductionOpT,OutputT>(InputIteratorT, OutputIteratorT, OffsetT, ReductionOpT, OutputT) [with ChainedPolicyT=thrust::cuda_cub::cub::DeviceReducePolicy<double, int, thrust::plus<float>>::Policy600, InputIteratorT=thrust::cuda_cub::transform_input_iterator_t<double, thrust::device_ptr<Scalar2>, azplugins::gpu::GetMomentum>, OutputIteratorT=double *, OffsetT=int, ReductionOpT=thrust::plus<float>, OutputT=double]" 
/cluster/easybuild/nehalem/software/system/CUDA/10.0.130/include/thrust/system/cuda/detail/cub/device/dispatch/dispatch_reduce.cuh(599): here
            [ 7 instantiation contexts not shown ]
            instantiation of "cudaError_t thrust::cuda_cub::cub::DeviceReduce::Reduce(void *, size_t &, InputIteratorT, OutputIteratorT, int, ReductionOpT, T, cudaStream_t, __nv_bool) [with InputIteratorT=thrust::cuda_cub::transform_input_iterator_t<double, thrust::device_ptr<Scalar2>, azplugins::gpu::GetMomentum>, OutputIteratorT=double *, ReductionOpT=thrust::plus<float>, T=double]" 
/cluster/easybuild/nehalem/software/system/CUDA/10.0.130/include/thrust/system/cuda/detail/reduce.h(953): here
            instantiation of "T thrust::cuda_cub::reduce_n(thrust::cuda_cub::execution_policy<Derived> &, InputIt, Size, T, BinaryOp) [with Derived=thrust::cuda_cub::tag, InputIt=thrust::cuda_cub::transform_input_iterator_t<double, thrust::device_ptr<Scalar2>, azplugins::gpu::GetMomentum>, Size=std::ptrdiff_t, T=double, BinaryOp=thrust::plus<float>]" 
/cluster/easybuild/nehalem/software/system/CUDA/10.0.130/include/thrust/system/cuda/detail/transform_reduce.h(62): here
            instantiation of "T thrust::cuda_cub::transform_reduce(thrust::cuda_cub::execution_policy<Derived> &, InputIt, InputIt, TransformOp, T, ReduceOp) [with Derived=thrust::cuda_cub::tag, InputIt=thrust::device_ptr<Scalar2>, TransformOp=azplugins::gpu::GetMomentum, T=double, ReduceOp=thrust::plus<float>]" 
/cluster/easybuild/nehalem/software/system/CUDA/10.0.130/include/thrust/detail/transform_reduce.inl(47): here
            instantiation of "OutputType thrust::transform_reduce(const thrust::detail::execution_policy_base<DerivedPolicy> &, InputIterator, InputIterator, UnaryFunction, OutputType, BinaryFunction) [with DerivedPolicy=thrust::cuda_cub::tag, InputIterator=thrust::device_ptr<Scalar2>, UnaryFunction=azplugins::gpu::GetMomentum, OutputType=double, BinaryFunction=thrust::plus<float>]" 
/cluster/easybuild/nehalem/software/system/CUDA/10.0.130/include/thrust/detail/transform_reduce.inl(67): here
            instantiation of "OutputType thrust::transform_reduce(InputIterator, InputIterator, UnaryFunction, OutputType, BinaryFunction) [with InputIterator=thrust::device_ptr<Scalar2>, UnaryFunction=azplugins::gpu::GetMomentum, OutputType=double, BinaryFunction=thrust::plus<float>]" 
/home/anikouba/hoomd-plugins/azplugins/azplugins/MPCDReversePerturbationFlowGPU.cu(445): here

1 error detected in the compilation of "/tmp/tmpxft_000076e5_00000000-10_MPCDReversePerturbationFlowGPU.compute_70.cpp1.ii".
CMake Error at cuda_compile_generated_MPCDReversePerturbationFlowGPU.cu.o.cmake:264 (message):
  Error generating file
  /home/anikouba/hoomd-plugins/azplugins/build/azplugins/CMakeFiles/cuda_compile.dir//./cuda_compile_generated_MPCDReversePerturbationFlowGPU.cu.o