A total of 150 elderly residents had to be evacuated from a retirement care home after a fire broke out on the roof.