program exit on memory allocation

hi

i am a beginner in programming using CUDA. i have installed CUDA toolkit and sdk and also vs wizard. now when i run a sample program from sdk it gets exit saying cudaOpenMP.exe native exited with code 1(0x1)…

when i ran program using breakpoint in cudaOpenMP program i found it gets exit as soon as it execute the following line:

CUDA_SAFE_CALL(cudaMalloc((void**)&d_a, nbytes_per_kernel));

and in reduction program it gets exit on:

cutilSafeCallNoSync(cudaChooseDevice(&dev, &deviceProp));

please help me with it…

thanks

Akhshay Gandhi

Sorry, which project is this? I’m using Linux so I probably can’t help much.

these programs: cudaOpenMP and reduction comes with sdk as example programs.

Are these different on Windows? I don’t see cudaOpenMP with 2.1. Unfortunately I’m running 2.2 beta toolkit so things won’t compile.

in re. “please help me so that i can test the sample and start my project” I suggest you try to start anyway; the code samples aren’t infinitely useful. Check out uiuc’s lectures http://www.nvidia.com/object/cuda_education.html. Try pycuda if you want a slightly easier start.

~/NVIDIA_CUDA_SDK/projects> ls

alignedTypes	  convolutionSeparable  histogram256	 MonteCarloMultiGPU	scanLargeArray		  simpleTextureDrv

asyncAPI		  convolutionTexture	histogram64	  nbody				 simpleAtomicIntrinsics  simpleVoteIntrinsics

bandwidthTest	 cppIntegration		imageDenoising   oceanFFT			  simpleCUBLAS			smokeParticles

bicubicTexture	dct8x8				lineOfSight	  particles			 simpleCUFFT			 SobelFilter

binomialOptions   deviceQuery		   Mandelbrot	   postProcessGL		 simpleGL				template

bitonic		   dwtHaar1D			 marchingCubes	quasirandomGenerator  simpleMultiGPU		  threadMigration

BlackScholes	  dxtc				  matrixMul		recursiveGaussian	 simpleStreams		   transpose

boxFilter		 eigenvalues		   matrixMulDrv	 reduction			 simpleTemplates		 volumeRender

clock			 fastWalshTransform	MersenneTwister  scalarProd			simpleTexture

convolutionFFT2D  fluidsGL			  MonteCarlo	   scan				  simpleTexture3D

yes they are the same but it doesnt have all the files… there are 64 such projects in windows… alright so you have matrixMul program… so at line no 108 in matrixMul.cu my program get exit at that line…

the line is :

cutilSafeCall(cudaMalloc((void**) &d_A, mem_size_A));

i will try pycuda…

thanks…

pycuda has pretty nice error handling and uses the driver api, so it might work.

I’m getting some compile error “macro “__cudaRegisterEntry” passed 3 arguments, but takes just 2” with both the 2.1 and the 2.2 sdk… it’s possible this is because the 2.2 toolkit is still in beta. Sorry I can’t be more useful.