Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for Custom Build of Petsc in petsc.py #237

Open
defencedog opened this issue Nov 17, 2022 · 0 comments
Open

Check for Custom Build of Petsc in petsc.py #237

defencedog opened this issue Nov 17, 2022 · 0 comments
Labels
Priority:Low Low Priority Issue or PR

Comments

@defencedog
Copy link

defencedog commented Nov 17, 2022

I have compiled my own petsc with multiple shared libraries on ARM64 Android. Because python3.9/site-packages/idaes/core/solvers/petsc.py doesn't have any check to discover custom locations of petsc I have to modify code slightly & used system environment variable ( in my case PETSC_DIR=$PREFIX/local ) to guide python to required location otherwise jupyter notebook gave error about PetscBinaryIOTrajectory.py not found

comment line 52 
# petsc_dir = os.path.join(icfg.bin_directory, "petscpy")
add x2 lines 
petsc_dir = os.environ["PETSC_DIR"]
petsc_dir = os.path.join(petsc_dir, "lib/petsc/bin/")

Because python wrappers were compiled AFTER compiling petsc itself this icfg.bin_directory cannot be used which refers to $HOME/.idaes/bin/ where only wrappers & some function libs are located

@ksbeattie ksbeattie added the Priority:Normal Normal Priority Issue or PR label Nov 17, 2022
@andrewlee94 andrewlee94 added Priority:Low Low Priority Issue or PR and removed Priority:Normal Normal Priority Issue or PR labels Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:Low Low Priority Issue or PR
Projects
None yet
Development

No branches or pull requests

3 participants