We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd255de commit 0f2f664Copy full SHA for 0f2f664
devito/petsc/config.py
@@ -2,7 +2,13 @@
2
import ctypes
3
from pathlib import Path
4
5
-from petsctools import get_petscvariables, MissingPetscException
+try:
6
+ from petsctools import get_petscvariables, MissingPetscException
7
+ petsc_variables = get_petscvariables()
8
+except ImportError:
9
+ petsc_variables = {}
10
+except MissingPetscException:
11
12
13
from devito.tools import memoized_func
14
@@ -46,12 +52,6 @@ def core_metadata():
46
52
}
47
53
48
54
49
-try:
50
- petsc_variables = get_petscvariables()
51
-except MissingPetscException:
- petsc_variables = {}
-
55
def get_petsc_type_mappings():
56
try:
57
petsc_precision = petsc_variables['PETSC_PRECISION']
0 commit comments