Running gpu jobs on scholar -- bold is comments from me, italics is printed by the machine, regular font is what I typed.
Login to gpu.scholar.rcac.edu note this is not scholar.rcac.edu
smidkiff@scholar-fe06:~ $ cd gpu my directory for this job.
smidkiff@scholar-fe06:~/gpu $ module purge unload all modules
The following modules were not unloaded:
(Use "module --force purge" to unload all):
smidkiff@scholar-fe06:~/gpu $ module load gcc/4.8.5 load gcc, you can also load the intel compiler.
smidkiff@scholar-fe06:~/gpu $ module load cuda load the cuda compiler
smidkiff@scholar-fe06:~/gpu $ nvcc hello.cu compile the job, ignore the warnings
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
smidkiff@scholar-fe06:~/gpu $ ./a.out run the job locally
Hello World from GPU!
The program I ran was very simple:
#include
__global__ void cuda_hello(){ }
int main() {
cuda_hello<<<1,1>>>();
printf("Hello World from GPU!\n");
return 0;
}
Last updated March 29, 2019