From cbcdf651d51af5446a6c2f8a1c1f308d35c14f1c Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Mon, 13 Jan 2020 10:21:44 -0800 Subject: wrap openmp pragma in #ifdef _OPENMP --- Source/Particles/PhysicalParticleContainer.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index f22f94e9b..2fea9133a 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -493,7 +493,9 @@ PhysicalParticleContainer::AddPlasma (int lev, RealBox part_realbox) // Update NextID to include particles created in this function int pid; +#ifdef _OPENMP #pragma omp critical (add_plasma_nextid) +#endif { pid = ParticleType::NextID(); ParticleType::NextID(pid+max_new_particles); -- cgit v1.2.3 From fc98645e5fe7e1bb6a01ea925d87018e4f518419 Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Mon, 13 Jan 2020 10:28:24 -0800 Subject: fix EOL whitespace --- Source/Particles/PhysicalParticleContainer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 2fea9133a..0d9d4fc1a 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -493,9 +493,9 @@ PhysicalParticleContainer::AddPlasma (int lev, RealBox part_realbox) // Update NextID to include particles created in this function int pid; -#ifdef _OPENMP +#ifdef _OPENMP #pragma omp critical (add_plasma_nextid) -#endif +#endif { pid = ParticleType::NextID(); ParticleType::NextID(pid+max_new_particles); -- cgit v1.2.3