Strange comportment of @distributed

Welcome @Geoffrey !

Your functions work well if not using distributed, so my guess is, the problem is not in your functions.
At first try the
@sync
macro just in front of @distributed, so e.g.:

        # filter x
       @sync @distributed for y in 1:sz[1]
           imgo[y,:] = filter1d(img[y,:],σ,R,K)
       end

I didn’t check if this solves your problem, its just a guess. I do not have the time now to create a MWE (Please read: make it easier to help you - #93) from your code. E.g. we do not know, if you use the @everywhere macro correctly.

If this does not solve your issue, you should start with a small and simple code example which is similar to your usage of distributed, e.g. filling some array (imgo) with results of a function with similar parameters (imgo), but make it small. The purpose of that is, if you do it, it is quite likely, that you may spot the error on your own, and for us it would be much easier to help you. Without trying I think it is just not possible to find out whats wrong with your code, because important parts are missing.

1 Like