[comp.os.vms] Coverting a package written in VMS Fortran to Unix

russell@imtec.co.uk (Russell Brown) (09/18/87)

Hello,

The company Gods have decided that we are going to be converting a whole bunch
of software written in Fortran under VMS to run under Unix (well that's the
plan :-)

I understand that the VMS stuff uses 'Virtual arrays on disk' - arrays that are
mapped onto disk rather than residing in memory (excuse my ignorance but if I
knew what I was talking about I wouldn't be posting here! :-)

We're not sure whether a conversion from VMS Fortran to F77 is the best way to
go or whether a conversion to 'C' is the best route.

Anyone out there in net.world got any pointers on doing this? What are the
pitfalls? How different are F77 and the VMS dialect? What are the F to C
converters like? 

Many thanks in advance.

(usual bit about summarizing if enough people interested).

-- 
 ------------------------------------------------------------------------
| Russell Brown                      | Voice: +44 733 234433             |
| Imtec Computers Ltd.               | UUCP: ...!mcvax!ukc!{inset,stc}!  |
| 18 Manasty Road, Orton Southgate   |                     imtec!russell |
| Peterborough, Cambs, PE2 0UP, UK   | EMAIL: russell@imtec.co.uk        |
 ------------------------------------------------------------------------

allen@pyr.gatech.EDU (Don Deal) (09/23/87)

I tried to mail this as a response but got bounced due to unknown host

Russell,

> I understand that the VMS stuff uses 'Virtual arrays on disk' - arrays that are
> mapped onto disk rather than residing in memory (excuse my ignorance but if I
> knew what I was talking about I wouldn't be posting here! :-)

What you are refering to is create-and-map-section usages.  All memory is
mapped to a file.  Normally, the read-only part of the program is mapped to
the .exe file and the read/write is mapped to the system page file.

Mapping the arrays into another file is a quick way to create a database
in binary mode.  All data in memory is updated to disk at program termination
or may be requested via a system call.  Most UNIX systems do not provide this
type of mechanism.  Your best alternative is to just use normal virtual memory
for the arrays and have a routine which will copy the arrays from memory
to disk when updates are required.  While much slower than the VMS method,
it should accomplish the same thing.

> 
> We're not sure whether a conversion from VMS Fortran to F77 is the best way to
> go or whether a conversion to 'C' is the best route.
> 
> Anyone out there in net.world got any pointers on doing this? What are the
> pitfalls? How different are F77 and the VMS dialect? What are the F to C
> converters like? 


I would forget the fortran to c converters.  Most of them produce C code that
still requires lots of changes before it will run.  The answer to your
question depends on how many VMS-ONLY fortran extensions have been used.

If the majority of the fortran is ANSI then you should probably stick to
fortran.

We have ported a software product written on the Vax that contains over
400,000 lines of fortran and (after porting) 30,000 lines of C.  Rather
than convert all of your source to C, consider converting those parts
of the program that are very VMS dependent into C and leaving the
vanilla fortran alone.  On all of the UNIX systems I am familure with,
you can mix C and Fortran object code in a single program with no problems.

To find out where you are going to have problems, the VMS fortran compiler
has a switch that flags all non-ANSI usages.

I have an extensive list of problems we encountered converting from a VMS
environment to a UNIX environment that I can forward if need more information.

P. Allen Jensen

(return mail to jensen@strudl.gatech.edu)

-- 
P. Allen Jensen
Department of Civil Engineering - Georgia Institute of Technology
Atlanta Georgia, 30332-0355    (gatech!gitpyr!allen)
USA, Earth

fritz@utastro.UUCP (Fritz Benedict) (09/23/87)

I too could not reach Mr. Jensen. Could you please post this list of problems?
Many thanks,

fritz

-- 
Fritz Benedict  (512)471-3448
uucp: {allegra,ihnp4}!{noao,ut-sally}!astro.AS.UTEXAS.EDU!fritz
arpa: fritz@ut-ngp.arpa
snail: Astronomy, U of Texas, Austin, TX  78712