I am new to Fortran and am wondering if their are any compilers for
Mac OS X? I know specifics on my intended use would be wanted by any
answerers, but I have none. Basically I've read that it still beats
the other languages for number crunching, which caught my interest.
Therefore I'm just looking for a compiler so I can play around with
Fortran to see if I like the language. My previous experiences with
programming are Java, C, and a little assembly. I've done some
examination of the syntax and I like what I see. However, one can't
know if they really like using a language until they, well...use it.
Any help would be appreciated. Thank you.
There are several commercial compilers. NAG, Absoft and Intel are the
usual suspects. This crowd offers their product for Windows and Linux as well.
GNU comes in Gfortran and G95 flavors for multiple platforms.
If you are new to Fortran you will particularly interested in debugging.
NAG has the best as they are the only ones to provide full undefined variable
checking. The real McCoy of run time checking and not the check box imitator
of reporting the absence of any initialization. All provide subscript checking.
The standard Mac development environment is XCode, which comes with the
standard upgrade disks, and is available at their site. It is gcc 4.2
based. Because Apple disagrees with some of the provisions in the GPL
licence that applies to later versions of gcc, they have no plans to
upgrade to later versions of gcc. It does not come with a version of
fortran, but older versions of gfortran can be installed to work with
that version. I suspect the same can be said for g95, and that the
commerical compilers will automatically work. Newer versions of
gfortran, and probably g95, require a separate installation of a
comparable version of gcc. Later versions of gcc, which come with
gfortran, are available through MacPorts, http://www.macports.org/.
--
Bill Clodius
los the lost and net the pet to email
> Newer versions of
> gfortran, and probably g95, require a separate installation of a
> comparable version of gcc. Later versions of gcc, which come with
> gfortran, are available through MacPorts, http://www.macports.org/.
I have the latest version of g95 installed on this OS X 10.6 system. I
don't recall having installed anything special for it other than the
regular Xcode stuff. I certainly didn't do a separate gcc install; it is
a new enough system (27" iMac, ordered as a "birthday present" for
myself as that's the day they came out) that I'd have remembered
something like that.
Might be that the g95 install included whatever gcc stuff was needed.
Sort of looks like that, in fact. But I didn't dig in detail. I just
note that I did not need to separately install anything else (except for
the normal XCode stuff.)
--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain
> Later versions of gcc, which come with
> gfortran, are available through MacPorts, http://www.macports.org/.
You can find some more information about fortran, and scientific
programming in general, on MacOSX at http://hpc.sourceforge.net.
I use gfortran on MacOSX installed through the fink package manager.
More information can be found at http://www.finkproject.org. The latest
version of gfortran that can be installed (right now) is with the command
fink install gcc44
Simple as that. fink keeps track of all the necessary libraries, shared
libraries, and so on.
The intel compiler ifort on MacOSX might be free for your purposes - I
have not kept up with that, so I don't know the details. The ABSOFT
fortran compiler is also available for MacOSX, but it is commercial.
$.02 -Ron Shepard
> <snip>
>
> Might be that the g95 install included whatever gcc stuff was needed.
> Sort of looks like that, in fact. But I didn't dig in detail. I just
> note that I did not need to separately install anything else (except for
> the normal XCode stuff.)
So I was wrong about g95. Good I'll keep that in mind.
I don't know anyone who really likes Fortran as a language -- what we like
is the vast body of existing code that runs will enough so we can get
things done rather than spending all our time raising money for ever
faster computers.
As others have noted, Apple has objections to gcc licenses. The latest
version of Xcode has llvm-gcc hidden in the Devloper tree, but they don't
provide the fortran front-end. There is a project to use gcc-4.5 as an
LLVM front-end called DragonEgg which supports gfortran. I suspect this
won't be endorsed by either Apple or FSF. It might be the worst of both
worlds or better than either camp's own product.
There are a number of fortran compiler binaries available from various web
sites, but the quality is very uneven. My programs tend to go faster when
compiled as 64-bit binaries, but not all compiler binaries support
generating 64-bit code, and there have been annoying differences in the
32-bit and 64-bit Fortran runtimes. Those differences (at least the ones
that were bothering me) seem to have gone away with gcc45, so at present
I'm using the Macports gcc45 with gfortran.
--
George White <aa...@chebucto.ns.ca> <gn...@acm.org>
189 Parklea Dr., Head of St. Margarets Bay, Nova Scotia B3Z 2G6
> I don't know anyone who really likes Fortran as a language
Then you don't know me, or quite a lot of other people who I know. Guess
we run in different circles.
> I don't know anyone who really likes Fortran as a language [...]
I think what you say might be true for f77 and earlier. Those language
versions were mostly tolerated in order to get things done. But I think
f90 and later are qualitatively different in that respect. I actually
enjoy programming with "modern" fortran.
$.02 -Ron Shepard
Agreed, Fortran is an awful language. Trouble is, everything else is either
worse, or much worse.
--
Qolin
Email: my qname at domain dot com
Domain: qomputing
I only have one simple rule to decide on that: If curly brackets are
not integral part of the language's syntax, then I like it ;)
I like it, but you don't know me very well. ;-)
I can code in Fortran more effortlessly and with fewer errors than in the other
languages I know (e.g. C, Java, Delphi). It isn't the language for every
purpose (none is), but it works well for my purposes.