-
Notifications
You must be signed in to change notification settings - Fork 33
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
Utilize MFEM's petsc/ slepc wrappers #1138
Conversation
chapman39
commented
Jun 12, 2024
•
edited
Loading
edited
- Let MFEM manage petsc/ slepc TPLs
- Build MFEM with petsc/ slepc wrappers
- Change smoke tests to use MFEM's examples instead
…mfem-petsc-wrapper
…mfem-petsc-wrapper
…mfem-petsc-wrapper
…L/serac into feature/chapman39/mfem-petsc-wrapper
…mfem-petsc-wrapper
…L/serac into feature/chapman39/mfem-petsc-wrapper
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! I'm building now to make sure it all builds locally.
This comment was marked as outdated.
This comment was marked as outdated.
cmake/thirdparty/FindARPACK.cmake
Outdated
|
||
foreach(_lib_dir ${ARPACK_DIR}/lib;${ARPACK_DIR}/lib64) | ||
if (EXISTS ${_lib_dir}) | ||
set(ARPACK_LIBRARIES "${_lib_dir}/libparpack.so") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is an issue for MacOS builds -- I need set(ARPACK_LIBRARIES "${_lib_dir}/libparpack.dylib")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we not use the pkgconfig
files generated by ARPACK?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than this minor issue, this builds fine locally!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, good point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zatkins-work Let me know if my recent changes resolves your build issues on mac
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be using find_library
:
https://cmake.org/cmake/help/latest/command/find_library.html
This will toggle lib
and lib64
and the file extension as well:
find_library(_arpack_library parpack PATHS ${ARPACK_DIR}/lib)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should also search for a specific header so you know that the installation works. Here is an example:
https://github.com/LLNL/axom/blob/develop/src/cmake/thirdparty/FindC2C.cmake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just fixed that, thanks
#------------------------------------------------------------------------------ | ||
# SLEPc | ||
#------------------------------------------------------------------------------ | ||
if (SLEPC_DIR AND SERAC_USE_PETSC) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this also be inside of the if(PETSC_DIR)
section like below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that is what the SERAC_USE_PETSC
does...
# List of MFEM dependencies, that require the *_LIB variable to be non-empty | ||
MFEM_REQ_LIB_DEPS = ENZYME SUPERLU MUMPS METIS FMS CONDUIT SIDRE LAPACK SUNDIALS\ | ||
- SUITESPARSE STRUMPACK GINKGO GNUTLS NETCDF PETSC SLEPC MPFR PUMI HIOP\ | ||
+ SUITESPARSE STRUMPACK GINKGO GNUTLS NETCDF SLEPC PETSC MPFR PUMI HIOP\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to go into spack or mfem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MFEM. I have a PR for it here mfem/mfem#4363
@@ -204,6 +206,8 @@ class Serac(CachedCMakePackage, CudaPackage): | |||
# Conflicts | |||
# | |||
|
|||
conflicts("~petsc", when="+slepc", msg="PETSc must be built when building with SLEPc!") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍