Hi,
I just started using CUDA on my Mac. I run this simple helloworld kernel with disabled printf() and on purpose requested 40,000 threads to run on a grid with just one block.
This can’t run due to 512 max # of threads per block, but yet CUT_CHECK_ERROR() have not detected any problem.
Is there sth obvious I’m missing?
Thanks
Jan
int
main(int argc, char** argv)
{
CUT_DEVICE_INIT(argc, argv);
// setup execution parameters
dim3 thrdInBlk(200,200); //
dim3 blkInGrid( 1);
// execute the kernel
helloWorld<<< blkInGrid, thrdInBlk >>>( );
// check if kernel execution generated and error
CUT_CHECK_ERROR(“Kernel execution failed”);
return EXIT_SUCCESS;
}
global void
helloWorld( )
{
// Synchronize to make sure data is loaded
__syncthreads();
}