** THIS DOESN'T WORK ANY MORE ** Recent updates to XCode seem to have stopped this from working. I am attempting to get this working again. Updates will be posted here.
The version of gcc
that ships with Mac OS X doesn't have openMP enabled, which means you can't use "helper threads", which make pqR
super-fast. So, we first need to install that and get OS X to use it...
Get homebrew
so you can install a newer version of gcc
, then:
brew tap homebrew/versions
brew install gcc48
brew install gfortran
now make gcc
4.8 the version of gcc
that will be used by default:
export CC=/usr/local/bin/gcc-4.8
(maybe put this in your .bash_profile
so it's always that version)
Then get pqR
git clone [email protected]:radfordneal/pqR.git
run ./configure
and hopefully get this output at the end:
R is now configured for x86_64-apple-darwin12.5.0
Source directory: .
Installation directory: /Library/Frameworks
C compiler: /usr/local/bin/gcc-4.8 -std=gnu99 -g -O2
Fortran 77 compiler: gfortran -g -O2
C++ compiler: g++ -g -O2
Fortran 90/95 compiler: gfortran -g -O2
Obj-C compiler: gcc -g -O2 -fobjc-exceptions
Interfaces supported: X11, aqua, tcltk
External libraries: readline, ICU, lzma
Additional capabilities: PNG, JPEG, TIFF, NLS
Options enabled: helper threads, framework, shared BLAS, R profiling, Java
Byte compile packages: yes
Recommended packages: yes
The helper threads
option is the thing that will improve performance a lot, so make that that is enabled (this should just happen if you use the right gcc
.
Now, run make
and wait... (took about 10 mins on my 2013 MacBook Air).
Having run make check
I get:
running tests of Internet and socket functions
expect some differences
running code in 'internet.R' ...make[3]: *** [internet.Rout] Error 1
make[2]: [test-Internet] Error 2 (ignored)
But I don't think this is problematic (i.e. I was still able to run code...)
Making the documentation:
make info
make pdf
Rather than running make install
, I left the folder as it was but then added an alias to my .bash_profile
:
alias pqR='/Users/dill/sources/pqR/bin/R --quiet --no-save --no-restore --no-environ --helpers=2'
by default this will run pqR
with 2 helper threads (and not save or load any workspace).
Doesn't look like you can install Rcpp
(from CRAN), so certain packages like lme4
and gamm4
will not install (from CRAN). Need to investigate this further.
I wonder if installing
Rcpp
from source will work?... oh I see...its the fact that
pqR
is based on onR2.15