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

PetSC source compilation and CMake detection #1

Open
abhinavsns opened this issue Mar 5, 2024 · 2 comments
Open

PetSC source compilation and CMake detection #1

abhinavsns opened this issue Mar 5, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@abhinavsns
Copy link
Member

Currently, OpenFPM uses find_package(PETSc) for PETSc detection, this is not ideal because the corresponding CMake module findPETSc.cmake is deprecated.
Further, a lot of options in script/install_PETSC.sh are no longer used.

A potential solution is to move to pkg-config. This is recommended by petsc-dev: https://www.mail-archive.com/[email protected]/msg28259.html

Example implementation using pkg-config can be found at: https://stackoverflow.com/a/67885007

@abhinavsns abhinavsns changed the title PetSC source compilation and CMake detection Issues on macOS PetSC source compilation and CMake detection on macOS Mar 5, 2024
@syaskovets syaskovets self-assigned this Mar 5, 2024
@abhinavsns abhinavsns added the bug Something isn't working label Mar 5, 2024
@abhinavsns
Copy link
Member Author

With petsc 3.20.5 on MacOS arm64, I noticed a workaround can be to add METIS/lib to the ld_lib_pathopt in script/conf_CMake.sh just like we do for SUITESPARSE.

ld_lib_pathopt=$prefix_dependencies/SUITESPARSE/lib

@abhinavsns abhinavsns changed the title PetSC source compilation and CMake detection on macOS PetSC source compilation and CMake detection May 2, 2024
@abhinavsns
Copy link
Member Author

Now with the new config process that removes config.h, I noticed the HAVE PETSC variable is written correctly for abuild with $make but not for the binaries headers when installed using $make install on my macbook pro arm64.

Also the github Ubuntu CI is failing to detect PetSC and Eigen both.
@syaskovets
@incardon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants