# split up 1...n among workers
function spawn_workers(n::Int64)
# number of workers
nw=nworkers()
# split jobs among workers
work=Array{Array{Int64,1},1}(undef,nw)
# init empty arrays
for p in 1:nw
work[p]=Int64[]
end
for i in 1:n
append!(work[(i-1)%nw+1],[i])
end
return work
end