Whenever from any cause it is, in the opinion of the court, impracticable or highly inconvenient to make a complete partition, in the first instance, among all the parties in interest, the court may first ascertain and determine the shares or interest respectively held by the original cotenants, and thereupon adjudge and cause a partition to be made, as if such original cotenants were the parties and sole parties in interest, and the only parties to the action; and thereafter may proceed in like manner to adjudge and make partition separately of each share or portion so ascertained or allotted as between those claiming under the original tenant to whom the same shall have been so set apart, or may allow them to remain tenants in common thereof, as they may desire.
SDCL 21-45-16