R: Difference between revisions

Jump to navigation Jump to search
708 bytes added ,  7 years ago
RMPI installation
No edit summary
(RMPI installation)
Line 83: Line 83:


==== Rmpi ==== <!--T:16-->
==== Rmpi ==== <!--T:16-->
If you wish to install [https://cran.r-project.org/web/packages/Rmpi/index.html Rmpi] you will find it necessary to specify the locations of certain MPI directories, like so:
Below is the procedure to install [https://cran.r-project.org/web/packages/Rmpi/index.html Rmpi], an interface (wrapper) to MPI routines, which allow R to run in parallel.
 
 
First, load the R module.  You can find out which are available by running:
 
module spider r
 
In this case we choose the latest (as of November, 2017):
 
module load r/3.4.0
 
 
Next, download the latest version of the software from [https://cran.r-project.org/web/packages/Rmpi/index.html].  Change the version number to whatever is desired.
 
wget https://cran.r-project.org/src/contrib/Rmpi_0.6-6.tar.gz
 
Then specify the directory to install the package files in a directory you can write to.  The name can be changed as desired.
 
mkdir -p ~/local/R_libs/
export R_LIBS=~/local/R_libs/
 
Finally, run the install command.
 
<source lang="bash">
R CMD INSTALL --configure-args="--with-Rmpi-include=$EBROOTOPENMPI/include  --with-Rmpi-libpath=$EBROOTOPENMPI/lib --with-Rmpi-type='OPENMPI' " Rmpi_0.6-6.tar.gz
</source>
 
This will use the default version of MPI to perform the install, which is currently 2.1.1.
 
</translate>
</translate>
<pre>
install.packages("Rmpi",configure.args =c("--with-Rmpi-include=${EBROOTOPENMPI}/include","--with-Rmpi-libpath=${EBROOTOPENMPI}/lib","--with-Rmpi-type=OPENMPI", "--with-mpi=${EBROOTOPENMPI}"))
</pre>
cc_staff
239

edits

Navigation menu