On the hierarchical parallelization of ab initio simulations