Hi everyone! External Image
My computer don’t have a GPU capable to handle CUDA (a poor GF4 MX400 :wacko: ) so i want to test some programs in emulation mode.
I have MS Visual C++ Express and all the things froms CUDA (drivers, SDK etc) but i don’t know how to compile a CUDA program to work in emulation mode.
So i hope someone know how to do this…
Thanks!
I found this to run a cuda file on CPU:
nvcc -deviceemu -g .cu
But there is one thing i can’t understand.
When i choose a file in the SDK folders like “marchingCubes” there is a lot of files.
If i take the .cu (In this case marchingCubes_kernel.cu) how can i have a .exe with just this file?
Second problem, when i try to compile with nvcc in command line prompt i have an error with cl.exe
Please give some help
Another thing, I run on VS 9.0 Express Edition (Visual C++ 2008)
parmar
April 17, 2009, 12:02pm
4
For windows you dont need to bother about the command line stuffs.Just install toolkit and SDK properly
and compile the project in emudebug or emurelease build configuration.
parmar
April 17, 2009, 1:20pm
5
If you want to run your SDK project with emulator , without hardware,follow the steps
Open your project in visual studio
Open the cuda file from the project,which is with extension .cu
Search for cudaSetDevice( cutGetMaxGflopsDeviceId() ); function in the cuda file.
Set the argument as “zero”
eg: cudaSetDevice( 0 );
Now run your application with the build emudebug or emurelease
External Image
Wow!!! Thank you so much!!! I was stuck trying to run the template project with emulator… Now it worked. Thanks again
lion88
April 18, 2009, 7:10pm
7
"compile the project in emudebug or emurelease build configuration. " ,But how to do in VC2008?I can’t find any “emudebug or emurelease” in VC IDE?
can anyone tell me who to do?
lion88, are you using the CUDA Wizard that has been posted on the forum?
Hi im back!
Thanks for the useful answers!
But i have a problem with VS 9.0:
I don’t have any “Emudebug” or “Emurelease” just “Debug” or “Release”
How can i inform the IDE to match these propreties?
I think both of you should try to use the wizard if you haven’t already. Here it is
[url=“CUDA VS Wizard - Browse Files at SourceForge.net ”]CUDA VS Wizard - Browse Files at SourceForge.net
Install it, start a new project in VS using CUDA template and see if now you see Emu versions.
Good it works!
Now i have “Emudebug” and “Emurelease” thanks but i don’t know why when i compile the “particle” project i don’t have a .exe even if the compiler tell me that the opération suceed.
------ Début de la génération : Projet : particles, Configuration : EmuDebug Win32 ------
Compiling with CUDA Build Rule…
“C:\CUDA\bin\nvcc.exe” -arch sm_10 -ccbin “C:\Program Files\Microsoft Visual Studio 9.0\VC\bin” -Xcompiler "/EHsc /W3 /nologo /O2 /Zi /MTd " -IC:\CUDA\include -I./ -I…/…/common/inc -maxrregcount=32 --compile -o EmuDebug\particleSystem.cu.obj particleSystem.cu
particleSystem.cu
tmpxft_0000be98_00000000-3_particleSystem.cudafe1.gpu
tmpxft_0000be98_00000000-8_particleSystem.cudafe2.gpu
tmpxft_0000be98_00000000-3_particleSystem.cudafe1.cpp
tmpxft_0000be98_00000000-13_particleSystem.ii
Note: including lib: glut32.lib
Compilation en cours…
cl : Ligne de commande warning D9035 : l’option ‘Wp64’ est désapprouvée et sera supprimée dans une version ultérieure
param.cpp
paramgl.cpp
Note: including lib: glut32.lib
particles.cpp
Note: including lib: glut32.lib
particleSystem.cpp
render_particles.cpp
shaders.cpp
Génération de code en cours…
Édition des liens en cours…
Incorporation du manifeste en cours…
Exécution d’un événement après génération…
Le journal de génération a été enregistré à l’emplacement “file://c:\Documents and Settings\All Users\Application Data\NVIDIA Corporation\NVIDIA CUDA SDK\projects\particles\EmuDebug\BuildLog.htm”
particles - 0 erreur(s), 1 avertissement(s)
========== Génération : 1 a réussi, 0 a échoué, 0 mis à jour, 0 a été ignoré ==========
If you want to run your SDK project with emulator , without hardware,follow the steps
Open your project in visual studio
Open the cuda file from the project,which is with extension .cu
Search for cudaSetDevice( cutGetMaxGflopsDeviceId() ); function in the cuda file.
Set the argument as “zero”
eg: cudaSetDevice( 0 );
Now run your application with the build emudebug or emurelease
==> Yes i found the line “cudaSetDevice( cutGetMaxGflopsDeviceId() )” in the file “ParticleSystem.cu”.
I erase cutGetMaxGflopsDeviceId() to just let the line “cudaSedDevice( 0 );” but same problem, no .exe
It seems the linker doesn’t kick in after the compiler is done. I don’t know what might be causing it.
Another, i have a strange file in my folder after compiling called : “particle.exe.intermediate.manifest”
parmar
April 20, 2009, 12:16pm
15
Hi all,
You cant see the exe in the EmuDebug folder.Please find the executable file in the given path
..\NVIDIA CUDA SDK\bin\win32\EmuDebug
This is the path where you installed your CUDA SDK
thanks,…
Thanks! I found the directory which contain all the executables.
But how can i have OpenGL support? (when i double clik on an exe, the command prompt tell me that i miss OpenGl and quit after)
OpenGL extensions exactly
I’m having a very similar error. Running simpleGL gives the message: ERROR: Support for necessary OpenGL extensions missing.
I’m trying to run CUDA in emulation on an Intel GPU under Vista, with Visual Studio 2008. This seems like it’s an OpenGL problem and not a CUDA problem, but as far as I can tell the libraries included with the SDK should run fine on my machine. Any leads?
parmar
April 21, 2009, 6:05am
19
Hi all,
I am getting the output, when we double clicked on exe for given path.
Can you mention which card(like nVidia or ATI) you are using??its required some card that support OpenGL.
Regards,
Parmar
parmar
April 21, 2009, 6:13am
20
Hi all,
Please check in SDK clock and bandWidthTest sample is working on your system.
If these are working,then surely you need some graphics card for OpenGL sample.
Regards,
parmar.