The whole calculation of our CUDA code is all fine, except that the cudaFreeHost reported code=11(cudaErrorInvalidValue) in the final clearance step. It seems not making trouble now, but we were wondering if some bug inside triggered this error. In that case it would be serious problem. What could cause this problem?
The allocation has for sure been done by
checkCudaErrors( cudaMallocHost((void**)&global->host_lam, max_nNumerical*sizeof(double)) );
And the value of this pointer is not changed after allocation and before free. It is always 0x7ffeb1121128.
The version of CUDA is 7.5.
nvcc: NVIDIA ® Cuda compiler driver
Copyright © 2005-2015 NVIDIA Corporation
Built on Tue_Aug_11_14:27:32_CDT_2015
Cuda compilation tools, release 7.5, V7.5.17