koecher/candi-origin

trilinos 12 vs 11 and platforms with different versions

Closed this issue · 13 comments

tjhei commented

I would like to support ubuntu12 (my desktop at work, old I now) and I can not compile trilinos 12 (gcc too old). Are you interested in accepting a separate trilinos11 package? See https://github.com/tjhei/candi/blob/experimenting/deal.II/packages/trilinos11.package

Or is there a different way you want to support different versions of packages? Can I specify a version inside a .platform and have trilinos.package be smart enough to install different versions?

Since I'm compiling my needed compilers (gcc + mpi) with candi for my needs, I do not face this problem. But I'll think about.

@koecher have you decided how to tackle this problem?

This is hard to reach, since Trilinos+SuperLU_dist has a different patch for Trilinos 11.
I would like to prefer to keep it in one file for the trilinos package, with branches for version 11 respectively 12.
Unfortunately, the patch for the current SuperLU_dist from my side is not finished so far, and presumably it will take a little longe since I have to finish other things firstly.

I have thought about this more. I think that having everything in one file is going to make things unnecessary complicated (where do plan to set the version that should be used?). Why not keeping the trilinos package and keep everything that's common in there (which would be almost everything) and then, create trilinos11 and trilinos12. These two files would be very small. Basically they would contain the version number, the checksum, and maybe a few flags and they would source the trilinos package. I think this would require the least amount of change.

tjhei commented

Agreed. But creating files with different names breaks the parsing of the DEAL_CONFOPTS variable. The only option I see is a trilinos.package that includes trilinos11 or trilinos12 depending on a setting that is provided in the platform file (or by the user).

That's two lines to change. It's the same logic as turning off parmetis when metis is off. When trilinos is off, we can turn off trilinos11 and trilinos12.

@Rombur I think the decision for the Trilinos version should be made by the user at top level, that would be the project-deal.II.cfg file. Then it would be easy to find the correct file (trilinos11 or trilinos12) in the trilinos.package file. Keeping trilinos.package would not influence the rest of the features.

@koecher But why do you want the user to choose the Trilinos version? I don't see a good reason to pick Trilinos 11 instead of Trilinos 12 except if you can't compile Trilinos 12 ofc. And you know that information once the distribution is determined.

@tjhei , @Rombur I have created a new branch, "trilinos-multiversion" which looks good. But I only have tested it minimally for v11 on my notebook so far. If you have changes, please make a PR on the new branch.

If an user wants to prepare locally a simulation for a cluster which allows only trilinos 11 then there is maybe the need to force candi to install this version, even if the platform supports v12

I see, what about adding TRILINOS_MAJOR_VERSION=AUTO that would automatically determined the version of Trilinos that is compatible. This could be the default behavior but the user can always decide which version he wants. I can look into this later today if it is OK with you.

sounds good

Closed by PR #38