|[Photran] Debugging fortran program which uses openmp [message #1516599]
||Fri, 19 December 2014 00:53
| Bram Mising name
Registered: December 2009
I'm somewhat of a novice to Eclipse in combination with compiled languages. I ran into a problem and I'd be very grateful if I could get some feedback.
I was trying to delve into a large existing Fortran project. Personally I find it the easiest to learn a program by walking through it step by step using a debugger. This would be a good refresher on Fortran as well, as I've gotten a bit rusty. So I managed to setup Photran within Eclipse and I figured out how to debug some simple test programs that I wrote. (I really love that the new Photran debugging detects shape of allocatable arrays now by the way)
So now I was planning to start the real work, the large existing Fortran project. I fire up GDB and try to walk through the code step by step, but no variables appear anymore. This is probably because the code uses openmp. A lot of threads are fired up simultaneously. When I run the code and click the yellow "suspend" button in the debugging view, one specific thread is highlighted and some variables with values are visible. When I from that point on try to move forward one instruction at a time (using the "step over" button for instance), no variables are visible anymore again.
Is this because the code is parallel ? Should I be using something else than GDB to walk through the code instruction by instruction to inspect what is going on ? Am I basically trying to use the wrong tool ?
hopefully someone can clarify this to me. I've been googling on word combinations including photran and GDB etc, but I couldn't really find an answer to the question I posed here.
[Updated on: Fri, 19 December 2014 00:54]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02771 seconds