From 0026d225478f1b368d124a80f0a81860c72d1d01 Mon Sep 17 00:00:00 2001 From: craig-warren Date: Thu, 4 Jan 2024 14:35:37 +0000 Subject: [PATCH] Moved warnings removal for pyopencl --- gprMax/config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gprMax/config.py b/gprMax/config.py index 1c52d402..b534d674 100644 --- a/gprMax/config.py +++ b/gprMax/config.py @@ -21,9 +21,6 @@ import sys import warnings from pathlib import Path -# Used to suppress CompilerWarning (sub-class of UserWarning) from pyopencl -warnings.filterwarnings("ignore", category=UserWarning) - import cython import numpy as np from colorama import Fore, Style, init @@ -256,6 +253,9 @@ class SimulationConfig: self.general["precision"] = "single" self.devices = {"devs": [], "compiler_opts": None} # pyopencl device device(s); compiler options + # Suppress CompilerWarning (sub-class of UserWarning) + warnings.filterwarnings("ignore", category=UserWarning) + # Suppress unused variable warnings on gcc # if sys.platform != 'win32': self.devices['compiler_opts'] = ['-w']