A strange behavior occurs when cutil.h methods are called from a cuda-Matlab MEX file.
To demonstrate it here, I took the simple example of fft_cuda.
I added #include “cutil.h” and from within the main function I called one of the cutil.h methods by:
unsigned int timer = 0;
Compiling it returns no special problems, but on runtime I get the error:
??? Invalid MEX-file ‘C:\cuda\fft_cuda_2.mexw32’: The specified module could not be found.
I suspect it fails to find the cutil dll or lib, but this does not help me in solving the problem.
I compile the attached .cu file using:
nvmex -f nvmexopts.bat -IC:\cuda\include -IC:\CUDA\bin -IC:\CUDA\common\inc -LC:\cuda\lib -LC:\CUDA\common\lib -LC:\CUDA\bin -lcufft -lcudart -lcutil32D -lcutil32 -lglut32 fft_cuda_2.cu
I included all the libraries I could think of for the -I and -L switches, and still it doesn’t help. Interestingly enough, the problem does not persist with other libraries such as the opengl glut32, the cufft and others, only with the cutil one (as far as I observed).
cutil has many methods that I need to use, right now I’m really stuck… <img src=‘http://hqnveipbwb20/public/style_emoticons/<#EMO_DIR#>/crying.gif’ class=‘bbc_emoticon’ alt=’:’(’ />
fft_cuda_2.rar (2.13 KB)