made all the appropriate changes for rectilinear directly in MPI+Pthreads