R: Difference between revisions

Jump to navigation Jump to search
82 bytes removed ,  6 years ago
no edit summary
No edit summary
No edit summary
Line 307: Line 307:
=== doParallel and makeCluster ===
=== doParallel and makeCluster ===


====Running==== <!--T:40-->
====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>.
<!--T:41-->
{{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:
}}
}}


<!--T:44-->
3. Submit the job with:
3. Submit the job with:
{{Command|sbatch job_makecluster.sh}}


<!--T:45-->
<source lang="bash">
sbatch job_foreach.sh
</source>
<!--T:47-->
For more on submitting jobs, see the [[Running jobs]] page.
For more on submitting jobs, see the [[Running jobs]] page.
</translate>
</translate>
cc_staff
284

edits

Navigation menu