An algorithm for automatically obtaining distributed and fault-tolerant static schedules