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

Moertel: Build failure with Epetra disabled #5604

Closed
Tracked by #5602
tjfulle opened this issue Jul 30, 2019 · 5 comments
Closed
Tracked by #5602

Moertel: Build failure with Epetra disabled #5604

tjfulle opened this issue Jul 30, 2019 · 5 comments
Labels
pkg: Moertel type: bug The primary issue is a bug in Trilinos code or tests

Comments

@tjfulle
Copy link
Contributor

tjfulle commented Jul 30, 2019

Bug Report

@trilinos/moertel

Description

Moertel requires that if any of

  • EpetraExt
  • Amesos
  • AztecOO
  • Ifpack
  • ML

is enabled, they all must be enabled.

A problem arises in the following configuration:

-D Trilinos_ENABLE_Tpetra=ON
-D Trilinos_ENABLE_Epetra=OFF
-D Trilinos_ENABLE_ALL_FORWARD_DEP_PACKAGES=ON

because Tpetra is pervasive throughout Trilinos, one of EpetraExt, Amesos, AztecOO, Ifpack, or ML gets enabled due to downstream code being enabled. So is Moertel. The configuration fails because I explicitly disabled Epetra.

@bartlettroscoe Is there a smarter way for Moertel to enforce this requirement? In this case, I'd rather Moertel not be enabled implicitly if its dependencies are not met. Perhaps some setting/logic in Moertel's cmake/Dependencies.cmake that expresses the interconnection between the packages list above that, if any one of the packages is disabled, instructs TriBITs to not enable Moertel?

Related

@tjfulle tjfulle added the type: bug The primary issue is a bug in Trilinos code or tests label Jul 30, 2019
@bartlettroscoe
Copy link
Member

@tjfulle asked:

Perhaps some setting/logic in Moertel's cmake/Dependencies.cmake that expresses the interconnection between the packages list above that, if any one of the packages is disabled, instructs TriBITs to not enable Moertel?

Yes, the general strategies for doing this are described in:

What you want to do is to put in logic that if any of the these packages are explicitly disabled (i.e. ("${${PROJECT_NAME}_ENABLE_<PackageName>}" NOT STREQUAL "" AND NOT ${PROJECT_NAME}_ENABLE_<PackageName>) is TRUE) then set set(${PROJECT_NAME}_ENABLE_Mortel OFF) (and print that you are doing that please).

From looking at:

it might also work to put this logic in Trilinos/packages/mortel/cmake/Dependencies.cmake (that files gets processed before the TriBITS package enable/disable logic is processed). Don't remember a reason not to do that so we could try that as well (and could update documentation to offer this as an option as well).

Does that make sense? If not, I can provide a PR that does this. It is just a few lines of code.

@tjfulle
Copy link
Contributor Author

tjfulle commented Jul 30, 2019

Thanks @bartlettroscoe ! I'll go for the first route, since it will be quick and easy and is holding up work on Tpetra's deprecations.

@tjfulle
Copy link
Contributor Author

tjfulle commented Jul 31, 2019

Turns out -D Trilinos_ENABLE_ALL_FORWARD_DEP_PACKAGES=ON explicitly sets Tpetra_ENABLE_Moertel=ON (for the original configuration shown), ie, there is no way to detect if the package is set only because it is a forward dependent of Tpetra and not explicitly by the user. There might be a way to do what I want in moertel/cmake/Dependencies.cmake, but it's not a priority.

@bartlettroscoe
Copy link
Member

@tjfulle said:

Turns out -D Trilinos_ENABLE_ALL_FORWARD_DEP_PACKAGES=ON explicitly sets Tpetra_ENABLE_Moertel=ON (for the original configuration shown), ie, there is no way to detect if the package is set only because it is a forward dependent of Tpetra and not explicitly by the user.

Can you give a concrete example of what you are seeing? That option should not enable any packages that have been disabled like Moertel (which should be disabled if any of its dependent packages are explicitly disabled as described above). See:

@tjfulle
Copy link
Contributor Author

tjfulle commented Aug 16, 2019

Turns out the issue was that Epetra was listed as an optional package when, in fact, it should still be a required package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: Moertel type: bug The primary issue is a bug in Trilinos code or tests
Projects
None yet
Development

No branches or pull requests

3 participants