cc_staff
311
edits
No edit summary |
No edit summary |
||
Line 307: | Line 307: | ||
=== doParallel and makeCluster === | === doParallel and makeCluster === | ||
====Running==== | ====Running==== | ||
1. Place your R code in a script file, in this case the file is called <tt>test_makecluster.R</tt>. | 1. Place your R code in a script file, in this case the file is called <tt>test_makecluster.R</tt>. | ||
{{File | {{File | ||
|name=test_makecluster.R | |name=test_makecluster.R | ||
Line 341: | Line 338: | ||
# Don't forget to release resources | # Don't forget to release resources | ||
stopCluster(cl) | stopCluster(cl) | ||
}} | }} | ||
2. Copy the following content in a job submission script called <tt>job_makecluster.sh</tt>: | 2. Copy the following content in a job submission script called <tt>job_makecluster.sh</tt>: | ||
Line 364: | Line 359: | ||
}} | }} | ||
3. Submit the job with: | 3. Submit the job with: | ||
{{Command|sbatch job_makecluster.sh}} | |||
For more on submitting jobs, see the [[Running jobs]] page. | For more on submitting jobs, see the [[Running jobs]] page. | ||
</translate> | </translate> |