Skip to main content
2 of 2
edited tags
Szabolcs
  • 236.5k
  • 31
  • 641
  • 1.3k

$IterationLimit and parallel computing

Short question: How can you set $IterationLimit for parallel computation?

I thought just setting $IterationLimit = Infinity would work but it doesn't. I still get Iteration limit exceeded errors. A bit of sample code below:

fff[0] = 1;
fff[p_] := fff[p - 1] (*simple function*)
limit = $IterationLimit (*checking $IterationLimit*)

fff[limit + 1000] (*this should give $IterationLimit::itlim error*)

ParallelTable[fff[i], {i, limit + 1000, limit + 1004}] (*this should also give multiple $IterationLimit::itlim errors*)

$IterationLimit = Infinity; (*setting infinite $IterationLimit*)

fff[limit + 1000] (*now this should compute without errors*)

ParallelTable[fff[i], {i, limit + 1000, limit + 1004}] (*this shouldn't give any errors either but for me it throws $IterationLimit::itlim errors*)