Optimization for OpenMP: replace allocates with automatic data allocation

Using four openmp threads slowed this code down by 30%. Some of the
slow down is due to the use of allocate and deallocate (heap storage).
Switching to automatic allocation avoids this particular inefficiency.

Changes suggested by @Zhi-Liang .

Note: branched from bugfix/out_of_bounds_OBL_Mdiff-option2.