Optimized simulation of multiscale problems on high-performance computers