Allow number of cores to be specified