Hi I would like to use pmap for this function:
function simulate(
sim_type::SIS,
df::DataFrame,
intervals::Dict{Int, Pair{DateTime, DateTime}},
user2vertex::Dict{String, Int},
loc2he::Dict{String, Int},
δ::Dates.Millisecond;
Δ::Union{Int,TimePeriod,Nothing} = nothing,
vstatus::Union{Array{Int, 1}, Nothing} = nothing,
per_infected::Float64 = 0.2,
c::Union{Int, Nothing} = 5,
βd::Union{Int,Float64} = 0.2,
βₑ::Union{Int,Float64} = 0.06,
βᵢ::Union{Int,Float64} = 0.1,
γₑ::Union{Int,Float64} = 0.06,
γₐ::Union{Int,Float64} = 0.1,
niter::Int = 10,
output_path::Union{AbstractString, Nothing} = nothing,
print_me::Bool = true,
store_me::Bool = true,
kwargs...
)
But for now I can use pmap with functions that have only one integer argument.
(like this)
@everywhere begin
function rand_det(n)
det(rand(n,n))
println("Ciao Ciao")
end
end
determinants = pmap(rand_det, 1)
To start I tried to do it with two arguments:
@everywhere begin
function hello(x,y)
println(x," I'm ",myid())
println(y)
end
end
X=pmap((x,y)->hello(x,y),{"Hola","Hello","Ciao"},{"1","2","3"})
But i have this error:
ERROR: LoadError: syntax: { } vector syntax is discontinued around d:\Tesi\Julia\Terza_Parte\multi_pmap.jl:27
Stacktrace:
[1] top-level scope
@ d:\Tesi\Julia\Terza_Parte\multi_pmap.jl:27
Someone can help me?