- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My Fortran code can run well in
(1) Debug mode without OpenMP.
(2) Release mode with OpenMP.
Both results are closed up to 1.0e-4.
Some Nan errors occur in
(3) Debug mode with OpenMP.
So I wonder if there is any bug in my code?
Thank you.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Probably,
As you know houndred of thousands of right answers does not prove your code but a single wrong answer makes sure there is a problem.
Probably when you are in debug mode slower speed of the running makes the racing condition more evident
As you know houndred of thousands of right answers does not prove your code but a single wrong answer makes sure there is a problem.
Probably when you are in debug mode slower speed of the running makes the racing condition more evident
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The usual suspects are:
a) Uninitialized variables (in multi-threaded programming this can mean not yet initialized variables)
b) Race conditions where a critical section or atomic is missing
Enable all debug checks and enable gen-interfaces/check-interfaces to catch most of a) problems. You can remove these options after you find/fix the error.
Jim Dempsey
a) Uninitialized variables (in multi-threaded programming this can mean not yet initialized variables)
b) Race conditions where a critical section or atomic is missing
Enable all debug checks and enable gen-interfaces/check-interfaces to catch most of a) problems. You can remove these options after you find/fix the error.
Jim Dempsey
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page