Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fortran debugger 1

Status
Not open for further replies.

fortrannewcomer2005

Programmer
Dec 15, 2005
2
US
I am trying to modify a fortran program (3500 lines of code). I never programmed in fortran before, and I don't know whether there is a debugger like visual c++. There aren't many comments, or design documents to help understand the code. Would you recommend a fortran debugger?

Thanks,
 
What machine & op sys do you run the code on?

Codeview was supplied with the MS FORTRAN compiler.
 
zeitghost, thank you very much for replying to m yquestions. I run it on linux cluster (red hat). It can also be run in window, I will check out codeview.

I have another question on random number generator. Do you know any fortran 77 code that can generate real random numbers? The one in the program I am working on generate only pseudo random number, and every time I run it, it gives me the same series of numbers.
 
I don't think Codeview will run under Linux, that I may be wrong. It's an antique dos program...

Generating really random numbers is difficult... theses have been written on it... can't help you there, sorry.
 
There are lots of freeware pseudo-random numbers generators in INet. See, for example (or try your own search):
Common way to go (to generate different series): seed your generator with time/date values (it depends on generator used, see link above). In practice no such animal as real random number on deterministic computers. Moreover, you can't debug non-trivial algs with real random behaviour...
See also your compiler docs (search RAND function with its SEED companion).
 
On Linux, compile with -g and debug with gdb (GNU version of dbx). There is also a windowed version but I can't remember what it is called. Something like xxgdb but I'm not sure.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top