Yesterday I asked about the availability of any public domain FORTRAN
compiler. I received several responses. Most of the people suggested
"f2c" available from 'research.att.com' (login netlib). Thanks to
every one for a quick response. (I have NOT yet received my own email
which I sent yesterday.)
I have FTPed "f2c" but yet to install and test it. I received different
opinions about the performance of "f2c". Mark Maimone (firstname.lastname@example.org)
cautioned, "f2c + sunCC is typically significantly slower than f77
processed code". But according to email@example.com, "Rumor has it it's
Malcolm Strickland also mentioned --
There is a PD compiler in the works from free software foundation but
it wont available for some time.
Following people suggested "f2c". Thanks !!
Bill Bogstad (firstname.lastname@example.org)
email@example.com (Mark Maimone)
firstname.lastname@example.org (Mike Halderman)
David Fetrow <email@example.com>
firstname.lastname@example.org (Barry Shein)
Peter Kaldis <peter@Civil.Concordia.CA>
bernards@ECN.NL (Marcel Bernards)
Malcolm Strickland (email@example.com)
firstname.lastname@example.org (Bruce Oneel )
============ My original question ===============
Hi Sun Managers,
Subject line says it all. I am looking for a public domain FORTRAN
compiler (something like 'gcc') to run on a SPARCstation 2 (OS 4.1.2).
We have a comercial software (LINDO - a software to solve linear
programs) which is written and compiled in FORTRAN. With the executable
code of LINDO, we received a "routine library" too. There is a way to
link the C routines with the LINDO routines (in the library). But, it
needs some FORTRAN routines (during linking) to create the new
executable. We don't have a FORTRAN compilers on any of our
SPARCstations and we don't want to buy one (can't afford!!) just for
this purpose. Is there any other way to create the executable ? Will a
public domain FORTRAN compiler, if exists, will work ?
Thanks. I will summarize.
============== Details about f2c ===============
From: email@example.com (Mark Maimone)
Subject: Re: Fortran to C translator
Keywords: fortran, C, translator, f2c
Date: 13 Sep 90 01:43:30 GMT
Organization: Carnegie-Mellon University, CS/RI
Since there have been several requests for a Fortran to C translator
in the past week, I'm reposting the announcement about f2c. The short
answer is you can get f2c by anonymous-ftp from research.att.com in
Source for f2c, a Fortran 77 to C translator jointly developed by
folks from Bell Labs, Bellcore, and Carnegie Mellon, is now freely
F2c was derived from the original UNIX operating system's f77(1),
and the generated C follows f77's calling conventions; on some machines, the
resulting object files are interchangeable with (and behave
indistinguishably from) objects compiled by f77. The main "advantage" of
f2c is that it converts ANSI standard Fortran 77 into C without manual
intervention, at least when invoked by a suitable script or makefile (that
may need to exercise an f2c option to ensure that COMMON blocks are defined
just once). The main "problems" are that f2c does no code restructuring
(e.g., gotos are preserved) and that Fortran I/O gets converted into a bunch
of calls; thus the translated C code doesn't look too pretty, and in general
one would need to maintain the Fortran rather than its translation into C.
[F2c is not meant to displace the services of commercial vendors whose
business is to convert Fortran into maintainable C.]
There is a plethora of options, many of which exist to support
different compilation environments for the translated C (e.g., ANSI C or C++
compatability, different type sizes, separate files for COMMON blocks to
appease "smart" linkers). So far f2c (and f2c-generated source) has
compiled successfully on many machines: Sun, Vax, IBMRT, Apollo, SGI, MIPS,
and Cray to name a few.
F2c has been under test by the net community for over a year
and has been verified on the NBS tests, several large math libraries,
floating point tests, even code for laying cable on the ocean floor!
To find out about f2c, send the following E-mail message to netlib
(firstname.lastname@example.org or research!netlib):
send index from f2c
Your message will be answered automatically (by a program -- see CACM vol.
30 #5 (May, 1987), pp. 403-407). You will receive a reply explaining how to
automatically acquire f2c source (about 600K), f2c library source (130K),
and supporting info (man page, etc). Or you can anonymous-FTP to
research.att.com and look in directory dist/f2c at these files:
all.Z -- 250K compressed shar file for f2c
f2c.ps.Z -- 24 page tech report describing f2c
index -- general info about files
libf77.Z, libi77.Z -- compressed shar files for libraries
****************************** DISCLAIMER ******************************
Careful! Anything free comes with no guarantee.
Mark Maimone phone: (412) 268 - 7698
Carnegie Mellon Computer Science email: email@example.com
f2c + sunCC is typically significantly slower than f77 processed code.
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:39 CDT