🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.fortran
Article #4522

Re: compiling FORTRAN IV on Unix f77

#4522
From: TIM SHOPPA
Date: Wed, 27 Jan 1993 19:45
44 lines
2935 bytes
In article <1k6e6cINNmqo@bigboote.WPI.EDU>, bugsy@yoyodyne.WPI.EDU (Christopher Sean Moran) writes...
>Help me... I have a program called VORLAX which I need to compile.
>It was written and compiled originally on CDC FORTRAN IV.  All
>I have access to is Unix f77.  I have tried to compile it, but
>its a no go.  One problem is the first line
> 
>PROGRAM VORLAX(INPUT,OUTPUT, etc)
> 
>the compiler doesnt like the parenthesis after the program 
>declaration.  Past that there are no other problems.
> 
>I do get an executable after compiling if I take the stuff
>in the parenthesis out. But UNIX dumps my core every time
>I run the program.  Can anyone help me?
	Well, there is no problem with removing the stuff in the
parentheses.  Just be aware that it is a sign that the original Fortran
very likely didn't use OPEN statements to open the files used.  Most
UNIX Fortrans are a little more picky about OPENs being required.
	Core Dumps?  Well, this again is the Unix compiler being a little
more picky.  99% of the time when I have this problem (porting VAX Fortran
to a HP-UX platform) it is because of a "type mismatch" in function
or subroutine parameter passing.  In particular, on a VAX you can often
get away with passing a REAL*4 to a subroutine expecting a REAL*8 and
actually have a working program.  But it will do a core-dump on HP-UX just
about every time.  Another thing is that passing an integer "0" when a
subroutine expects a floating "0.0" (or "0d0") will usually work on
a VAX but also does core dumps on HP-UX.  Lots of old code did things like
this and often worked, even though they technically are bugs in the
source code!
	An important thing to note is that most NON-UNIX FORTRANS ASSUME
STATIC VARIABLE STORAGE IN SUBROUTINES, while UNIX FORTRANS USUALLY
ASSUME DYNAMIC STORAGE.  Check the manual for your compiler to see if you
can set it to default to static storage with a compilation switch.  The
alternative is to put a STATIC statement at the beginning of every
function or subroutine.
	A useful package for finding things like this is "FLINT", which
unfortunately is not (as far as I know) a public-domain program.  It's like
C's "lint", but instead for Fortran.  Does anyone know of a similar
product which *is* public-domain?


				Good luck!

				Tim (shoppa@erin.caltech.edu)
Technical Details
Message-ID: <27JAN199311453903@almach.caltech.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!amdahl!rtech!pacbell.com!sgiblab!spool.mu.edu!agate!ames!elroy.jpl.nasa.gov!nntp-server.caltech.edu!almach.caltech.edu!shoppa
References: <1k6e6cINNmqo@bigboote.WPI.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!amdahl!rtech!pacbell.com!sgiblab!spool.mu.edu!agate!ames!elroy.jpl.nasa.gov!nntp-server.caltech.edu!almach.caltech.edu!shoppa
From: shoppa@almach.caltech.edu (TIM SHOPPA)
Newsgroups: comp.lang.fortran
Subject: Re: compiling FORTRAN IV on Unix f77
Date: 27 Jan 1993 11:45 PST
Organization: California Institute of Technology
Lines: 44
Distribution: world
Message-ID: <27JAN199311453903@almach.caltech.edu>
References: <1k6e6cINNmqo@bigboote.WPI.EDU>
NNTP-Posting-Host: almach.caltech.edu
News-Software: VAX/VMS VNEWS 1.41