How to run X11 gpu
The GPU nodes on eureka have been configured to allow users to run interactive X11 jobs. In order for this to work correctly, You MUST enable X11 forwarding on your workstation. You can do this by adding the -X (or -Y for some ssh versions) to you ssh/slogin command.
slogin -Y eureka.nscee.edu
Once you have logged into eureka, you then can start an interactive job on the gpu nodes by issuing the following qsub command:
bsub -q gpu -XF -I <command>
For example a quick test to see if your X11 forwarding is configured correctly:
bsub -q gpu -XF -I xclock
If a clock image appears, then X11 is being forwarded correctly.
If you are going to develop (or compile) gpu programs, you must include the cuda/4.1 module. For more information regarding modules, see the Software page. Once you have included the cuda/4.1 module, you can then use the nvcc compiler to compile you gpu code. For example, to compile and execute the heat_2d.cu sample program contained in Chapter 7 of the book "CUDA by Example" (Jason Sanders & Edward Kandrot, Addison Wesley, 2011). Issue the following commands:
cd cuda_by_example/chapter07 nvcc -o eat_2d $GLUT_INCLUDE heat_2d.cu $GLUT_LIB -lglut
To submit the job to the gpu queue:
bsub -q gpu -XF -I ./heat_2d
Here is an example of an actual run of heat_2d:
[ron@eureka chapter07]$ nvcc -o heat_2d $GLUT_INCLUDE heat_2d.cu $GLUT_LIB -lglut [ron@eureka chapter07]$ bsub -q gpu -XF -I xterm Job <10346> is submitted to queue <gpu>. <<ssh X11 forwarding job>> <<Waiting for dispatch ...>> <<Starting on gpu02>> [ron@eureka chapter07]$ bsub -q gpu -XF -I ./heat_2d Job <10347> is submitted to queue <gpu>. <<ssh X11 forwarding job>> <<Waiting for dispatch ...>> <<Starting on gpu00>> Average Time per frame: 29.1 ms Average Time per frame: 28.7 ms Average Time per frame: 28.5 ms ... ...