Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5933497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:58:53+00:00 2026-05-22T14:58:53+00:00

I suspect I have a fine grained memory error in a large CUDA kernel

  • 0

I suspect I have a fine grained memory error in a large CUDA kernel I’m running. Device side printf is showing some varying values on variables that should be deterministic. The “stable” version of the CUDA development tools I’m using removed device emulation mode, and its version of cuda-gdb doesn’t work with templated functions. Cuda-memcheck runs, but doesn’t catch anything.

On the cpu I would use valgrind or electric fence to catch memory errors like this. What neat tricks are there for debugging memory errors if all you have available is printf?

For example, is there a way to flood the entire memory space with nans and use printfs to find where they first pop up in my computations?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T14:58:53+00:00Added an answer on May 22, 2026 at 2:58 pm

    For this sort of thing, I like to allocate the whole available global memory space, then manange the memory myself. Use a custom memset function to set the whole allocation to recognisable word sized bit pattern, then initialize blocks within the allocation for your kernel to use. If you implement a simple device side assert to trap that bit pattern and report thread, block, line where it shows up, you should be able to isolate out of bounds global memory reads that cuda-memcheck doesn’t catch.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Apache2 (2.2.12) / Passenger (2.2.9).. Have 2 apps running.. One runs fine in
One day I suspect I'll have to learn hadoop and transfer all this data
I have the following situation in code, which I suspect may be a bit
I have a rails app that is working fine except for one thing. When
I have an ogg vorbis video. It plays fine in totem and mplayer. I
hi i have a function that worked fine using jQuery 1.3.2 but now i
I have a java application I've written in eclipse. It works fine there. It
Okay, this is getting stupid, I have Microsoft Visual Studio 2008, was working fine,
I have a query that is working fine when I run in through phpMyAdmin
I'm uploading multiple files via XmlHTTPRequest and HTML5. I have the uploading working fine,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.