1

Intend to use Azure Batch to run R in parallel with the do AzureParallel package. I intend leave the default chunkSize = 1.

Does it start a new R session for each iteration of the foreach() loop?

I do want it to start a new R session for each iteration of the foreach() loop. If the answer to the above question is "no", how can I make it restart the R session for each iteration?

Edit: Here is the link to the documentation of the chunkSize option, with example code.

https://github.com/Azure/doAzureParallel/blob/master/docs/80-performance-tuning.md#using-the-chunksize-option

power
  • 1,680
  • 3
  • 18
  • 30
  • Also asked here https://social.msdn.microsoft.com/Forums/en-US/d3789c0e-cd9a-4926-9bf6-82885154af09/r-doazureparallel-and-chunksize?forum=azurebatch – micahmckittrick Feb 11 '19 at 20:00

1 Answers1

1

Sharing the solution for the same question asked in MSDN

On setting the chunkSize to 1, every foreach iteration will instantiate a new R session.