ipic run: calculate number of threads based on number of processes