How much static allocation can be done in one go ?

Hi,
I have one 8800GTS 512 MB card and one 8600M GT card.
I want to know how much static allocation can be done (maximum size of array of floats) on the card.

Is it more like hit n trial or is there some systematic way ?

Thanks

cuMemGetInfo() will tell you how much free memory there is on the card (to account for memory already in use by the standard display).

The reason I am bringing this thread back is because this problem has shown its ugly face again.

For my ray tracer I am statically allocating space on the card for the triangles…

This works well for upto about 300 triangles…as soon as I get to 500 tris and more, the PC hangs…I once got a BSOD as well External Media

#ifdef DEFPLATE4X4

	#define VERTS 75

	#define FACES 96

	#define TRIS 32

	#define NINEXTRIS 288

#endif

...

float * d_vList;// vertices

float * d_fList;// faces

float * d_tList;// triangles

int sizeV = VERTS*sizeof(float);

int sizeF = FACES*sizeof(float);

int sizeT = NINEXTRIS*sizeof(float);

CUDA_SAFE_CALL(cudaMalloc((void**)&d_tList,sizeT));

CUDA_SAFE_CALL(cudaMemcpy(d_tList,potf0,sizeT,cudaMemcpyHostToDevice));

CUDA_SAFE_CALL(cudaMalloc((void**)&d_vList,sizeV));

CUDA_SAFE_CALL(cudaMemcpy(d_vList,potf2,sizeV,cudaMemcpyHostToDevice));

CUDA_SAFE_CALL(cudaMalloc((void**)&d_fList,sizeF));

CUDA_SAFE_CALL(cudaMemcpy(d_fList,potf1,sizeF,cudaMemcpyHostToDevice));

Thats how I do my memory allocation…What could be the problem ?

Thanks

Silly mistake proved to be my undoing External Media

Cheers

Sorry if I sound like a zealot, but Linux doesn’t hang or crash when I allocate crazy stuff on my card. If you’re in a position to dual-boot into Linux, you could try that and see what’s happening - if the computer doesn’t crash, you might see an error message. Valgrind is also super helpful.

I couldn’t see anything wrong with your code, but I haven’t had coffee yet, so …

hehe lol.

It was just a stupid mistake :P …now its running fine. External Media

Cheers