Channels ▼
RSS

Parallel

CUDA, Supercomputing for the Masses: Part 14


Concerns and Known Issues

Please be aware of the following concerns and known issues as of the CUDA 2.3 release:

  • Word size of the host system is no longer a concern as CUDA-GDB (as of the CUDA 2.2 Beta release) now supports both 32- and 64-bit systems
  • There are reports in the forums that CUDA-GDB will sometimes hang. Be aware that this is a complex port of GDB and that NVIDIA appears to be doing a good job in fixing problems
  • Any of the following might affect program behavior or performance when using the debugger:
    • X11 cannot be running on the GPU that is used for debugging. Suggested workarounds include:
      • Remote access to a single GPU (VNC, ssh, etc.)
      • Use two GPUs, where X11 is running on only one of the graphics processors
    • As of CUDA 2.2, the CUDA driver will automatically exclude the device running X11 from being picked by the application being debugged
    • Compiling with the -G option causes variables to be spilled to local memory, which can significantly reduce program performance. (As noted in Part 5, local memory can be up to 150x slower than register or shared-memory)
    • Kernel launches are no longer asynchronous as the debugger enforces blocking kernel launches
  • Scope shadowing is not supported. This means that if a variable is introduced in an inner scope that has the same name as a variable in the outer scope, only the outer scope's value can be seen. The AssignArray.cu example demonstrates this restriction
  • The debugger must be stopped in the kernel to examine device memory (allocated via cudaMalloc()) as device memory is not visible outside of the kernel function.
  • Host memory that was allocated with cudaMallocHost() is not visible in CUDA-GDB
  • Multi-GPU applications are not supported
  • Not all illegal program behavior can be caught in the debugger, such as out-of-bounds memory accesses or divide-by-zero situations.
  • It is not currently possible to step over a subroutine in device code
  • These columns focus on using the runtime interface. Any programs using the device driver API cannot be debugged with CUDA-GDB because the device driver API is not supported

Summary

Proven software development strategies such as assertions and regression testing will greatly assist in developing software that is correct and bug free. When porting legacy software, look into the useful mapped memory features that are now available in CUDA. When bugs manifest themselves, CUDA-GDB can be used to track them down. Since GPU problems generally manipulate large amounts of data, artificial array and having a few simple routines in your code that can interactively be called from CUDA-GDB can really speed the debugging process.

For More Information


Rob Farber is a senior scientist at Pacific Northwest National Laboratory. He has worked in massively parallel computing at several national laboratories and as co-founder of several startups. He can be reached at rmfarber@gmail.com.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.
 

Video