cuda-memcheck to debug CUDA-enabled R packages

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

cuda-memcheck to debug CUDA-enabled R packages

landau
I'm building a simple R extension around a CUDA-enabled dynamic library, and I want to run the whole package with cuda-memcheck for debugging purposes. I can run it just fine with Valgrind:

$ R --no-save -d valgrind < test.R

However, if I try the same thing with cuda-memcheck,

$ R --no-save -d cuda-memcheck < test.R

I get:

*** Further command line arguments ('--no-save ') disregarded
*** (maybe use 'run --no-save ' from *inside* cuda-memcheck)

========= CUDA-MEMCHECK
Fatal error: you must specify '--save', '--no-save' or '--vanilla'
========= No CUDA-MEMCHECK results found

So cuda-memcheck is eating up an argument that's supposed to go to R. What can I do about this?
Reply | Threaded
Open this post in threaded view
|

Re: cuda-memcheck to debug CUDA-enabled R packages

landau
Edit:

I solved this problem by putting

  R CMD BATCH --no-save < test.R

into a script (say, run.sh), and then running

  $ cuda-memcheck ./run.sh
Reply | Threaded
Open this post in threaded view
|

Re: cuda-memcheck to debug CUDA-enabled R packages

landau
Counter-edit: it turns out that that kind of hack doesn't work. See this post.