If the defendant shall not bring into court the amount due, with costs, or if, for any other cause, a judgment or decree shall be entered for the plaintiff, the court may appoint a referee to ascertain and report the situation of the mortgaged premises, or may determine the same on oral or other testimony.
SDCL 21-47-9