- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can anyone tell me what the "-debug all" flag actually does? I've always assumed it encompasses several other flags in its use so as to simplify your command line entry.
The reason I'd like to know is that I'm trying to hunt down a bug in my code. Its in an n-body simulation and the run times are reasonably long. For some reason, after its been running for a while, some of my values turn into NaNs and the program then grinds to a halt (but doesn't crash). I've discovered that adding the "-debug all" compile option seems to alleviate the problem, at least it didn't crash after an hour's running but then that could just be chance for all I know. It does get past a particular time point when it would crash without the "-debug all" command anyway.
Obviously, using the "-debug all" flag isn't exactly doing wonders to the speed of my program so, if possible, I'd like to know what exactly it does so that I can narrow down the source of the bug. Or, if I can't get rid of the bug then at least find the one flag necessary to get the code moving again with the minimum amount of slow down.
I'm running Leopard 10.5.6 and my version of iFort is 10.1.017. My current machine is a Unibody MacBook Pro 2.53GHz Core 2 Duo with 4GB RAM. I'm using the 64 bit version of iFort.
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Presumably, -debug (or -g) changes the default optimization level from -O2 to -O0. This might alleviate potential problems with un-initialized variables or variables which might require SAVE. The option -save would impose SAVE semantics wherever possible, even with normal optimization. -O0 may also impose double precision evaluation of single precision expressions. Also, -debug would eliminate the need for options such as -assume protect_parens -prec-div -prec-sqrt -no-ftz.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As far as I know, just specifying -debug would default optimization to -Od (-O0), but make no other changes in options. The compiler will sometimes need to generate additional data structures used for debugging arrays.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - intel@hellary.co.uk
Can anyone tell me what the "-debug all" flag actually does? I've always assumed it encompasses several other flags in its use so as to simplify your command line entry.
The reason I'd like to know is that I'm trying to hunt down a bug in my code. Its in an n-body simulation and the run times are reasonably long. For some reason, after its been running for a while, some of my values turn into NaNs and the program then grinds to a halt (but doesn't crash). I've discovered that adding the "-debug all" compile option seems to alleviate the problem, at least it didn't crash after an hour's running but then that could just be chance for all I know. It does get past a particular time point when it would crash without the "-debug all" command anyway.
Obviously, using the "-debug all" flag isn't exactly doing wonders to the speed of my program so, if possible, I'd like to know what exactly it does so that I can narrow down the source of the bug. Or, if I can't get rid of the bug then at least find the one flag necessary to get the code moving again with the minimum amount of slow down.
I'm running Leopard 10.5.6 and my version of iFort is 10.1.017. My current machine is a Unibody MacBook Pro 2.53GHz Core 2 Duo with 4GB RAM. I'm using the 64 bit version of iFort.
Just in case what you're actually asking is "What does -debug all give me that -debug doesn't?" the answer is "Nothing".
"-debug all" was recognized by the ifort driver because CVF had it, andrecognizingCVF switcheshelps transitioning make files. Yes, CVF is windows, but many switches added to ifort to support CVF were also enabled on Linux/MacOS.
Anyway, under-the-covers,"-debug all"does the same thing as just saying "-debug", or "-g", and that was discussed by previous posts.
- Lorri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you everyone for all your help, its really appreciated. I understand now what the debug flag does. Apologies if it was a stupid question, I'm very new to debugging these kind of problems and I'm not well versed in the iFort compiler yet. :)
Phil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - intel@hellary.co.uk
Thank you everyone for all your help, its really appreciated. I understand now what the debug flag does. Apologies if it was a stupid question, I'm very new to debugging these kind of problems and I'm not well versed in the iFort compiler yet. :)
Phil
Phil,
All questions are welcome here, even new user questions. That's why we're here. The only silly question is the one that is unasked.
Keep 'em coming.
ron
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