I have this application code
// This will throw if the type stored does not support textures cudaChannelFormatDesc channel = getTextureChannelDescriptor(); mCudaArrayDims = dim; cudaExtent volumeSize = make_cudaExtent(mCudaArrayDims.x(), mCudaArrayDims.y(), mCudaArrayDims.z()); cudaError_t err = cudaMalloc3DArray(&mCudaArray, &channel, volumeSize); if(err!=cudaSuccess) throw SimCudaMemoryError(cudaGetErrorString(err)); if(!mCudaArray) throw SimCudaMemoryError("mCudaArray is still NULL!");
My problem is that after a few runs (I always have to kill the application as it’s a server and it does not have clean shutdown code yet), the second exception (“mCudaArray is still NULL”) triggers. The documentation seems to indicate that this should not be possible (Either return a pointer + cudaError_t = sucess or return an error)
The parameters for cudaMalloc3DArray are (checked using the debugger: mCudaArray is a member, so pointer is valid. channel = 32,32,32,32,kindFloat, volumeSize = 256, 0, 0
Is this a cuda bug?
EDIT: I should add - this is on cuda-3.0 using linux, gtx 295 cuda running on the second gpu. Driver version: 195.36.24 (stable gentoo)
EDIT2: As soon this happens once, I can restart the app as many times I want - it will always happen