Thank you so much for your quick reply.
That was my typo. I do not write “using addprocs(8)”. I usually write directly in the prompt addprocs(8) in order not to increase the number of workers too much. Actually, by the way, I also can’t control the actual number of workers. If I want to reduce the number of workers I exit Julia and get in again. That says it all about my knowledge of Julia, right?
The error that I get is the following:
The output when I do not try to do parallel computing I get is the following (03-build_it.jl I attach it to show that the output is already a vector which I think makes it complicated for me to use pmap but the other alternatives seem even more complicated):
coverage = [0.96, 0.98, 0.98, 0.98, 1.0, 1.0, 0.99, 0.99, 0.99]
width = [23.04731271400833, 6.461724751556204, 4.06406475792698, 3.041395719635732, 2.661069159405758, 2.5227358264222484, 2.4306187249891464, 2.405408363074599, 2.4047765311097633]
The idea is to do a simulation exercise and to do this I have three functions (one of them is raposo because it was my way to construct a function that would include the simulations and therefore I could do parallel computing.)
I attach here the dataset and my jl program with my attempt to do parallel computing (03-build_itae.jl). As you can see I have many other alternatives in the code. But for now I wait for your feedback.
my program with mistake
This is the mistake I get:
From worker 6: s = 1.0
From worker 9: s = 1.0
From worker 5: s = 1.0
From worker 8: s = 1.0
From worker 7: s = 1.0
From worker 3: s = 1.0
From worker 4: s = 1.0
From worker 2: s = 1.0
ERROR: On worker 6:
ArgumentError: invalid index: 1.0 of type Float64