3

I get a bounds error when running a function in parallel that runs fine normally (sequentially) e.g. when I run:

parallelsol = @time pmap(i -> findividual(x,y,z), 1:50)

It gives me an error:

exception on 2: exception on exception on 16: 20exception on 5: : ERROR: BoundsError() in getindex at array.jl:246 (repeats 2 times)

But when I run:

parallelsol = @time map(i -> findividual(prodexcint,firstrun,q,r,unempinc,VUnempperm,Indunempperm,i,VUnemp,poachedwagevec, mw,k,Vp,Vnp,reswage), 1:50)

It runs fine. Any ideas as to why this might be happening?

Alex A.
  • 5,466
  • 4
  • 26
  • 56
  • In the second example you actually pass the `i` to the function that you map. But try to make your example more reproducible - what is the function that you are using, what are the arguments. Preferably - some simple self-contained example that reproduces your problem. – mmagnuski Jun 17 '15 at 11:44
  • Yes sorry for the inconsistency there. The function is updating the vectors VUnemp, Vp and Vnp using all other arguments (a mix of scalars and vectors) as inputs only. I'll try and think of a simple example that reproduces the problem as suggested. However, it seems odd that I get a bounds error with pmap but not map given all the inputs and functions are the same in both cases. – David Zentler-Munro Jun 18 '15 at 08:02
  • One more point: when I wrap the pmap call in a function I no longer get a bounds error but my function appears to be returning zero values. Hmm. – David Zentler-Munro Jun 18 '15 at 08:04
  • Regarding the zero values, do you know if all processors can see your input/output arrays and values? It is difficult to offer you any more advice without a minimal working example... :( – Kevin L. Keys Jun 05 '16 at 18:34

0 Answers0