I have three different and independent task/calculation to do.
function interpQa()
ag = 0.01:0.05:3
aσ = 0.03 : 0.025 : 0.63
if PrimeiraVez
mQ = [Q(g,sigma) for g in ag, sigma in aσ]
writedlm("Qa_termo2020.dat",mQ)
else
mQ=readdlm("C:\\Users\\Lucas\\Desktop\\LUCAS\\Julia\\Qa_termo2020.dat")
iQ = interpolate(mQ, BSpline(Cubic(Line())), OnGrid()) # Interpola na grade
sQ = scale(iQ, ag, aσ)
(x,y)->sQ[x,y]
end
function interpQb()
ag = 0.01:0.05:3 # teste
aσ = 0.03 : 0.025 : 0.63
aα = 0:0.1:0.4
aT= 0.1:0.05:0.4
if PrimeiraVez
mQ = [Qd(g,sigma,α,T) for g in ag, sigma in aσ, α in aα, T in aT]
writedlm("Qb_termo2020.dat",mQ)
else
mQ=readdlm("C:\\Users\\Lucas\\Desktop\\LUCAS\\Julia\\Qb_termo2020.dat")
mQ = reshape(mQ,(length(ag),length(aσ),length(aα),length(aT)))
end
# Matriz com os valores de Q na grade
iQ = interpolate(mQ, BSpline(Cubic(Line())), OnGrid()) # Interpola na grade
sQ = scale(iQ, ag, aσ, aα,aT)
(x,y,z,w) -> sQ[x,y,z,w]
end
function interpQc()
ag = 0.01:0.05:3 # teste
aσ = 0.03 : 0.025 : 0.63
if PrimeiraVez
mQ = [Qi(g,sigma) for g in ag, sigma in aσ]
writedlm("Qc_termo2020.dat",mQ)
else
mQ=readdlm("C:\\Users\\Lucas\\Desktop\\LUCAS\\Julia\\Qc_termo2020.dat")
#mQ=readdlm("/media/lucas/Backup/Linux/Julia/Qc_todos.dat")
end
# Matriz com os valores de Q na grade
iQ = interpolate(mQ, BSpline(Cubic(Line())), OnGrid()) # Interpola na grade
sQ = scale(iQ, ag, aσ)
(x,y)->sQ[x,y]
end
time0 = time()
println("Gerando a função Qa(g,sigma)")
Qa = interpQa()
tempod = (time() - time0)/60
println("Tempo decorrido: $tempod min")
time0 = time()
println("Gerando a função Qb(g,α,sigma,T) ")
Qb = interpQb()
tempod = (time() - time0)/60
println("Tempo decorrido: $tempod min")
time0 = time()
println("Gerando a função Qc(g,sigma)")
Qc = interpQc()
tempod = (time() - time0)/60
println("Tempo decorrido: $tempod min")
How can i use all cores or do the three tasks at the same time ?