Fortran Localizing a Fortran Error - Get the Position of the Error

Click For Summary
The discussion revolves around troubleshooting a Fortran error related to a floating divide by zero. The user is trying to identify the exact location of the error in their code, which is complicated by the fact that they are modifying existing code. Suggestions include using a debugger like gdb to analyze the stack state, implementing print statements (referred to as "flags") to trace the execution flow, and isolating potential math operations that could lead to division by zero. The user has made progress by identifying a subroutine but remains uncertain about where the zero division occurs. The conversation emphasizes the importance of systematically narrowing down the source of the error through debugging techniques.
  • #31
The problem disappeared when I switched compiler from iFort to g77!
Many thanks for your help anyway!
 
Technology news on Phys.org
  • #32
The mighty ifort "falls" to g77 ... oh boy :-p .
 
  • #33
Putting on someone else's shoes is almost never a good idea. Unless they fit, that is.

That must have been a pretty painful fit, to be worth 3 pages of frantic posts.

Glad you got that sorted out. :biggrin:
 
Last edited:
  • #34
Thing is, I didn't chose compiler to begin with. There's a ranking list built into the code such that ifort is automatically chosen first. Only if there's no ifort installed it goes on to the next compiler on the list...
When I took away ifort from PATH, g77 was chosen and everything (well, at least this specific problem) worked out well.
 

Similar threads

  • · Replies 17 ·
Replies
17
Views
7K
  • · Replies 5 ·
Replies
5
Views
5K
Replies
8
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
Replies
7
Views
1K
  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 2 ·
Replies
2
Views
8K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 6 ·
Replies
6
Views
3K