Large-scale nonconvex optimization: randomization, gap estimation, and numerical resolution