Rmpi for Mac OS X

Use homebrew to install Open MPI and Rmpi on Mac OS (64bit only)

  1. Follow this page to install Apple's Xcode, Command Line Tools, and homebrew. Follow up to the Step 3 in that guide.
  2. At the terminal, install gfortran by
    brew install gfortran
  3. At the terminal, install Open MPI by
    brew install open-mpi
  4. Launch R64 and install Rmpi by
    install.packages("Rmpi", type="source")
    You need to compile Rmpi from source. The binary  Rmpi at CRAN is only for 32bit openmpi.
    Note: To compile Rmpi with the latest version, grab it here and use install.packages(file.choose(), repos = NULL, type = "source")
    Note:  Do not use Rstudio to compile Rmpi. It will call R which is 32bit.
    Note: You can install R through homebrew as well: brew install R.
  5. Test Rmpi
    mpi.iparReplicate(100, mean(rnorm(1000000)))
  6. That's it.

To install Rmpi from source, you may need additional tools such as xcode. Once downloaded, please use
    sudo R CMD INSTALL Rmp_xxx.tar.gz
to install.