Heavy flooding on Indonesia's Sumatra island has left two children dead and forced some 24,000 people to flee their homes.