In Julia, what is difference between defining a variable as const
and defining a variable as const global
? Considering the following example, what is the difference if I change const global
to const
?
#set number of cores
number_cores=7;
addprocs(number_cores)
#include necessary functions
@everywhere include("$(pwd())\\lib.jl");
const global n = 2; # number of observables
const global k = nVAR + 2*n-1; # number of states
const global m = k*q;
pmap(a->parallel_un(a,n,k,m),1:7)
@sync @async
beforepmap
? I think it should have no effect? – Tirza@sync @async
is not necessary in this case. – Frodeen