Error while running the code compiled with openmp switch