-G cuda option

Hi all,

I have a program, which executes normally only if I put -G for nvcc options. The GPU is a GTX100 one and if I remove dhe -G option the program gives e segmentation fault when run, at the first cudaMalloc of the program.

When it runs with the -G option it is much more slower than when it executes on a GTX295 architecture without the -G option.

Does any one have an idea about how to do to have the program run normally, without the -G option, on FERMI?

Thank you in advance.

Hi all,

I have a program, which executes normally only if I put -G for nvcc options. The GPU is a GTX100 one and if I remove dhe -G option the program gives e segmentation fault when run, at the first cudaMalloc of the program.

When it runs with the -G option it is much more slower than when it executes on a GTX295 architecture without the -G option.

Does any one have an idea about how to do to have the program run normally, without the -G option, on FERMI?

Thank you in advance.

-G is a debugger flag. This has some consequences for the programm execution (for example I think all kernel calls are synchronized). Probably there is some bug in your code due to racing conditions of different kernel calls / memcpy or so. What happens if you put directly behind each of your kernel calls a cudaThreadSynchronize?

Cheers
Ceearem

-G is a debugger flag. This has some consequences for the programm execution (for example I think all kernel calls are synchronized). Probably there is some bug in your code due to racing conditions of different kernel calls / memcpy or so. What happens if you put directly behind each of your kernel calls a cudaThreadSynchronize?

Cheers
Ceearem

Yes I do put a cudaThreadSynchronize after each of my kernel calls…

Yes I do put a cudaThreadSynchronize after each of my kernel calls…