Calling numpy on parallel processors in IJulia notebook
问题 I want to run a simple code in the IJulia notebook which uses the python library numpy. I call numpy with PyCall: using PyCall @pyimport numpy as np This works fine. I then want to split this up to several processors. I add the processors: addprocs(4) Then, I run N/proc iterations for a function f, where proc is my number of processors. I split the load evenly between the four processors on my computer: n=round(Int,N/proc); proc_sum = @parallel (+) for i=1:proc f(n) end return proc_sum / proc