fixed it so PHI uses only P-1 physical cores
outline of dynamic threaded approach