cc_staff
1,486
edits
Line 3: | Line 3: | ||
[[Category:Software]] | [[Category:Software]] | ||
=Quick start guide= | =Quick start guide= | ||
To begin working with CUDA load a CUDA module. | |||
<source lang="console"> | |||
$ module purge | |||
$ module load cuda | |||
</source> | |||
As a first step we will add two numbers together. Save the below file as <code>add.cu</code>. '''The <code>cu</code> file extension is important!'''. | |||
{{File | {{File | ||
|name=add.cu | |name=add.cu | ||
Line 38: | Line 44: | ||
} | } | ||
}} | }} | ||
To build this program issue the following commands: | |||
<source lang="console"> | <source lang="console"> | ||
$ nvcc add.cu -o add | $ nvcc add.cu -o add | ||
</source> | </source> | ||
To run the program first create a GPU job script called gpu_job.sh | |||
{{File | {{File | ||
|name=gpu_job.sh | |name=gpu_job.sh |