made the initial configuration specify no optimization and not declared the shared variable volatile.