Closed chapman39 closed 4 months ago
Update: the issue is MFEM's FindPETSc.cmake module is extremely out of date. It was last updated 8 years ago. It's possible an older version of petsc (@3.5) will resolve the issue. For now I'll just disable MFEM_USE_PETSC for codevelop builds.
Turns out Serac's FindPETSc.cmake was conflicting with MFEM's, and only MFEM's should be called during codevelop. Also, there is a way to bypass their build-checks by setting PETSC_EXECUTABLE_RUNS
.
For some reason, slepc complains about undefined petsc and arpack symbols. In Serac's cmake module for slepc, I put in some logic to add the needed libs and include dirs. However, MFEM's cmake module does not do this. Fixing this is a challenge, since MFEM does not seem to create a petsc or slepc target that I am aware of. This makes it hard to add these libs and include dirs i need to add to slepc.
Closing issue for now in favor of simply not configuring MFEM with petsc/ slepc. It will still be possible to use petsc/ slepc separate from MFEM.
This may be revisited in the future, so I'll add this block that's needed in the MFEM codevelop session to even begin to configure MFEM with petsc/ slepc in a codevelop build.
if(PETSC_DIR)
set(MFEM_USE_PETSC ON CACHE BOOL "")
set(PETSC_ARCH "" CACHE STRING "")
set(PETSC_EXECUTABLE_RUNS "ON" CACHE BOOL "") # Skips build checks
if(SLEPC_DIR)
set(MFEM_USE_SLEPC ON CACHE BOOL "")
set(SLEPC_ARCH "" CACHE STRING "")
set(SLEPC_VERSION_OK "TRUE" CACHE BOOL "") # Skips build checks
endif()
else()
set(MFEM_USE_PETSC OFF CACHE BOOL "")
set(MFEM_USE_SLEPC OFF CACHE BOOL "")
endif()
...
# add mfem subdirectory
Since Serac has some logic for finding petsc in it's
SetupSeracThirdParty.cmake
, it creates some problems when codeveloping Serac in LiDO. It has to do with MFEM'sFindPETSc.cmake
module. I need to look into this more once I start working on building PETSc for Serac.