Open bknight1 opened 5 months ago
This one is for @julesghub - we have this problem of conda / mpi needing imports in one order and the petsc command line tools needing another.
Interesting. I think the uw version of the petsc options DB is likely out of sync with petsc's. That's my hunch. Can you post a short example of how you're using it? Thanks.
It is just a subset of the petsc one. The examples would be the ones that Ben showed in the meeting on Monday - initialising the benchmark models.
Here's a basic example that fails, if you comment out the first line it'll run fine.
from petsc4py import PETSc
import underworld3 as uw
res = uw.options.getInt("res")
print(res)
The error is:
Traceback (most recent call last):
File "/Users/benknight/Documents/Research/Modelling/UW-models/UW3-dev/options_error.py", line 4, in <module>
res = uw.options.getInt("res")
File "petsc4py/PETSc/Options.pyx", line 276, in petsc4py.PETSc.Options.getInt
File "petsc4py/PETSc/petscopt.pxi", line 201, in petsc4py.PETSc.getopt
File "petsc4py/PETSc/petscopt.pxi", line 96, in petsc4py.PETSc.getopt_Int
KeyError: '(prefix:uw_, name:res)'
Describe the bug
unable to use/read uw options if
from petsc4py import PETSc
is imported firstWhat version of underworld3 are you running and how to reproduce the bug.
Current dev branch