Add OpenMP support to sweeps.

The threshold of number of partitions of doing CPU/GPU sweeps has
also been changed from one to four.