Closed GrahamBenHarper closed 1 year ago
Whoops, @trilinos/panzer @rppawlo
I think it makes more sense to change ThyraEpetraAdapters to a required dep package in packages/panzer/disc-fe/cmake/Dependencies.cmake
, or to resolve the includes to check if ThyraEpetraAdapters was in fact enabled or not.
That being said, I skimmed the linked PR and don't see how it would cause ThyraEpetraAdapters to not be enabled any more. That kind of thing would have to be in Dependencies.cmake somewhere (I think).
@sebrowne I think the goal is to make a lot of the dependencies on Epetra optional. However, doing so means the logic is flaky. Basically, the logic for most of these packages looks like this: if Epetra is enabled, then we must also enable Epetra-related subpackages like ThyraEpetraAdapters
and ThyraEpetraExtAdapters
.
However, this isn't being picked up. Trilinos is enabling Epetra and Epetra support in Panzer/Teko, but at configure time it's not enabling the necessary subpackages like ThyraEpetraAdapters
/ThyraEpetraExtAdapters
, causing the build to eventually fail when it reaches the point where it needs that subpackage. I don't know how to do this within the Tribits framework, but really we need logic like this:
ThyraEpetraAdapters
to be enabled.ThyraEpetraExtAdapters
to be enabled.I'm working on this now.
Thanks @rppawlo . I attempted #11407 over the weekend, but something is wrong.
I think the issue is that packages like panzer can't enable code unless both optional packages (Epetra and ThyraEpetraAdapters) are enabled. So instead of keying off whether one package is enabled (Epetra), the ifdef used to turn off code needs to check for all optional packages it needs. We do this in nox:
COMBINED_OPTION( NOX_ENABLE_THYRA_EPETRA_ADAPTERS
DEP_OPTIONS_NAMES NOX_ENABLE_ThyraCore NOX_ENABLE_ThyraEpetraAdapters NOX_ENABLE_ThyraEpetraExtAdapters
DOCSTR "Enables support for the Thyra Epetra(Ext) adapters "
" Defaults to ON if the Thyra Epetra(Ext) adapters are both enabled,"
" otherwise defaults to OFF"
)
I think changing to similar logic in teko and panzer (and maybe other downstream packages) is needed.
Thanks @rppawlo!
@GrahamBenHarper @ikalash @glhenni
This is taking a little longer than expected. It's not just panzer and teko but nox and piro as well. We can't look at what packages are already enabled and then force another upstream package to be enabled. It's too late as all the other upstream packages have already been configured. The build should definitely not fail though. The fix is easy for panzer and teko, but nox and piro have some pretty complex dependency cases in the testing. Hope to have it in by today.
One simple fix to get the same behavior as before is the add the flag Trilinos_ENABLE_ALL_OPTIONAL_PACKAGES=ON or in the case of Charon, tcad-charon_ENABLE_ALL_OPTIONAL_PACKAGES=ON. Since Epetra is now optional, if you do want to manually enable packages, enabling Thyra is enough as @GrahamBenHarper mentioned above. If you enable the meta-package, all non-experimental optional subpackages get enabled as well.
Thanks @rppawlo for working on this and for the update. @GrahamBenHarper 's fix suggested above worked for me in the spack build. I will keep that as a workaround so the more correct fix involving ifdefs is not urgent for me.
I think this is resolved by #11415. I'm not sure why Github didn't automatically close this when the PR had the correct "Closes #XXXXX" in the description. I'll reopen if I see any issues, but it also seems like we're now able to go Epetra-free with MrHyDE now :)
Bug Report
I noticed my nightly build for MrHyDE (which uses Trilinos on develop as a library) now fails due to a recent change in Panzer, which I suspect is related to #11383. The failure is as follows:
Description
After some additional digging, I found out my build no longer enables
ThyraEpetraAdapters
as Panzer does not require it, but Panzer attempts to build certain Epetra objects that require ThyraEpetraAdapters anyway.Steps to Reproduce
Trilinos Develop SHA: 1e393b02bb34862a63983b954e51de8b76fc73d1 Here's the relevant lines from the configure script I was using
Here's my final list of enabled packages:
I believe this can be fixed by adding something like the following to my configure script
However, I'm waiting for the build to finish in order to confirm. The more important thing is that Panzer with Epetra support on develop seems to configure properly and then result in a build failure unless ThyraEpetraAdapters is explicitly enabled by the user.
Edit: Despite the configure complaining
Thyra_ENABLE_EpetraAdapters
was incorrect/unused, it seems that manually enabling Thyra is enough to fix the build.