stanford-cs193g-sp2010

所属分类:GPU/显卡
开发工具:C++
文件大小:127139KB
下载次数:0
上传日期:2015-06-08 23:24:31
上 传 者sh-1993
说明:  斯坦福大学CUDA课程材料导入
(Stanford CUDA Course Materials Import)

文件列表:
assignments (0, 2010-06-15)
assignments\mp1 (0, 2010-06-15)
assignments\mp1\Makefile (1054, 2010-06-15)
assignments\mp1\mp1-part1.cu (5043, 2010-06-15)
assignments\mp1\mp1-part2.cu (4590, 2010-06-15)
assignments\mp1\mp1-part3.cu (6570, 2010-06-15)
assignments\mp1\mp1-util.h (1473, 2010-06-15)
assignments\mp1\mp1_questions.txt (1548, 2010-06-15)
assignments\mp2 (0, 2010-06-15)
assignments\mp2\Makefile (1082, 2010-06-15)
assignments\mp2\mp2-part1.cu (7817, 2010-06-15)
assignments\mp2\mp2-part2.cu (6546, 2010-06-15)
assignments\mp2\mp2-part3-reference.cu (2511, 2010-06-15)
assignments\mp2\mp2-part3.cu (12307, 2010-06-15)
assignments\mp2\mp2-util.h (813, 2010-06-15)
assignments\mp2\mp2.h (2001, 2010-06-15)
assignments\mp3 (0, 2010-06-15)
assignments\mp3\Makefile (1992, 2010-06-15)
assignments\mp3\black_scholes.cu (6572, 2010-06-15)
assignments\mp3\black_scholes.h (3204, 2010-06-15)
assignments\mp3\compact.cu (2662, 2010-06-15)
assignments\mp3\compact.h (755, 2010-06-15)
assignments\mp3\mp3-part1.cu (12617, 2010-06-15)
assignments\mp3\mp3-part2.cu (6421, 2010-06-15)
assignments\mp3\mp3-part3.cu (13616, 2010-06-15)
assignments\mp3\mp3-questions.txt (2172, 2010-06-15)
assignments\mp3\mp3-util.h (2324, 2010-06-15)
assignments\mp3\scan.cu (4112, 2010-06-15)
assignments\mp3\scan.h (110, 2010-06-15)
assignments\mp3\scatter.cu (4411, 2010-06-15)
assignments\mp3\scatter.h (853, 2010-06-15)
assignments\mp4 (0, 2010-06-15)
assignments\mp4\Makefile (1245, 2010-06-15)
assignments\mp4\black_scholes.h (1584, 2010-06-15)
assignments\mp4\mp4-part1.cu (4760, 2010-06-15)
assignments\mp4\mp4-part2.cu (8686, 2010-06-15)
... ...

Welcome to the first Machine Problem! DUE DATE: Thu April 8, 11:59pm SUBMISSION INSTRUCTIONS ========================= You can submit an assignment from any of the cluster machines by using our submit script. Th submit script bundles the entire current directory into a submission. Thus, you use it by CDing to a the directory for your assignment, and running: > cd *some directory* > /usr/class/cs193g/bin/submit mp1 This will submit the current directory as your assignment. You can submit as many times as you want, and we will use your last submission. RUNNING THE ASSIGNMENT ======================= We want to get you up to speed with the nitty gritty details of the environment required by CUDA. We've (hopefully) simplified this by including a Makefile that configures the environment for the pups cluster machines. We will provide a more general makefile in later problems. You can use what we've provided in three ways: 1) RUNNING ON PUPS USING OUR MAKEFILE: ====================================== To compile the three problems (mp1-part1.cu, mp1-part2.cu and mp1-part3.cu), run: > make all This will generate a "part1", "part2" and "part3" executable. When you run this from the shell, it will most probably complain about some shared library. To run any of the problems, you can also use the makefile, like so: > make run1 > make run2 > make run3 This will set the correct shared library path, and run each of the executables. 2) MODIFYING MAKEFILE FOR YOUR OWN MACHINE: =========================================== The details of the installation comes from CUDA's "Getting Started" guides, available here: http://developer.nvidia.com/object/cuda_3_0_downloads.html You can modify our makefile for your own use (which assumes you're running on Mac or Linux), by setting the NVCC and LD_LIBRARY_PATH variables in the makefile to their correct paths for your machine. For ***-bit installations: LD_LIBRARY_PATH := /usr/local/cuda/lib*** For 32-bit installations: LD_LIBRARY_PATH := /usr/local/cuda/lib 3) SETTING GLOBAL ENVIRONMENT FOR CUDA WORK: ============================================= Since you probably want to configure your computer to do cuda work in general, or you might not want to always use the makefile to run an executable, you can set the required environmental variables for your shell using your .profile or .bashrc file. You want to set the nvcc compiler to be part of your path, and you want to set your LD_LIBRARY_PATH to point to the folder where the "libcudart.so" file is. For c-shell variants (the default on pups): setenv PATH $PATH:/usr/local/cuda/bin setenv LD_LIBRARY_PATH /usr/local/cuda/lib For bash variants (the default on macs): export PATH=$PATH:/usr/local/cuda/bin export LD_LIBRARY_PATH=/usr/local/cuda/lib If you're on a ***-bit architecture, you need to use the lib*** directory rather than the lib directory. Any issues should be addressed to the class mailing list (a TA will answer it), or during office hours.

近期下载者

相关文件


收藏者