These types of irregular, non-local problems provide a real challenge to efficient implementation (for algorithms and compilers) in data parallel languages such as HPF.
It may be that good performance can only come by using library routines, e.g. for connected component labeling in this case, which would be implemented using an efficient message passing routine.
HPF can handle independent and hybrid parallelism using the INDEPENDENT construct.