Added getThreads

— created getThreads to count number of cores
— call getThreads for each external program
Reduced rttpvalue