Add a missing barrier to pthreads and openmp impl
Adding testing scripts