spawning #cores pthreads unless $CT_THREADS is set