ok. First i cant post the code cos its my work on a project and its a code about 900 lines… but by the fact that the code gives normal results with FLOAT variables means that there is no problem with it wright?When i simply search and replace all the FLOAT with DOUBLE then i get wrong results.
Compiler option? i use this to compile in command prompt : nvcc -arch sm_13 sbj.cu -o sbj.exe
what do you mean by configuration? its gtx260 with default settings no OC and things like that with the latest drivers tha nvidia has.
if it’s 900 lines, how about trying to replicate the problem with a minimum amount of code?
and no, just changeing float to double won’t do the trick…
i’ll just give a short example:
you have a kernel with float arithmetic and there is some “shared float foo[3000];” standing around.
what happens if you change the float to double? will it still work?
no! because you would not use 12.000 bytes of shared memory but 24.000 bytes! and as this is more than 16k, you’ll either get a compiler error (if you’re lucky) or you’ll just see garbage as a result.
do you see what i mean? it’s usually errors of this sort that produce such results. but we can only help you, if you show us some source, where the error is present.
When i tried to complie it (and using float variables) with this command : “nvcc -D_CRT_SECURE_NO_DEPRECATE -ptx jet.cu -o jet.exe”
it sais on screen : “Program too big to fit in memory”
why is that?
And also as you said shared memory is limited to 16KB . When i declare a variable , without any variable qualifier such as device or shared when the variable is saved generally?
and specially when i declare it inside int main() , or inside a global , or a device function ?
leave out parts of your program, see if it compiles. if not, leave out more.
if you’ve found something that causes the issue and post what you had to delete last to make it work, it should be much clearer, what the problem is.