Parallel processing fails clipping images

Hello everyone.

I’ve been doing parallel processing of sentinel images for a while (by using the multiprocessing python library). One of my steps includes clipping the image for an interest area, and I do it following the recommendation exposed here.

After some time, I found that some of my clipped images were corrupt, as i show you in an example:

As you see, band 4 wasn’t well generated in parallel process, but it was correct in Snap Desktop, as well as doing the process sequentially. This is a single example but i found several more.

I assume that it may be a problem from snappy, that might have some global variables that interferes the processing, or may be it just only saturates when doing several things at the same time. This not happens always, it seems to happen in a random way.

If someone had the same problem, or if there is any SNAP/snappy configuration for doing parallel processing, please let me know.