Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need easy start with FORTRAN on Mac OS X

Status
Not open for further replies.

pjansson

Technical User
Sep 1, 2013
6
US
I am looking for a smooth, clean, and well documented way to get FORTRAN up and running on my Mac, which is running OS 10.6. I've done a ton of FORTRAN, starting in 1962, on a dozen different systems, but did my last programming circa 1995 in MPW Language Systems FORTRAN on the Mac. I have a more recent ABSOFT compiler, but it doesn't run on my Intel Mac under my present OS. I think I don't need fancy developer tools, just a command-line interface and good documentation on file handling, compiler, linker, etc. I volunteer my time in physics and engineering as adjunct faculty at a couple of universities and would need to do it at minimal expense. Any guidance you can provide would be much appreciated.
 
If it is programs from 1962 then it would be better to stick to gfortran since g95 doesn't do F77. It can only handle code from f95 onwards.
 
I don't think it is true that g95 can't handle f77...I bet if you leave the extension as .f, g95 interprets it as f77 and if you set extension to f90 or f95, then, g95 interprets it as f90 code.

Having said that, 5 years ago, I chose g95 over gcc fortran because it was in better shape...looking at things today, I would choose gfortran over g95...just the state of things.

It seems g95 is stagnating a bit. Also, parallel processing seems to require re-writing; it does not support OpenMP.

gfortran seemed to have gotten their ducks in a row and have released a few good versions, since; also, it actually produces faster running codes than g95. Parallelizing a program is very easy as gfortran supports OpenMP and does not require a re-write to achieve parallelization.

 
Some years ago I first installed (on Windows) g77 with MSYS-MinGW, then g95 and then gfortran. Now I have them all 3 for purpose of this forum :):
Code:
$ g77 --version
GNU Fortran (GCC) 3.4.5 (mingw-vista special r3)
Copyright (C) 2004 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING
or type the command `info -f g77 Copying'.

$ g95 --version
G95 (GCC 4.0.4 (g95 0.92!) Oct 14 2008)
Copyright (C) 2002-2005 Free Software Foundation, Inc.

G95 comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of G95
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

$ gfortran --version
GNU Fortran (GCC) 4.4.0 20080603 (experimental) [trunk revision 136333]
Copyright (C) 2008 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

I thing, OP could install on Mac both current Fortran compilers - g95 and gfortran - to evaluate them and see what would be better for his purpose.
 
Thank you all very much for your helpful suggestions. I have gotten gfortran 4.6.2 running via cut-and-try in Mac OS 10.6. Now its time to learn some basics about compiler options and unix. No doubt I'll be back!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top