Choosing the number of cores