What is the Best Fortran Compiler for OSX?

  • Context: Fortran 
  • Thread starter Thread starter Gavin Harper
  • Start date Start date
  • Tags Tags
    Compiler Fortran
Click For Summary

Discussion Overview

The discussion revolves around the best Fortran compiler options for OSX, particularly focusing on the installation of gfortran without using MacPorts. Participants explore various compilers, their installation processes, and compatibility with OSX, especially in the context of using Xcode and transitioning from Linux.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant seeks guidance on installing gfortran on OSX without MacPorts, expressing a preference for a more native package management approach.
  • Another participant suggests using Apple's Xcode Tools to install gfortran packages, referencing a specific source.
  • Concerns are raised about the quality of hpc builds of gfortran, with requests for verification of these claims.
  • Some participants discuss their experiences with MacPorts and Fink, highlighting the advantages of these package management systems for obtaining open-source tools.
  • There are mentions of potential incompatibilities between gfortran builds and Xcode, although specifics are not provided.
  • One participant shares their experience of using gfortran from the command line and expresses satisfaction if it works with the stock gcc in OSX Lion.
  • Another participant mentions using Ifort and questions its cost, noting that it may be free for Linux and not very expensive for OSX.
  • There is a query about specific binaries available from a research site for OSX.

Areas of Agreement / Disagreement

Participants express differing opinions on the use of MacPorts and Fink, with some advocating for their use while others prefer alternative methods. Concerns about the quality of certain gfortran builds remain unresolved, and there is no consensus on the best compiler for OSX.

Contextual Notes

Some participants express uncertainty regarding the compatibility of gfortran with Xcode and the reliability of hpc builds. The discussion reflects a variety of experiences and preferences in compiler usage and installation methods.

Who May Find This Useful

This discussion may be useful for users transitioning from Linux to OSX who are looking for Fortran compiler options, as well as those interested in package management systems on OSX.

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

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
6
Views
3K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 20 ·
Replies
20
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 2 ·
Replies
2
Views
8K