multi pthreads to compute