|f77 on SUN vs. on HPRISC'S email@example.com (1994-12-03)|
|Re: f77 on SUN vs. on HPRISC'S firstname.lastname@example.org (1994-12-05)|
|Re: f77 on Sun vs. on HPRISC's email@example.com (1994-12-07)|
|Re: f77 on SUN vs. on HPRISC'S firstname.lastname@example.org (1994-12-14)|
|Re: f77 on Sun vs. on HPRISC's email@example.com (1994-12-16)|
|Re: f77 on Sun vs. on HPRISC's firstname.lastname@example.org (1994-12-21)|
|From:||email@example.com (Przemek Klosowski)|
|Organization:||U. of Maryland/NIST|
|Date:||Mon, 5 Dec 1994 17:36:48 GMT|
firstname.lastname@example.org (Milind Khire) writes:
I have a FORTRAN code originally written for VAX-VMS, but it is
compatible with SUN UNIX. But if I try to run it on HPRISC's it compiles
fine but gives me completely garbage numbers in output. If anyone
I don't know the exact differences, but few Fortran-specific gotchas are
worth looking for:
- static vs. dynamic local variables (i.e. in F77 you need to
to explicitly SAVE variables to preserve their value between calls
- ditto, for the values of uninitialized variables (zero for static
locals, garbage for dynamic locals)
- alignment of variables in common blocks (i.e. in "common /c/ a(10),b(10)"
it may or may not hold that a(11) = b(1) ).
Unfortunately, dusty-deck VAX Fortran code tend to make these assumptions.
My favorite way of debugging such code is to run the same program under
debugger in both environment, and look where discrepancies start to show up.
Some compilers have various switches that make them more conformant
to VAX Fortran quirks: for example -static or -vms.
przemek klosowski (email@example.com)
Reactor Division (bldg. 235), E111
National Institute of Standards and Technology
Gaithersburg, MD 20899, USA
(301) 975 6249
Return to the
Search the comp.compilers archives again.