CUDA Samples: lower FPS when compiling with Nsight Eclipse

When I compile some of the graphical CUDA Samples (particles, smokeParticles) manually with the make command I get 60 FPS at execution. However, after I create a new CUDA project importing a CUDA Sample with Eclipse Nsight, I get 14 FPS. I also tried compiling the project manually using the makefile that eclipse creates but the result is the same. Why is this happening?

maybe it’s the -G switch. If you are building a debug project in nsight eclipse, it is adding the -G switch to the compile command.

Thanks! I tried what you’ve said, but didn’t have any affect.
I’ve also tried another project that I’ve made, which has a CPU part and a GPU part, and compiling in windows it results much faster the GPU part, but in Linux, compiling with Eclipse Nsight, it results in half speed than the CPU part.

Could it be another setting?

What are the exact nvcc invocations (both build and link) used in the standalone build and the Nsight builds? If the differences is not due to a debug setting, they are likely due to an optimization flag setting, or an GPU architecture setting. Impossible to diagnose without seeing the exact command lines used.

My general advice (completely independent of CUDA), which may seem old-fashioned and radical, is to avoid building through any mechanism that obscures and obfuscates build settings, such as MSVS solution files, cbuild, or Eclipse IDE. Simple makefiles work well and are much easier to debug. This extends to builds covering more than one platform, based on 10+ years experience with multi-platform software development.

You can actually open up the Makefiles made by Eclipse and look through them. So yes, please post how Eclipse is making.

Also, consider that you can turn on various optimization flags in Eclipse as well.

Compare the two actual Makefiles side-by-side and then we’ll figure this out.