Added multithreaded computation of initial w and initial L.