I just found that the consumption of host memory seems to increase abnormally in the new CUDA release.
The following is a very simple demo program.
// set GPU ID
cudaSetDevice( 0 );
// allocate host memory
const long NGB = 9;
const long N = NGB10241024*1024/sizeof(float);
float *Array = new float [N];
// arbitrary work on Array
The “top” command shows that the demo program consumes about 18.3 GB, which is about 2 times larger than expected!!
However, if i comment out the line “cudaSetDevice( 0 );”, the memory consumption becomes normal (about 9 GB).
The information of the system giving this issue is as follows.
CUDA version: 4.0 RC2
Driver version: 270.41.06
OS: Scientific Linux SL release 5.4 (Boron)
I suspect that this issue is due to the new graphic driver and(or) CUDA since this problem appeared after a system upgrade.
I also tested the demo program in a different system with older versions of CUDA and driver, and everything works fine.
In this case, the memory consumption is normal even when I include any CUDA function.
The information of this system is as follows:
CUDA version: 3.2
Driver version: 260.19.21
OS: CentOS release 5.5 (Final)
Has anyone had a similar problem? Any help is appreciated!