Moving to x,y not be dynamically declared, and stdmp and rr residing in main() to avoid function calls and overhead from omp