How to assign a specific core in the execution of an R script

625 Views Asked by At

I want to execute a simple R code.Is it possible to assign a specific core/processor in it's execution.If possible,how do I do it?

1

There are 1 best solutions below

0
On

It's possible to assign processes to use specific cores in Windows. The easiest way to test this out is through Windows Task Manager -> Processes Tab -> Right click on a process -> Set Affinity -> Check the set of processors you want to use.

There are similar questions to this elsewhere (https://serverfault.com/questions/571516/any-way-to-make-a-program-run-on-a-specific-core-on-launch, https://superuser.com/questions/309617/how-to-limit-a-process-to-a-single-cpu-core).

Note that it's generally not advised that you force processes to run on specific cores.