TeslaGpuKMBnote1
As "as things stand" note as of 2010-11-02
This is meant to help get you going whilst we tidy up the system and environment.
Accessing the Tesla host machine
If you have an account on the host for the Tesla card, you should be
able to SSH to red-tomatoes
from your ECS workstation.
You have a home directory which should be considered simply a "landing point", which is:
/home/username
DO NOT use this for storing files at present.
You have the same shell as you have on the ECS/MSOR systems.
Your ECS/MSOR filestore is not currently accesible but you can simply scp or rsync files across
There is another area of filestore owned by you on the path
/local/scratch/username
which can also be accessed by using the environmental variable
$LOCSCR
This is the area you should be looking to work in at present.
The $PATH
and $LD_LIBRARY_PATH
environmental variables are
automatically set to contain the CUDA-specific stuff when
you login.
Experimenting with the SDK
A copy of the unpacked SDK including examples can be found here
/opt/NVIDIA_GPU_Computing_SDK-3.2
and so source codes, Makefiles, etc can be studied from there, however, the Guide recommends that you unpack your own copy if you wish to build examples within the tree, and the way I suggest you do that is as follows
This first bit is important, change directory to your local scratch area:
cd $LOCSCR
then run the following command which accesses the original downloaded files and other related stuff living in my scratch area:
sh /local/scratch/kevin/CUDA_CD/gpucomputingsdk_3.2_linux.run
This will suggest you create a directory:
~/NVIDIA_GPU_Computing_SDK
DO NOT, repeat DO NOT accept the deafult at this time, enter
/local/scratch/USERNAME/NVIDIA_GPU_Computing_SDK
and the whole of the SDK will unpack for you.
You should thus see the following, assuming you:
- Replace USERNAME with your username
- Accept the default for the CUDA install path
Verifying archive integrity... All good. Uncompressing NVIDIA GPU Computing SDK................ ... Enter install path (default ~/NVIDIA_GPU_Computing_SDK): /local/scratch/USERNAME/NVIDIA_GPU_Computing_SDK Located CUDA at /opt/cuda If this is correct, choose the default below. If it is not correct, enter the correct path to CUDA Enter CUDA install path (default /opt/cuda): ... lots files being upacked ... ======================================== Configuring SDK Makefile (/local/scratch/USERNAME/NVIDIA_GPU_Computing_SDK/C/common/common.mk)... ======================================== * Please make sure your PATH includes /opt/cuda/bin * Please make sure your LD_LIBRARY_PATH includes /opt/cuda/lib * To uninstall the NVIDIA GPU Computing SDK, please delete /local/scratch/USERNAME/NVIDIA_GPU_Computing_SDK * Installation Complete
Building SDK examples
If you then follow the instructions from the Guide available at the CUDA web site and make all the examples, you will end up using nearly 800 MEGABYTES of space. Not Good.
However, building a single example is not as simple as simply changing into an example directory and running make.
The examples use some support libraries that are themselves part of the SDK, so you have to build those first.
So I'd suggest doing the following to build, for example, the
deviceQuery
example, but note
- By default the SDK
make
invocations run silently, so if you want to see what is happening, use
make verbose=1 ...rest of your arguments...
so,
cd /local/scratch/USERNAME/NVIDIA_GPU_Computing_SDK/C/ make verbose=1 -C common make verbose=1 -C common -f Makefile_paramgl make verbose=1 -C common -f Makefile_rendercheckgl make verbose=1 -C ../shared
Those commands create these supporting libraries:
/local/scratch/USERNAME/NVIDIA_GPU_Computing_SDK/C/lib/libcutil_x86_64.a /local/scratch/USERNAME/NVIDIA_GPU_Computing_SDK/C/lib/libparamgl_x86_64.a /local/scratch/USERNAME/NVIDIA_GPU_Computing_SDK/C/lib/librendercheckgl_x86_64.a /local/scratch/USERNAME/NVIDIA_GPU_Computing_SDK/shared/lib/libshrutil_x86_64.a /local/scratch/USERNAME/NVIDIA_GPU_Computing_SDK/shared/lib/linux/libGLEW.a /local/scratch/USERNAME/NVIDIA_GPU_Computing_SDK/shared/lib/linux/libGLEW_x86_64.a
You can then build the example as follows:
cd /local/scratch/USERNAME/NVIDIA_GPU_Computing_SDK/C/ make verbose=1 -C src/deviceQuery
which creates
/local/scratch/USERNAME/NVIDIA_GPU_Computing_SDK/C/bin/linux/release/deviceQuery
You can then run it as:
/local/scratch/USERNAME/NVIDIA_GPU_Computing_SDK/C/bin/linux/release/deviceQuery
and you will see something similar to the following.
$ /local/scratch/kevin/NVIDIA_GPU_Computing_SDK/C/bin/linux/release/deviceQuery ./deviceQuery Starting... CUDA Device Query (Runtime API) version (CUDART static linking) There is 1 device supporting CUDA Device 0: "Tesla T10 Processor" CUDA Driver Version: 3.20 CUDA Runtime Version: 3.20 CUDA Capability Major/Minor version number: 1.3 Total amount of global memory: 4294770688 bytes Multiprocessors x Cores/MP = Cores: 30 (MP) x 8 (Cores/MP) = 240 (Cores) Total amount of constant memory: 65536 bytes Total amount of shared memory per block: 16384 bytes Total number of registers available per block: 16384 Warp size: 32 Maximum number of threads per block: 512 Maximum sizes of each dimension of a block: 512 x 512 x 64 Maximum sizes of each dimension of a grid: 65535 x 65535 x 1 Maximum memory pitch: 2147483647 bytes Texture alignment: 256 bytes Clock rate: 1.30 GHz Concurrent copy and execution: Yes Run time limit on kernels: No Integrated: No Support host page-locked memory mapping: Yes Compute mode: Default (multiple host threads can use this device simultaneously) Concurrent kernel execution: No Device has ECC support enabled: No Device is using TCC driver mode: No deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 3.20, CUDA Runtime Version = 3.20, NumDevs = 1, Device = Tesla T10 Processor PASSED Press <Enter> to Quit... ----------------------------------------------------------- $
Building your own programs
It should be possible to use the SDK examples and directory structure to create your own external build environment.