[R] switching compilers with R CMD SHLIB

Prof Brian Ripley ripley at stats.ox.ac.uk
Sun May 21 13:54:31 CEST 2006


On Sun, 21 May 2006, Jarrod Hadfield wrote:

> Hi,
>
> I am having trouble compiling some parallelised c++ code using R CMD
> SHLIB because I cannot seem to specify which compiler is used.  The
> default uses g++ and I would like to use mpicxx distributed with
> MPICH-2.  Is this possible?

Yes, and ?SHLIB points you to the documentation of how to do so.
What about that did you not understand?  E.g.

MAKEFLAGS="CC=mpicxx" R CMD SHLIB *.c

should work, amongst other ways.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list