fixed barrier variable not being global, added O3 flag to makefile