What is the Best Fortran Compiler for OSX?

In summary: If gfortran works from Terminal with the stock gcc in OSX Lion, I am satisfied and this thread may be marked as closed!
  • #1
Gavin Harper
17
0
I am making the switch to OSX from Linux and am unable to find any solid reference to the best way to get gfortran onto my mac without using MacPorts?

What (other?) compilers are people using on OSX? I will have xcode installed as I typically develop in C and am looking to target the new Mac Appstore.

Thanks
 
Technology news on Phys.org
  • #2
  • #3
jtbell said:
All you need is Apple's Xcode Tools in order to install these gfortran packages:

http://hpc.sourceforge.net/

Thank you!

I read from some sources that the hpc builds were not good, can you please verify this claim?

I should add, I will be using Lion.
 
  • #4
Gavin Harper said:
I am making the switch to OSX from Linux and am unable to find any solid reference to the best way to get gfortran onto my mac without using MacPorts?
I can't resist: What is wrong with MacPorts (or fink as an alternative)?

One of the nice things about linux is that the huge array of high quality open source tools that can be downloaded for free from a trustworthy site. MacPorts, fink, and a few other projects are attempts to provide that Linux-like functionality to us Mac owners.

You really should give one or both of MacPorts and fink a try.
 
  • #5
D H said:
I can't resist: What is wrong with MacPorts (or fink as an alternative)?

One of the nice things about linux is that the huge array of high quality open source tools that can be downloaded for free from a trustworthy site. MacPorts, fink, and a few other projects are attempts to provide that Linux-like functionality to us Mac owners.

You really should give one or both of MacPorts and fink a try.

Having experience with BSD and Gentoo, I am extremely familiar with Ports/Portage and like the system very much. However, I am trying ensure consistency on my system and avoid multiple package sources.

If it turns out that this is the best way to go, then of course, I will use MacPorts. I am just trying to find a more "native" (in lieu of a better word, neglecting that OSX is a BSD derivative) method of package management.

I have spent most of my time in the *NIX world dealing with compiling packages and tweaking for perfection. Now I am going OSX, I am typically trying to start using software instead of configuring it as my workload is much higher now I am entering my M.Sc studies and I have less time to play with potential inconsistencies.
 
  • #6
Gavin Harper said:
I read from some sources that the hpc builds were not good, can you please verify this claim?

I can't address this, unfortunately. I haven't used Fortran seriously in many years. I installed gfortran on my Mac out of curiosity, and compiled a few simple programs to check that it works at all.

What do they mean by the builds not being good?
 
  • #7
jtbell said:
I can't address this, unfortunately. I haven't used Fortran seriously in many years. I installed gfortran on my Mac out of curiosity, and compiled a few simple programs to check that it works at all.

What do they mean by the builds not being good?

Sadly the posts I read were in a passing search that I am unable to source at this moment. It was vague but mentioned something regarding incompatibilities with xcode (That said, Vim is my editor for most tasks).
 
  • #8
I don't use the Xcode IDE myself. I compile/link and run programs at the command line, edit code with a simple text editor, use makefiles as necessary, etc. As far as I know, gfortran works fine in that mode, but most of my recent experience is with C++ (gcc / g++).
 
  • #9
jtbell said:
I don't use the Xcode IDE myself. I compile/link and run programs at the command line, edit code with a simple text editor, use makefiles as necessary, etc. As far as I know, gfortran works fine in that mode, but most of my recent experience is with C++ (gcc / g++).

Most of my work for university requires little more than Vim, Terminal, GCC Suite and Make. Realistically, this is where most of my Fortran work will be done. I will, for my own personal purposes, only be using Xcode for App Store Development and as such, will be largely using C for the main engine and Obj-C for the UI. It would be nice to have Fortran available in Xcode to write certain numerical libraries and integrate them into the project but this is not a dealbreaker.

If gfortran works from Terminal with the stock gcc in OSX Lion, I am satisfied and this thread may be marked as closed!

Thank you
 
  • #10
I use Ifort, it works well and pretty easy to install if I remember correctly.
 
  • #11
Aren't the Intel compilers terribly expensive? Or am I not looking properly?
 
  • #12
Gavin Harper said:
Aren't the Intel compilers terribly expensive? Or am I not looking properly?
I understand the ifort is free for Linux, and also "not very expensive" for OSX if you know where to look...
 
  • #13

Similar threads

Replies
3
Views
1K
Replies
2
Views
2K
Replies
1
Views
2K
Replies
20
Views
3K
Replies
1
Views
3K
Replies
4
Views
4K
Replies
2
Views
7K
Back
Top