On Wed, 2009-07-01 at 05:27 -0400, Yu-Hua Yang wrote:
> Thank you very much for your reply. I have some more questions. I
> understand you wont be looking/updating this branch anymore due to the
> release of OpenCL, but thanks for helping right now!
>
> Before you dive in, one thing I am having concerns is this output that
> happens every time I run CUDA-enable code:
>
> gr_vmcircbuf_cuda::copy_buf_to_buf() error cudaMemcpy() returned 0x3 =
> 3 initialization error
> gr_vmcircbuf_cuda::copy_buf_to_buf recreating buffer d_base=0x3820000
> size=32768 *2
>
If I remember well, this error is not a problem if you get it once per
instantiated CUDA block.
It is a problem if you get it multiple times for the same block.
If I remember well, this has to do with CUDA not being happy with
multithreaded applications and access to the same device buffer from
different host-threads.
Gnuradio using cuda should always use the single-threaded scheduler.
(This is not the default)
I don't remember if my code does this automatically or if you have to
force it using an environment variable.
( you can select the
scheduler used at runtime by setting the GR_SCHEDULER environment
variable. E.g.,
multithreaded Thread-Per-Block scheduler
$ GR_SCHEDULER=TPB ./my-gnuradio-application.py ...
or
Single-Threaded-Scheduler
$ GR_SCHEDULER=STS ./my-gnuradio-application.py ...
)
If you have to use the environment variable, then this should go into
the gnuradio-CUDA docs (if it is not already there).
Greeting,
Martin