On-the-Fly Active Learning of Interatomic Potentials for Large-Scale Atomistic Simulations