Skip to content

Commit

Permalink
Merge branch 'master' into andrew/perf-log
Browse files Browse the repository at this point in the history
  • Loading branch information
wence- committed Jul 21, 2021
2 parents 63615b8 + dd5d060 commit cb3b7aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ PyOP2.egg-info
*.py[cdo]

# Extension modules
computeind.c
computeind.so
sparsity.cpp
sparsity.so

sparsity.c
sparsity.cpython*.so
# Docs
pyop2.coffee.rst
pyop2.rst
Expand Down
7 changes: 5 additions & 2 deletions pyop2/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,11 @@ def get_petsc_dir():
return (dir, dir + arch)
except KeyError:
try:
import petsc
return (petsc.get_petsc_dir(), )
import petsc4py
config = petsc4py.get_config()
petsc_dir = config["PETSC_DIR"]
petsc_arch = config["PETSC_ARCH"]
return petsc_dir, petsc_dir + petsc_arch
except ImportError:
sys.exit("""Error: Could not find PETSc library.
Expand Down

0 comments on commit cb3b7aa

Please sign in to comment.