I have Mac OS X Mountain Lion (10.8), and XCode 4.4 installed, with the Command Line Tools package installed. Apple's Native Compilers As far as I can tell, the Xcode C / C / ObjC compilers use a fork of the GNU compiler collection, with llvm as a backend; the latter I figure enables compiling and optimising 'universal' binaries, for both. Read about 'Press Release - STMicroelectronics - PGI CUDA Fortran Now Available from The Portland Group' on element14.com. PORTLAND,ore,November 17,2009 - The Portland Group, a wholly-owned subsidiary of STMicroelectronics, today announced the general availability of its CUDA.
gfortran for Mac
DISCLAIMER: I provide this information here to aid my memory and in thehope that others will find it a useful resource based on my experiences of installing a gfortran compiler on Macs. I am not a computer scientist orFortran guru and, as such, am unlikely to be able to help you with Fortran code,compilation or runtime problems.
There are several options available for installing gfortran for Mac OS X,other than installing from source code.
GCC Wiki
I currently choose to use the relevant gfortran installer (.dmg) packagesprovided through the GCC Wiki (opens in new window). Note that the files areinstalled in /usr/local system directories which require the administratorpassword.
HPC
There are also various tar-files of gfortran distributions provided at the High PerformanceComputing web page. There are up-to-date distributions for some systems(only Mac OS X 10.7 (Lion), 10.8 (Mountain Lion), 10.9 (Mavericks) and 10.10(Yosemite) as of the last update of this page).
I recommend not to choose a package containing a version that is not a stable version accordingto the main GCC web site. Furthermore, for simplicity, I would recommendonly to install the relevant 'gfortran only' distributions.
The files are gzip'd tar-files which should be unpacked, for instance byusing the Terminal application, as follows:
sudo tar xvfz[tar-file] -C /
Note that the files are installed in /usr/local system directories whichrequire the administrator password.
The R Project
Previously, I had preferred to use the gfortran packages distributed inassociation with the R Project. These can be found in the 'Apple Xcode gcc-42add-ons' section of their Tools web page (opens in new window) or via the direct linksbelow. These gfortran packages and updates are specifically built to matchApple's own gcc builds. This does mean that the version is back at GCC 4.2,which is undoubtedly where it will stay since GCC changed their licensing andApple has stopped updating their GCC distribution with Xcode. Nonetheless, myexperience shows that this distribution is one that always works.
There are several packages relevant to particular Mac OS X and Xcodeinstallations. Run gcc-v to find out which Apple gcc build is currently installed as part of theXcode tools. Greenshot alternative for os x.
The files for builds 5564 and 5566 are gzip'd tar-files which should beunpacked, for instance by using the Terminal application, as follows:
sudo tar xvfz[tar-file] -C /
Note that the files are installed in /usr system directories which requirethe administrator password.
Packages for older OS X and Xcode versions are also available on the pagelinked to above.
Compatibility and uninstalling
Note that each of these distributions has different associated libraries andother installed files which may conflict with or be wholly or partiallyoverwritten by one another. It is therefore advisable to ensure that you haveonly one distribution installed at any one time.
It is straightforward to uninstall the GCC Wiki distribution and instructionsare provided on the detailed instructions web page. Simply run the command:
sudo rm -r/usr/local/gfortran /usr/local/bin/gfortran
It is slightly more difficult to uninstall the R Project or HPC distribution. HPC distributes gfortran as a tar-file. Therefore each file contained in thetar-file should be removed. The easiest way to do this is probably to run thecommand:
For sh/bash:
for file in $(tar tfz[tar-file]); do sudo rm -f /$file; done
For csh/tcsh:
foreach file ( `tar tfz[tar-file]` ) sudo rm -f /$file end
where [tar-file] is the package, for example gfortran-4.7-bin.tar.gz,gfortran-lion.tar.gz, gfortran-snwleo-intel-bin.tar.gz, etc. This will removeall files but not directories, which may contain other files that are not to be removed. To remove empty directories only, then run the command:
For sh/bash:
for file in $(tar tfz[tar-file]); do sudo rmdir -p /$file; done
For csh/tcsh:
foreach file ( `tar tfz[tar-file]` ) sudo rmdir -p /$file end
The R Project distribution is a .pkg file and this adds another level ofcomplication. To list the files that were installed from this package, oneneeds to locate the 'receipt', which is a .bom file. On my system (Mac OS X10.8, Mountain Lion) the file is located at/private/var/db/receipts/org.r-project.gcc-42.darwin11.pkg.bom (was/private/var/db/receipts/org.r-project.gnuFortran42.lion.usr.pkg.bom for Mac OSX 10.7, Lion; or /private/var/db/receipts/org.r-project.mac.tools.gfortran.bom for Mac OS X 10.6, Snow Leopard). To find the file, run a command such as:
sudo find / -iname'*fortran*.bom'
Once the appropriate file has been located, a list of files that have beeninstalled can be found by running the command:
lsbom -pF [bom-file]
Therefore, similarly to removing the HPC distribution, the files can beremoved by running commands such as:
Fortran Compiler For Mac Os X
Puffin browser for mac os x 10 11. For sh/bash:
for file in $(lsbom -pF[bom-file]); do sudo rm -f $file; done for file in $(lsbom -pF[bom-file]); do sudo rmdir -p $file; done
For csh/tcsh:
foreach file ( `lsbom-pF [bom-file]` ) sudo rm -f $file end foreach file ( `lsbom-pF [bom-file]` ) sudo rmdir -p $file end
Note that these commands should be run from the root directory (cd / first).
Last updated: 2018-04-18, MIT
This directory contains binaries for a base distribution and packages to run on Mac OS X (release 10.6 and above). Mac OS 8.6 to 9.2 (and Mac OS X 10.1) are no longer supported but you can find the last supported release of R for these systems (which is R 1.7.1) here. Releases for old Mac OS X systems (through Mac OS X 10.5) and PowerPC Macs can be found in the old directory.
Note: CRAN does not have Mac OS X systems and cannot check these binaries for viruses.Although we take precautions when assembling binaries, please use the normal precautions with downloaded executables.
Package binaries for R versions older than 3.2.0 are only available from the CRAN archive so users of such versions should adjust the CRAN mirror setting (https://cran-archive.r-project.org) accordingly.
R 4.0.2 'Taking Off Again' released on 2020/06/22
Please check the MD5 checksum of the downloaded image to ensure that it has not been tampered with or corrupted during the mirroring process. For example type
md5 R-4.0.2.pkg in the Terminal application to print the MD5 checksum for the R-4.0.2.pkg image. On Mac OS X 10.7 and later you can also validate the signature using pkgutil --check-signature R-4.0.2.pkg Latest release:
Subdirectories:
Free Fortran Compiler For Mac Os X
You may also want to read the R FAQ and R for Mac OS X FAQ. For discussion of Mac-related topics and reporting Mac-specific bugs, please use the R-SIG-Mac mailing list.
Information, tools and most recent daily builds of the R GUI, R-patched and R-devel can be found at http://mac.R-project.org/. Please visit that page especially during beta stages to help us test the Mac OS X binaries before final release!
Package maintainers should visit CRAN check summary page to see whether their package is compatible with the current build of R for Mac OS X.
Fortran Compilers For Mac Os X Lion
Binary libraries for dependencies not present here are available from http://mac.R-project.org/libs and corresponding sources at http://mac.R-project.org/src.
Mac Fortran Ide
Last modified: 2020/06/25, by Simon Urbanek
Comments are closed.
|
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |