Home > Archive > Fortran > June 2005 > Some misc fortran advice please - cranking warnings, interpreting an error, lint, Tot
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Some misc fortran advice please - cranking warnings, interpreting an error, lint, Tot
|
|
| Dan Stromberg 2005-06-07, 3:57 am |
|
I'm a sy min, working with a programmer who's having some fortran
troubles. I used to teach fortran, but I haven't used it in years, so I'm
much more current with C, bash and python. Anyway...
The programmer has inherited a body of fortran code. Apparently most of
it was written for Fortran 77, but some of it is written for Fortran 90,
with the two linked into a single executable.
He's getting some odd runtime errors, like a function that executes a
print *, but upon executing a return statement, never makes it to the
print * after the corresponding call.
I've been suggesting that to take care of his, he crank up the compiler
warning levels as high as they'll go, and hope that the error causing this
strangeness (which I've been presuming is due to the language runtime
getting corrupted somehow by one or more references, either reading or
writing, from or to undefined memory regions) is one of the errors
detected by the compiler or runtime system.
He's using xlf_r and xlf90_r on an AIX 5.1 ML 4 system.
One error that's been particularly puzzling to us is:
The following symbols are in error:
Symbol Hash Inpndx TY CL Source-File(Object-File) OR Import-File{Shared-object}
------------------------- ---------------------- ------- -- -- ------------------------------------------------------
.regrid_4x5_t42 Fort 26ACF12C 3BBCB187 [64] LD PR regrid_4x5_T42.f(regrid_4x5_T42.o)
** References Without Matching Definitions **
Fort 26ACF12C 20202020 [735] ER PR (pinpt.o)
[720] ER PR (pinit.o)
Fort 92E70B55 20202020 [1323] ER PR (pread.o)
....because we've checked and double checked and triple checked the
relevant types on the regrid_4x5_T42 definition and calls, and they all
seem to match up. Is this error not pointing to a call() that isn't
passing the right types? And why would two things hash to the same
20202020? What are those numbers in square brackets (EG "[64]")? What's
that "PR" stuff about? And is there a way of coaxing the compiler into
telling us -its- perception (Ok, it's probably right) of the types
involved, rather than making us "play computer"?
Also, is there free lint-like utility for fortran 77 and/or fortran 90?
Anyone out there familiar with the benefits of "TotalView", which appears
to be a debugger that handles fortran code?
Thanks!
| |
|
|
|
|
|