added routine to flush all global atoms
merge-conflict resolved with master