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

Muelu: Interoperability with Epetra and Tpetra #11201

Closed
bangerth opened this issue Oct 27, 2022 · 14 comments
Closed

Muelu: Interoperability with Epetra and Tpetra #11201

bangerth opened this issue Oct 27, 2022 · 14 comments
Assignees
Labels
pkg: MueLu pkg: Xpetra type: bug The primary issue is a bug in Trilinos code or tests

Comments

@bangerth
Copy link
Contributor

Bug Report

@trilinos/muelu

Description

As discussed at the TUG meeting yesterday, here is the issue the deal.II project is facing with Muelu (to the best of my understanding -- @Rombur is the real expert):

@bangerth bangerth added the type: bug The primary issue is a bug in Trilinos code or tests label Oct 27, 2022
@github-actions github-actions bot added this to Backlog in MueLu Oct 27, 2022
@github-actions github-actions bot added this to Backlog in Tpetra Oct 27, 2022
@cgcgcg
Copy link
Contributor

cgcgcg commented Oct 27, 2022

@trilinos/muelu

@cgcgcg
Copy link
Contributor

cgcgcg commented Oct 27, 2022

Ok, I see. Epetra and Tpetra can be used in the same build, but that requires the GO types to match, i.e. GO=int. That should also work in deal.ii. However, using 2 different global ordinal types at the same time is not allowed. I think that's reasonable. Does deal.ii have a required dependency on Epetra? Cause you should be able to disable Epetra and still use MueLu with Tpetra.

@bangerth
Copy link
Contributor Author

@cgcgcg We currently still rely on Epetra. The long-term plan is to move to Tpetra, but we're not there yet.

Since Trilinos relies on its own decision in choosing what GO is, deal.II has no control over what GO is or should be. The original issue is rooted in xSDK choosing a type for GO that resulted in Muelu disabling its Epetra interfaces. As a consequence, if you build Trilinos via xSDK, you end up with a Muelu we can't use.

Where is the place inside Muelu where you decide which GO you want to use? Could Muelu's GO be chosen as (i) the one from Epetra if Tpetra is not enabled, (ii) the larger of Epetra's and Tpetra's GO type if both of these are enabled? I imagine that there must be a place in Muelu that "inherits" the GO type from one or the other place. Maybe one could tweak that "inheritance".

@cgcgcg
Copy link
Contributor

cgcgcg commented Oct 27, 2022

We require Tpetra to be enabled for MueLu, and that MueLu uses Tpetra's GO.

Currently I don't think that within the constraints of xSDK there is a way to use MueLu with Tpetra and Epetra. xSDK wants 64 bit GO. Epetra does not provide that (there are caveats to this statement), so Epetra should be disabled in xSDK. (But for practical reasons it obviously isn't.)

I was thinking more about ways to simplify your transition. Outside of xSDK you could build deal.ii with GO=int and Epetra+Tpetra and perform bake-offs that are fair.

@bangerth
Copy link
Contributor Author

Actually, what we typically do in large computations is use Epetra through its 64-bit interfaces. Do you have an idea how many places Muelu has that call Epetra functions? Depending on whether Tpetra uses 32- or 64-bit integers, one could call either the 32- or 64-bit Epetra functions.

@cgcgcg
Copy link
Contributor

cgcgcg commented Oct 27, 2022

Hm, I haven't tried the Xpetra/MueLu support for 64 bit Epetra. I'll give that a shot an see what actually works.

@bangerth
Copy link
Contributor Author

It actually works reasonably well for us. Depending on whether deal.II uses 32- or 64-bit GO types, we either call the 32- or 64-bit Epetra functions. Support in Epetra for that is complete and works well.

@GrahamBenHarper
Copy link
Contributor

We require Tpetra to be enabled for MueLu, and that MueLu uses Tpetra's GO.

Is this actually on the MueLu side, or is this more related to how Xpetra handles things?

@csiefer2
Copy link
Member

csiefer2 commented Oct 27, 2022

@bangerth I tried Epetra-64 support in Xpetra/MueLu a few years ago and it took me a while to even get the code to compile. The tests were failing all over the place.

You can look at this old half-done branch to see what I had to change to get MueLu to compile

https://github.com/trilinos/Trilinos/tree/xpetra-epetra64

@GrahamBenHarper Neither Xpetra nor MueLu correctly supports Epetra64 everywhere. Or at least it didn't in 2019.

@cgcgcg
Copy link
Contributor

cgcgcg commented Oct 28, 2022

As far as I can tell, the Xpetra support for Epetra 64 doesn't build. So GO=int is the only way to have both Tpetra and Epetra enabled in MueLu.

@bangerth
Copy link
Contributor Author

I had not realized that MueLu supports both Epetra and Tpetra via Xpetra, and that Xpetra only supports 32-bit Epetra. That's a shame, but I understand that that is not worth fixing. Thanks for talking this through with me.

I suppose there isn't much that can be done about the issue then. Should we close the issue?

@cgcgcg
Copy link
Contributor

cgcgcg commented Oct 31, 2022

Sorry that we couldn't provide a nicer solution. Once deal.ii can make its Epetra dependency optional it should be easier to set this up.

@cgcgcg cgcgcg closed this as completed Oct 31, 2022
MueLu automation moved this from Backlog to Done Oct 31, 2022
Tpetra automation moved this from Backlog to Done Oct 31, 2022
@GrahamBenHarper
Copy link
Contributor

I have a recent build of deal.II on our clusters. If I could find time, I would absolutely love to help... however, time is always the problem.

@mayrmt
Copy link
Member

mayrmt commented Oct 31, 2022

dealii/dealii#12774

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

No branches or pull requests

5 participants