diff --git a/src/pyclaw/classic/solver.py b/src/pyclaw/classic/solver.py index 642320912..2b91c234e 100644 --- a/src/pyclaw/classic/solver.py +++ b/src/pyclaw/classic/solver.py @@ -610,15 +610,17 @@ def __init__(self, riemann_solver=None, claw_package=None): self.aux2 = None self.aux3 = None self.work = None + self.nthreads = None + + super(ClawSolver3D,self).__init__(riemann_solver, claw_package) import os - import warnings 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.logger.warn(""""The env 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)) - super(ClawSolver3D,self).__init__(riemann_solver, claw_package) - # ========== Setup routine ============================= def _allocate_workspace(self,solution): r"""