- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i am using intel fortran compiler and experience a weird behaviour
i have a subroutine writing data to netcdf called from the main program and causing a library error.
when debugging i saw that the program first jumps to line 411 of the source code and only then to the first executable line of the code at 96 (the source is attached).
when looking at the assembler code i see the same thing.
i have a subroutine writing data to netcdf called from the main program and causing a library error.
when debugging i saw that the program first jumps to line 411 of the source code and only then to the first executable line of the code at 96 (the source is attached).
when looking at the assembler code i see the same thing.
the netcdf error sais the unlimited dimension is defined more then once and that is waht is done in line 411
compiler flags were:
-g -C -traceback -check all -debug all -w95 -save -cpp -w90 -w95 -w -vec-report1 -r8 -i4 -heap-arrays
thanks alot to anyone who can help
what is going on?
-g -C -traceback -check all -debug all -w95 -save -cpp -w90 -w95 -w -vec-report1 -r8 -i4 -heap-arrays
thanks alot to anyone who can help
what is going on?
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you want to do symbolic debugging, and you want to have the line-number tightly associated with the instruction-pointer, make sure that no explicit optimization flags are used, either in the command line or in the file ifort.cfg. The exception to this recommendation is when you have a bug that appears only when optimizations are on.
If optimizations are on, the compiler applies various transformations to the source code, which decrease the correlation between line-number and instruction-pointer. Some statements may be removed by the optimizer; entire functions may be inlined. These transformations make it harder to debug code, especially because you know neither where the transformations are located nor what they are.
If optimizations are on, the compiler applies various transformations to the source code, which decrease the correlation between line-number and instruction-pointer. Some statements may be removed by the optimizer; entire functions may be inlined. These transformations make it harder to debug code, especially because you know neither where the transformations are located nor what they are.
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please attach the source file rather than pasting it. See link below.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sorry about the mess couldnt find how to attach
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you provide a short program that calls this subroutine and demonstrates the problem? What exactly is the problem? The jumping around while debugging is common and not indicative of an error - it has to do with the way source lines are associated with individual instructions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you want to do symbolic debugging, and you want to have the line-number tightly associated with the instruction-pointer, make sure that no explicit optimization flags are used, either in the command line or in the file ifort.cfg. The exception to this recommendation is when you have a bug that appears only when optimizations are on.
If optimizations are on, the compiler applies various transformations to the source code, which decrease the correlation between line-number and instruction-pointer. Some statements may be removed by the optimizer; entire functions may be inlined. These transformations make it harder to debug code, especially because you know neither where the transformations are located nor what they are.
If optimizations are on, the compiler applies various transformations to the source code, which decrease the correlation between line-number and instruction-pointer. Some statements may be removed by the optimizer; entire functions may be inlined. These transformations make it harder to debug code, especially because you know neither where the transformations are located nor what they are.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think i got it figured out.
In this subroutine there are some variables used which should be first allocate, if i enter the subroutine with those variables allocated there is no problem.
thanks for your help

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