We report fast and accurate simulations of metamaterial structures constructed with large numbers of unit cells containing split-ring resonators and thin wires. Scattering problems involving various metamaterial walls are formulated rigorously using the electric-field integral equation, discretized with the Rao-Wilton-Glisson basis functions. Resulting dense matrix equations are solved iteratively,where the matrix-vector multiplications are performed efficiently with the multilevel fast multipole algorithm. For rapid solutions at resonance frequencies, convergence of the iterations is accelerated by using robust preconditioning techniques, such as the sparse-approximate-inverse preconditioner. Without resorting to homogenization approximations and periodicity assumptions, we are able to obtain accurate solutions of realistic metamaterial problems discretized with millions of unknowns.