parallelize data transfer with Openmp for better performance.