fixing concurrency issue in harmosc (arr -> arr(i)) and fixing boost_thread::mem_t::cycle()