use parallel computing for test as well.
debug unit from multicore course project.
bug: sign is not correct in computing pweight.
.