I’m trying to compile CUDA stuff on 64-bit Windows 7 using MSVC 8 (2005). I’m using the 64-bit v3.2 of the toolkit, and corresponding driver and SDK. I’ve got two programs, one a standalone executable which manages to compile in 32-bit mode (haven’t tried 64-bit yet), but then hangs before it even reaches main(), and the other a MATLAB dll which I can compile in 64-bit mode but which crashes when the first cuda function is called. Both programs compile and runs fine on a 32-bit system.
For the standalone executable, built using a MSVC 8 project, I’m just using a Win32 configuration that builds and runs fine under 32-bit Windows. The command line for the CUDA code is:
“C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v3.2\bin\nvcc.exe” -gencode=arch=compute_11,code=“sm_11,compute_11” --machine 32 -ccbin “C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin” -Xcompiler “/EHsc /W3 /nologo /O2 /Zi /MT " -I"include” -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v3.2\include" -maxrregcount=128 --compile -o “Release/blah.vcproj.obj” blah.vcproj
It builds, but then hangs before even getting to the start of main().
For the MATLAB (R2010b 64-bit) dll I first separately compile each .cu file into a .cpp file using nvcc --cuda -m64, passing in the path to the 32-bit MSVC compiler and include directory. Then I compile the dll from all the .cpp files using MATLAB’s mex command, passing in the path to the 64-bit CUDA libraries. The compilation succeeds, but MATLAB crashes on the first call to a CUDA function. I know that a few people have had success using the nvmex package, but I’d really like to avoid using this.
Any help on either of these issues would be much appreciated.