Allow parallel phi sum by using critical section around phicache