Added comment for barrier and finalize.