Invalid device ordinal

Hi, we’re running Cuda 5.0 on 64-bit CentOS 6.3 with Tesla C1060 and Quadro 400 and Tesla driver 310.32. When we run a CUDA-enabled app it runs for a few seconds and says:

invalid device ordinal

We’ve tried many fixes but nothing works. We’re stumped. Reinstalled newest driver. Blacklisted nouveau and certain nvidia drivers are used. Has anyone else come across this issue and fixed it?

Never mind - we fixed it. The app itself defined an invalid device id. Simple fix.