How to set CUDA environment variables LINUX

I need to set CUDA_LAUNCH_BLOCKING to 0.
I know it’s his default value, but it could be at 1 because in my program i have to call 2 different threads (to work on the same matrices) one after the other and in this way the time doubles!
Maybe i made a mess with the configurations, i didn’t found a very clear answer on internet for my problem (i run Ubuntu 10.10) so please help me!

If your application is called “app” then run it like so:

CUDA_LAUNCH_BLOCKING=0 ./app

But I can’t help you any further as I don’t understand what the issue is. You are attempting to work on the matrix with 2 threads, one after the other and so of course the time doubles!?