Fix bug in scheduleAt; add test code for openmp