Closed GoogleCodeExporter closed 8 years ago
Thanks for the report. Have you tested this program with the latest version of
Thrust (1.3) [1] and nvcc (3.2 rc2) [2] ?
[1] http://code.google.com/p/thrust/downloads/list
[2] http://developer.nvidia.com/object/cuda_3_2_toolkit_rc.html
Original comment by jaredhoberock
on 8 Nov 2010 at 6:49
hey jared,
thanks for looking into it.
i tried thrust 1.3.
unfortunately i have to request an upgrade for nvcc from our helpdesk. so it
might take a while until they get it done.
is it in principle possible, to do what i intended, i.e. transform an iterator
into a tuple and then use reduce on the tuple iterator?
that would be really great, cause then i would save half the reads and
reduce-invocations.
its a sweet library btw. saves me a lot of headaches - thanks
Original comment by youngjun...@gmail.com
on 8 Nov 2010 at 8:15
Yes, this is intended to work in the manner you're using it. My guess is that
we are simply looking at a bug in nvcc bug which has been fixed in the
meantime. The clue is that the error occurs within a file generated by nvcc,
not a user-generated file.
Anyway, let us know if you're able to try later with a newer nvcc.
Original comment by jaredhoberock
on 8 Nov 2010 at 8:20
i tried to compile it now with nvcc 3.2.
the error i get is the following:
/usr/include/surface_functions.h: In function 'void surf1Dread(T*,
surface<void, 1>, int, int, cudaSurfaceBoundaryMode)':
/usr/include/surface_functions.h:100: error: there are no arguments to
'__surf1Dreadc1' that depend on a template parameter, so a declaration of
'__surf1Dreadc1' must be available
/usr/include/surface_functions.h:100: error: (if you use '-fpermissive', G++
will accept your code, but allowing the use of an undeclared name is deprecated)
/usr/include/surface_functions.h:101: error: there are no arguments to
'__surf1Dreads1' that depend on a template parameter, so a declaration of
'__surf1Dreads1' must be available
/usr/include/surface_functions.h:102: error: there are no arguments to
'__surf1Dreadu1' that depend on a template parameter, so a declaration of
'__surf1Dreadu1' must be available
/usr/include/surface_functions.h:103: error: there are no arguments to
'__surf1Dreadu2' that depend on a template parameter, so a declaration of
'__surf1Dreadu2' must be available
/usr/include/surface_functions.h:104: error: there are no arguments to
'__surf1Dreadu4' that depend on a template parameter, so a declaration of
'__surf1Dreadu4' must be available
/usr/include/surface_functions.h: In function 'void surf2Dread(T*,
surface<void, 2>, int, int, int, cudaSurfaceBoundaryMode)':
/usr/include/surface_functions.h:460: error: there are no arguments to
'__surf2Dreadc1' that depend on a template parameter, so a declaration of
'__surf2Dreadc1' must be available
/usr/include/surface_functions.h:461: error: there are no arguments to
'__surf2Dreads1' that depend on a template parameter, so a declaration of
'__surf2Dreads1' must be available
/usr/include/surface_functions.h:462: error: there are no arguments to
'__surf2Dreadu1' that depend on a template parameter, so a declaration of
'__surf2Dreadu1' must be available
/usr/include/surface_functions.h:463: error: there are no arguments to
'__surf2Dreadu2' that depend on a template parameter, so a declaration of
'__surf2Dreadu2' must be available
/usr/include/surface_functions.h:464: error: there are no arguments to
'__surf2Dreadu4' that depend on a template parameter, so a declaration of
'__surf2Dreadu4' must be available
In file included from /tmp/tmpxft_00001e75_00000000-1_fwttest.cudafe1.stub.c:2:
/home/yjko/dev/thrust/iterator/detail/transform_iterator.inl: At global scope:
/home/yjko/dev/thrust/iterator/detail/transform_iterator.inl:60: error:
'typedef class thrust::tuple<int, int, thrust::null_type, thrust::null_type,
thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type,
thrust::null_type, thrust::null_type>
thrust::detail::transform_iterator_base<tupleMaker,
thrust::counting_iterator<int, thrust::use_default, thrust::use_default,
thrust::use_default>, thrust::use_default, thrust::use_default>::reference' is
private
/tmp/tmpxft_00001e75_00000000-1_fwttest.cudafe1.stub.c:39: error: within this
context
/home/yjko/dev/thrust/iterator/detail/transform_iterator.inl:70: error:
'typedef class thrust::tuple<int, int, thrust::null_type, thrust::null_type,
thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type,
thrust::null_type, thrust::null_type>
thrust::detail::transform_iterator_base<tupleMaker,
thrust::counting_iterator<int, thrust::use_default, thrust::use_default,
thrust::use_default>, thrust::use_default, thrust::use_default>::cv_value_type'
is private
/tmp/tmpxft_00001e75_00000000-1_fwttest.cudafe1.stub.c:42: error: within this
context
Original comment by youngjun...@gmail.com
on 9 Nov 2010 at 12:55
i get rid of the problem with surface_functions.h with -fpermissive, but the
original error remains.
Original comment by youngjun...@gmail.com
on 9 Nov 2010 at 1:22
Thanks for trying with the newer nvcc. I can indeed reproduce this problem
with Thrust 1.3.0.
This is almost certainly a bug inside nvcc, but I've noticed that nvcc does not
produce this bug with the development version of Thrust [1]. You can use that
as a workaround if you like. I'll file a bug with the compiler team in the
meantime.
[1] http://code.google.com/p/thrust/source/checkout
Original comment by jaredhoberock
on 9 Nov 2010 at 7:30
Forwarded as nvbug-756997
Original comment by jaredhoberock
on 9 Nov 2010 at 9:56
Hey Jared,
that did the trick! thanks.
i have two quick questions if you dont mind:
- if i have a device_vector with content {1,2,3,4} and would use a permuatation
iterator to get a sequence 1,1,2,2,3,3,4,4 would that result into multiple
reads from device memory or is there some sort of caching going on?
- is it possible/advisable to use a unary function for a transform iterator
that maintains an array of dynamic length? can i tell thrust to allocate it in
shared mem?
thanks
Original comment by youngjun...@gmail.com
on 15 Nov 2010 at 12:42
Original issue reported on code.google.com by
youngjun...@gmail.com
on 8 Nov 2010 at 1:38