How to run a cuda file?

I am a beginner in cuda programming. I just copied some files from online, then i did some modifications on it.

I tried to compiled it

nvcc -cuda

A temporary file is created.

But How do I run this file? I have some main() method inside of :blink:

I tried to do ./, ==> I get permission denied. :blink:

I changed permission, run it again ==> syntax error around ( (it is the first ‘(’ in the first line of code)) :blink:

Could anyone helps me??? How can I run a file written by .cu

Thank you a lot!!!


nvcc -o a.out