use CPU_CORES if -p has no argument. fixes #2228