R: Difference between revisions

Jump to navigation Jump to search
72 bytes removed ,  7 years ago
→‎Running: update after testing
(running)
(→‎Running: update after testing)
Line 116: Line 116:
====Running====
====Running====


Please your R code in a script file, in this case mpi_test.R.


Give the file executable permissions with:
Please your R code in a script file, in this case test.R.
 
chmod u+x rmpi_test.R


Then place the following in a job submission script, job.sh :
Then place the following in a job submission script, job.sh :


  #!/bin/bash
  #!/bin/bash
  #SBATCH --account=def-ppomorsk
  #SBATCH --account=def-ppomorsk # replace this with your own account
  #SBATCH --ntasks=4               # number of MPI processes
  #SBATCH --ntasks=5               # number of MPI processes
  #SBATCH --mem-per-cpu=1024M     # memory; default unit is megabytes
  #SBATCH --mem-per-cpu=2048M     # memory; default unit is megabytes
  #SBATCH --time=0-01:00           # time (DD-HH:MM)
  #SBATCH --time=0-00:15           # time (DD-HH:MM)
  module load r/3.4.0
  module load r/3.4.0
  export R_LIBS=~/local/R_libs/
  export R_LIBS=~/local/R_libs/
  srun Rscript rmpi_test.R
  mpirun -np 1 R CMD BATCH test.R test.txt


Finally, submit the job with:
Finally, submit the job with:
Line 137: Line 134:
  sbatch job.sh
  sbatch job.sh


For more on submitting jobs, see the [https://docs.computecanada.ca/wiki/Running_jobs#MPI_job Running jobs] page.
For more on submitting jobs, see the [[Running jobs]] page.


</translate>
</translate>
cc_staff
239

edits

Navigation menu