DistributedArrays.jl icon indicating copy to clipboard operation
DistributedArrays.jl copied to clipboard

How to display error on DArray remote construction ?

Open matthiasbe opened this issue 4 years ago • 0 comments

When building the remotely the array as specified in the documentation:

ras = [@spawnat p wrong_name() for p in workers()[1:4]]
ras = reshape(ras,(2,2))
D   = DArray(ras)

Assuming the wrong_name() throws an exception, the error will throw from DistributedArray code MethodError: no method matching size(::RemoteException) here.

The only way for me to debug this is to modify the code and add a line [fetch(r) for r in ras] after line 1.

This is not convenient for me because the fetch will induce a lot of communication so I need to put it before and remove it after debugging.

Do you know a better way to check this ? Thank you

matthiasbe avatar Mar 18 '21 10:03 matthiasbe