A Diagnosis Algorithm for Massively Parallel Systems