cc_staff
239
edits
(update instructions to use openmpi/1.10.7) |
(properly indicate source) |
||
Line 92: | Line 92: | ||
<!--T:20--> | <!--T:20--> | ||
<source lang="bash"> | |||
module spider r | module spider r | ||
</source> | |||
<!--T:21--> | <!--T:21--> | ||
Line 98: | Line 100: | ||
<!--T:22--> | <!--T:22--> | ||
<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 | ||
</source> | |||
<!--T:23--> | <!--T:23--> | ||
Line 106: | Line 109: | ||
<!--T:24--> | <!--T:24--> | ||
<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> | |||
<!--T:25--> | <!--T:25--> | ||
Line 112: | Line 117: | ||
<!--T:26--> | <!--T:26--> | ||
<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/ | ||
</source> | |||
<!--T:27--> | <!--T:27--> | ||
Line 132: | Line 139: | ||
<!--T:32--> | <!--T:32--> | ||
<source lang="r"> | |||
#Tell all slaves to return a message identifying themselves. | #Tell all slaves to return a message identifying themselves. | ||
library("Rmpi") | library("Rmpi") | ||
Line 146: | Line 154: | ||
length(x) | length(x) | ||
x | x | ||
</source> | |||
<!--T:33--> | <!--T:33--> | ||
Line 151: | Line 160: | ||
<!--T:34--> | <!--T:34--> | ||
<source lang="bash"> | |||
#!/bin/bash | #!/bin/bash | ||
#SBATCH --account=def-ppomorsk # replace this with your own account | #SBATCH --account=def-ppomorsk # replace this with your own account | ||
Line 160: | Line 170: | ||
export R_LIBS=~/local/R_libs/ | export R_LIBS=~/local/R_libs/ | ||
mpirun -np 1 R CMD BATCH test.R test.txt | mpirun -np 1 R CMD BATCH test.R test.txt | ||
</source> | |||
<!--T:35--> | <!--T:35--> | ||
Line 165: | Line 176: | ||
<!--T:36--> | <!--T:36--> | ||
<source lang="bash"> | |||
sbatch job.sh | sbatch job.sh | ||
</source> | |||
<!--T:37--> | <!--T:37--> |