with remote references.
Sebastian
On 4 Aug 2015, at 11:14, Tim Holy wrote:
> Do the @async and @sync macros cover that for you?
>
> --Tim
>
> On Tuesday, August 04, 2015 12:45:26 AM Sebastian Vollmer wrote:
>> Is it possible to implement P2P parallel computing in Julia
Is it possible to implement P2P parallel computing in Julia so that never
all processes have to synchronize at the same time (except at the end of
the computation)?
In the docs it reads:
Julia’s implementation of message passing is different from other
environments such as MPI. Communication i
Loading a script using reload executes the code on all workers. How do I
only execute code on one worker?
Pseudo code
algorithm.jl:
function fun(s::Int64)
end
run.jl:
result=pmap(fun, [1:100])
#do something with result
one the julia shell I execute
addprocs(12)
reload(algorithm.jl)
reloa
Additional Remark
Removing the sleep(0.1) in the
dowork()
function results in an infinite loop. Why is that and what can be done?
@everywhere function dowork(res,nZs)
global toStop
global steps
while !toStop
for j=1:steps
localpart(res)[1]+=rand()
I am trying to let Monte Carlo Code run until a time constraint is met. A
simplified version of the code is below. I have two issues
1) I am trying to wait until a computation finishes but wait does not work
so I currently use sleep which is crazy. What is wrong with wait.
2) I try to work with
Thanks a lot. That was helpful.
I am trying to access parts of a distributed array that belongs to the
current worker
res=dzeros((1,length(workers())), workers(), [1,length(workers())])
(for some reason res=dzeros((length(workers())), workers(),
[length(workers())]) throws an error )
@spawnat 2 localpart(res)[1]+=rand()
Dear Gray,
thank you very much. But your answer does not quite help me. The task have
quite different execution time so I have to make sure it is executed in an
beneficial order. I have posted below a simplified version of the code.
However, the code block below #create local variables does not
I would like to perform computations on the workers independently only the
task assignment is scheduled from the main thread. Instead of passing each
result as they come to the main thread I would like to store them on each
worker on a local array. When all computations have finished I would lik
I can create shared variables like
@everywhere i=1
but how do I create variables local to a worker. The only possibility is
through RemoteRefs with take and put, but this seems overly complicated.
What I have in mind is a problem where all the workers only need
communicated with the main threa
10 matches
Mail list logo