Skip to content

Commit

Permalink
small simplification to OMP_NUM_THREADS env variable check.
Browse files Browse the repository at this point in the history
  • Loading branch information
weslowrie committed Jul 5, 2016
1 parent ba15781 commit 55c4a3d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/pyclaw/classic/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,9 +613,7 @@ def __init__(self, riemann_solver=None, claw_package=None):

import os
import warnings
if 'OMP_NUM_THREADS' in os.environ:
pass # Using OpenMP
else:
if 'OMP_NUM_THREADS' not in os.environ:
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).")
self.nthreads = int(os.environ.get('OMP_NUM_THREADS',1))

Expand Down

0 comments on commit 55c4a3d

Please sign in to comment.