Fortan Compiler for Apple Silicon (M1, M2, M3)
Hello all,
are there any recommended Fortan Compiler for Apple Silicon (M1, M2, M3)?
Thank you.
You can make a difference in the Apple Support Community!
When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.
When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.
Hello all,
are there any recommended Fortan Compiler for Apple Silicon (M1, M2, M3)?
Thank you.
GNU Fortran (GFortran) is excellent on Apple Silicon. Easily installed via Homebrew (brew.sh) at the command line. I do all of my Fortran development and testing on Apple Silicon, before moving to Linux AMD and Intel clusters. It follows all the same/usual standards, is kept updated with the current version, and the performance per core is brilliant.
GNU Fortran (GFortran) is excellent on Apple Silicon. Easily installed via Homebrew (brew.sh) at the command line. I do all of my Fortran development and testing on Apple Silicon, before moving to Linux AMD and Intel clusters. It follows all the same/usual standards, is kept updated with the current version, and the performance per core is brilliant.
I have been using the llvm compiler on a M2 MacBook Pro with some success. Results are different than the same scientific code on other platforms/compilers though. I have not been able to figure that out. I could not get NAG fortran to work very well. Another member of our group successfully compiled our code using NAG on an Intel-based mac but I could not do so on the ARM M2 chip
That sounds like a great use for an old Apple II.
There is a trial NAG Fortran compiler for Apple Silicon (ARM) Macs. It is not free, I don't use it, and you will need to talk with NAG about any limitations it may have on M1/2/3 Macs and associated library compatibility. It is my understanding that GNU is not targeting their Fortran development for Apple Silicon Macs.
Thank you for the excellent information regarding GNU Fortran compiling platform. I'm a newbie at code writing and compiling and I apologize for asking this, but where do I get the GNU Fortran compiling binaries? I am using Apple M1 and M2 Silicon and am really in need of a Fortran compiler to compile the molecular dynamics software code, AMBER. Any information you can provide to help would be very thankfully received.
Your order of installation:
There is no such thing as getting just the GNU fortran compiler. You must install the monster GNU C/C++ build and all of its libraries in order to get gfortran.
After you have installed homebrew, and while still in the Terminal, you want to do the following:
brew outdated
brew upgrade (if anything is shown as needing upgraded from the outdated command)
brew install gfortran
brew cleanup
Your order of installation:
There is no such thing as getting just the GNU fortran compiler. You must install the monster GNU C/C++ build and all of its libraries in order to get gfortran. Even on M1/M2 Macs, that will take awhile to build.
After you have installed homebrew, and while still in the Terminal, you want to do the following:
brew outdated
brew upgrade (if anything is shown as needing upgraded from the outdated command)
brew install gfortran
brew cleanup
Thank you.
Then I can no longer use Apple Silicon Macs (M1, M2, M3) for scientific calculations / work.
So there are only two options for me, either I switch to another operating system, which I don't really want to do, but apparently have to, or I go back to using Apple FORTRAN on Apple II.
And there is the work-in-progress Flang project (Fortran 2018) under the auspices of LLVM which in their own words, is "not ready for production usage", but is in active development. It is free and has an Apache license. It is written in contemporary C++ and takes Fortran code to an executable.
Having not written any production Fortran code in decades, I have not built/installed Flang myself.
> And there is the work-in-progress Flang project (Fortran 2018)...
There is also a "Classic Flang" compiler based on an older version of pgfortran. It's eventually supposed to be replaced by the Fortran 2018 Flang, mentioned by VikingOSX.
I haven't used any of them, I'm just trying to be helpful :-)
these days you can proably get an apple II emulator for most macOS or windows or linux operating systems
Many thanks to all of you.
To use Fortran I unfortunately have to use a different OS-platform again.
Thank you.
Thank you so much for the information about homebrew and GNU. I appreciate your help with that issue.
Viking, where will I acquire the homebrew package?
Fortan Compiler for Apple Silicon (M1, M2, M3)