Displaying 1 result from an estimated 1 matches for "gpualloctest".
2010 Nov 08
0
Segmentation Fault when using CUDA
...tion and deallocation
separately from R.
The simplest case of allocating a char and then deallocating causes a
segmentation fault when R closes. Not on garbage collection but only
on exit. Is there anything in the R internals that explain why this
is happening?
The relevant C++ code is
---
void gpualloctest(){
char * _a;
cudaMalloc(&_a,sizeof(char));
cudaFree(_a);
_a=NULL;
}
--- from gpu.cu
gputest<-function(){
cat("testing allocation on gpu\n")
Module('test','gputest')$gpualloctest()
cat("Test successful\n")...