Fixed to compile and run on origin2000 and origin-pthreads.