Measurement and algorithm for structure and substructure-fault diagnosis in multiprocessor systems based on the PMC model