Skip to content

Commit 55c4a3d

Browse files
committed
small simplification to OMP_NUM_THREADS env variable check.
1 parent ba15781 commit 55c4a3d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/pyclaw/classic/solver.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -613,9 +613,7 @@ def __init__(self, riemann_solver=None, claw_package=None):
613613

614614
import os
615615
import warnings
616-
if 'OMP_NUM_THREADS' in os.environ:
617-
pass # Using OpenMP
618-
else:
616+
if 'OMP_NUM_THREADS' not in os.environ:
619617
warnings.warn("The environment variable 'OMP_NUM_THREADS' is unset. Set this variable to use OpenMP with more than 1 thread (i.e. export OMP_NUM_THREADS=4).")
620618
self.nthreads = int(os.environ.get('OMP_NUM_THREADS',1))
621619

0 commit comments

Comments
 (0)