rsnt_translations
58,130
edits
No edit summary |
No edit summary |
||
Line 85: | Line 85: | ||
====Installing==== <!--T:18--> | ====Installing==== <!--T:18--> | ||
This next procedure installs [https://cran.r-project.org/web/packages/Rmpi/index.html Rmpi], an interface (wrapper) to MPI routines, which allow R to run in parallel. | |||
1. See the available R modules by running: | |||
<source lang="bash"> | |||
<source lang="bash"> | |||
module spider r | module spider r | ||
</source> | </source> | ||
<!--T:21--> | <!--T:21--> | ||
2. Select the version (here, we indicate the latest Novembre 2017 version), and also load the required OpenMPI module: | |||
<source lang="bash"> | |||
<source lang="bash"> | |||
module load r/3.4.0 | module load r/3.4.0 | ||
module load openmpi/1.10.7 | module load openmpi/1.10.7 | ||
Line 106: | Line 100: | ||
<!--T:23--> | <!--T:23--> | ||
3. Download [https://cran.r-project.org/web/packages/Rmpi/index.html the latest R version]; change the version number to whatever is desired. | |||
<source lang="bash"> | |||
<source lang="bash"> | |||
wget https://cran.r-project.org/src/contrib/Rmpi_0.6-6.tar.gz | wget https://cran.r-project.org/src/contrib/Rmpi_0.6-6.tar.gz | ||
</source> | </source> | ||
<!--T:25--> | <!--T:25--> | ||
4. Specify the directory where you want to install the package files; you must have write permission for this directory. The directory name can be changed if desired. | |||
<source lang="bash"> | |||
<source lang="bash"> | |||
mkdir -p ~/local/R_libs/ | mkdir -p ~/local/R_libs/ | ||
export R_LIBS=~/local/R_libs/ | export R_LIBS=~/local/R_libs/ | ||
Line 123: | Line 113: | ||
<!--T:27--> | <!--T:27--> | ||
5. Run the install command. | |||
<source lang="bash"> | |||
<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 | 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> | </source> | ||
Line 136: | Line 124: | ||
<!--T:31--> | <!--T:31--> | ||
Place your R code in a script file, in this case test.R. | 1. Place your R code in a script file, in this case the file is called ''test.R''. | ||
<!--T:32--> | <!--T:32--> | ||
Line 157: | Line 145: | ||
<!--T:33--> | <!--T:33--> | ||
2. Copy the following content in a job submission script called ''job.sh'': | |||
<!--T:34--> | <!--T:34--> | ||
Line 173: | Line 161: | ||
<!--T:35--> | <!--T:35--> | ||
3. Submit the job with: | |||
<!--T:36--> | <!--T:36--> |