Initial implmentation of openmp version
Not tested