CS791v Homework and Submission Rui (Ray) Wu raywu1990@nevada.unr.edu
Overview How to submit homework How to install CUDA toolkit How to use Cubix
How to submit homework Step 1: Register for a GitHub student account Step 2: Download Rui’s GitHub template repository: https://github.com/ruiwu1990/CS791v-GPU Step 3: Add Rui as your collaborator
Step 1: Register a GitHub student account Apply for a UNR edu email address. Instructions are here: https://www.unr.edu/it/communications/email/student Register for a GitHub student account: https://education.github.com/ With a GitHub student account you can create a private repository (for free) ,
Step 2: Download Rui’s GitHub template repository Here is the link: https://github.com/ruiwu1990/CS791v-GPU Folder structure: include (header files), src (.cpp and .cu), build (DON’T UPLOAD, files generated by the “make” command), README file (introduction) A similar folder structure is acceptable, e.g. data (.csv) Three special files: .gitignore: what kind files will not be uploaded makefile: commands to compile your program and generate executable file. Here is a tutorial how to write a makefile: https://www.cs.bu.edu/teaching/cpp/writing-makefiles/ Cmake: more power but more complex. CMake recognizes which compilers to use for a given kind of source. Daniel provides PA0 cmake file. Here is a tutorial on Cmake: https://cmake.org/cmake/help/v3.3/command/file.html
Step 3: Add Rui as your collaborator My GitHub id: ruiwu1990 Live demo how to add: settings->collaborators->type Rui’s ID How I will check your homework: I will ONLY use Make in the TERMINAL, so test it in a terminal before the deadline. Place all your homework in the same repository (PA0, PA1, …) Cuda IDEs will be introduced in the next class
How to install the CUDA toolkit Ubuntu 16.04 First you need to check if the driver is installed, by using “nvidia-smi” If “cannot communicate with graphic card”, follow instructions: https://askubuntu.com/questions/851069/latest-nvidia-driver-on-ubuntu-16-04
How to install the CUDA toolkit Here is the download link: https://developer.nvidia.com/cuda-90-download-archive Latest version is 9.1 but it is not stable. We are using 9.0 in this course Step 1, you need to cd into the download folder Step 2: sudo apt-key add /var/cuda-repo-9-0-local/7fa2af80.pub After Step 4, you may need to run: sudo apt-get -f install
How to install the CUDA toolkit Setup your PATH variable This tells your shell where to find the executable file->nvcc apt install nvidia-cuda-toolkit may work BUT it changes the paths and makes the installation of other tools more difficult. If it does not work: try this: https://askubuntu.com/questions/799184/how-can-i-install-cuda-on-ubuntu-16-04
How to use Cubix First you need a Cubix account (cse account) Some of you already have one, The rest need to ask for one: CSE Admins, ehelp@cse.unr.edu ssh <username>@cubix.cse.unr.edu, replace <username> with your username If you execute any GPU program in Cubix, you need to use Slurm: https://slurm.schedmd.com/quickstart.html Slurm: a workload manager and manages all the execution requests in queues.
How to use Cubix Environmental parameter setup Execute program: srun nvcc ./PA0 Other slurm commands: https://ubccr.freshdesk.com/support/solutions/articles/5000686861-how-do-i-check-the-status-of-my-job-s-
PA0 If everything is installed correctly: If not: Let’s do a live demo
Questions & Comments? Img credit: http://advertisementfeature.cnn.com/think-brilliant/wrong-question-right-answer.html