Fortran What is the Best Fortran Compiler for OSX?

  • Thread starter Thread starter Gavin Harper
  • Start date Start date
  • Tags Tags
    Compiler Fortran
AI Thread Summary
The discussion centers on transitioning from Linux to macOS and the challenges of installing gfortran without using MacPorts. Users are exploring alternative compilers and package management options, expressing a desire for a more native installation method. There are mixed opinions about using MacPorts and Fink, with some users advocating for their benefits in providing Linux-like functionality on macOS. Concerns are raised about the quality of HPC builds of gfortran, particularly regarding compatibility with Xcode, although some users report successful installations and functionality through the command line. The conversation also touches on the use of Intel's ifort compiler, noting its potential cost and availability for macOS. Overall, users seek reliable methods to integrate Fortran into their development workflow while minimizing configuration time.
Gavin Harper
Messages
16
Reaction score
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
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.
 
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.
 
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.
 
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?
 
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).
 
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++).
 
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...
 

Similar threads

Back
Top