Replaced OpenMP atomics to locks; corrected Nmpi to be 1 at the beginning in SImulationBase; corrected MPI headers to be included only when needed