-
Notifications
You must be signed in to change notification settings - Fork 578
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
Teko: configuration error with deprecated code off and -D Tpetra_INST_INT_UNSIGNED_LONG:BOOL=ON #6355
Comments
Teko is probably hard coded to use one global ordinal type. I’m not really sure about changes propagated as part of the DEPRECATED refactor. I will do a quick check to see if there is something easy. Otherwise, I probably have no bandwidth for this until late January at the earliest.
…Sent from my iPad
On Nov 25, 2019, at 11:21 PM, Irina K. Tezaur <[email protected]> wrote:
I attempted to switch Albany to turn off Tpetra and Xpetra deprecated code in the Albany nightlies (with @mperego<https://github.com/mperego>). In some of the builds, I need to have the flag:
-D Tpetra_INST_INT_UNSIGNED_LONG:BOOL=ON \
in order to avoid DTK-related compilation errors. I also have Teko on, as it is used in some of the tests that use DTK. Doing so produces the following error:
Processing enabled package: Teko (Libs)
CMake Error at packages/teko/CMakeLists.txt:25 (MESSAGE):
Teko currently requires that Tpetra enable either GlobalOrdinal (GO) = long
long or GO = int. Please set Tpetra_INST_INT_LONG_LONG=ON to enable GO =
long long, or Tpetra_INST_INT_INT=ON to enable GO = int. If you would like
to use other GO types, please contact the Teko developers.
Is it possible to have a build with the following 4 options simultaneously?
-D Tpetra_ENABLE_DEPRECATED_CODE:BOOL=OFF \
-D Xpetra_ENABLE_DEPRECATED_CODE:BOOL=OFF \
-D Trilinos_ENABLE_Teko:BOOL=ON \
-D Tpetra_INST_INT_LONG_LONG=ON \
@trilinos/teko<https://github.com/orgs/trilinos/teams/teko>
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub<#6355?email_source=notifications&email_token=ACHYSH3GN64Z2PVO4AUIODDQVS55FA5CNFSM4JRTC5QKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H4AP24A>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACHYSH6HYT4G3EYLDBV3Y4LQVS55FANCNFSM4JRTC5QA>.
|
After glancing at the code, I’m not sure what the issue is. I thought I understood what happened with the refactor, but clearly not. Can you speak to what Albany needs, and what you are trying to accomplish.
…Sent from my iPad
On Nov 26, 2019, at 7:13 AM, [email protected] wrote:
Teko is probably hard coded to use one global ordinal type. I’m not really sure about changes propagated as part of the DEPRECATED refactor. I will do a quick check to see if there is something easy. Otherwise, I probably have no bandwidth for this until late January at the earliest.
Sent from my iPad
On Nov 25, 2019, at 11:21 PM, Irina K. Tezaur <[email protected]> wrote:
I attempted to switch Albany to turn off Tpetra and Xpetra deprecated code in the Albany nightlies (with @mperego<https://github.com/mperego>). In some of the builds, I need to have the flag:
-D Tpetra_INST_INT_UNSIGNED_LONG:BOOL=ON \
in order to avoid DTK-related compilation errors. I also have Teko on, as it is used in some of the tests that use DTK. Doing so produces the following error:
Processing enabled package: Teko (Libs)
CMake Error at packages/teko/CMakeLists.txt:25 (MESSAGE):
Teko currently requires that Tpetra enable either GlobalOrdinal (GO) = long
long or GO = int. Please set Tpetra_INST_INT_LONG_LONG=ON to enable GO =
long long, or Tpetra_INST_INT_INT=ON to enable GO = int. If you would like
to use other GO types, please contact the Teko developers.
Is it possible to have a build with the following 4 options simultaneously?
-D Tpetra_ENABLE_DEPRECATED_CODE:BOOL=OFF \
-D Xpetra_ENABLE_DEPRECATED_CODE:BOOL=OFF \
-D Trilinos_ENABLE_Teko:BOOL=ON \
-D Tpetra_INST_INT_LONG_LONG=ON \
@trilinos/teko<https://github.com/orgs/trilinos/teams/teko>
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub<#6355?email_source=notifications&email_token=ACHYSH3GN64Z2PVO4AUIODDQVS55FA5CNFSM4JRTC5QKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H4AP24A>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACHYSH6HYT4G3EYLDBV3Y4LQVS55FANCNFSM4JRTC5QA>.
|
@ikalash wrote:
Uh oh. I was under the impression that DTK no longer had that requirement. @rppawlo , would you happen to know if there is a way to tell DTK not to use unsigned long as the global index type? @ikalash , if I remember right, the history is that DTK wanted to use the same global index type that STK uses. (My personal view is that there's no need for two interoperating packages to share index types. However, Tpetra's design circa 10 years ago unfortunately gave users the impression that they could and should change Tpetra's global index type to match that of any other library with which they wanted to interact. Sometimes design choices that intend "flexibility" end up causing rigidity instead.) |
I haven't worked on DTK in a long time. Albany is using DTK version 2.0 that requires the unsigned long GO. They would have to upgrade to the latest DTK to use an arbitrary GO. cc'ing @sslattery to make sure that is still the case. |
@ikalash Another thing you could try is disabling all the other GlobalOrdinal types, and just using
|
Thanks for the suggestions. @mhoemmen , your suggestion does not fix the problem. Regarding @eric-c-cyr 's question:
I was wondering the same thing. Can someone explain to me why turning off the deprecated code would cause this error to crop up, when it's not there w/o the deprecated code? @rppawlo : I remember now past discussions about updating DTK. I tried it once and got a compilation error, so we kept the old DTK. Maybe we should look at upgrading it. CC'ing @lxmota for whom this issue would also be relevant. |
tpetra now only allows a single GO that is picked at configure time. When you turn off deprecated code, you are stuck with choosing one GO. Albany has always built with at least two GOs. Unfortunately DTK 2.0 requires unsigned long and it looks like that GO isn't working for part of the trilinos stack. You could just try removing the teko configure check at packages/teko/CMakeLists.txt:25 and see if the build works. Maybe teko required a specific GO at one point but now works with any. Maybe the check is no longer needed? |
having to do with DTK. Seems we will need to switch to newer DTK which will require some effort. Please see trilinos/Trilinos#6355 for more details.
Yes, it seems like there is only a single GO used in Teko. I feel we could probably just snag the one from Tpetra at this point.
…Sent from my iPad
On Nov 26, 2019, at 12:11 PM, Roger Pawlowski <[email protected]> wrote:
tpetra now only allows a single GO that is picked at configure time. When you turn off deprecated code, you are stuck with choosing one GO. Albany has always built with at least two GOs. Unfortunately DTK 2.0 requires unsigned long and it looks like that GO isn't working for part of the trilinos stack. You could just try removing the teko configure check at packages/teko/CMakeLists.txt:25 and see if the build works. Maybe teko required a specific GO at one point but now works with any. Maybe the check is no longer needed?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#6355?email_source=notifications&email_token=ACHYSH3NW6YIORFLWIZ3DHDQVVYG7A5CNFSM4JRTC5QKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFHD75Q#issuecomment-558776310>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACHYSHYD27IHMPSZF7ADHW3QVVYG7ANCNFSM4JRTC5QA>.
|
@mhoemmen : same errors as before from Teko with your options + the deprecated code options:
Here are the options I have:
|
Perhaps we comment out the offending code in the teko/CMakeLists.txt file. Then in teko/src/Teko_ConfigDefs.hpp define the GO to be whatever is required from Tpetra (not sure what the line is, suggest asking @mhoemmen<https://github.com/mhoemmen>)
From: "Irina K. Tezaur" <[email protected]>
Reply-To: trilinos/Trilinos <[email protected]>
Date: Tuesday, November 26, 2019 at 8:26 PM
To: trilinos/Trilinos <[email protected]>
Cc: "Cyr, Eric C" <[email protected]>, Mention <[email protected]>
Subject: [EXTERNAL] Re: [trilinos/Trilinos] Teko: configuration error with deprecated code off and -D Tpetra_INST_INT_UNSIGNED_LONG:BOOL=ON (#6355)
@mhoemmen<https://github.com/mhoemmen> : same errors as before from Teko with your options + the deprecated code options:
CMake Error at packages/teko/CMakeLists.txt:25 (MESSAGE):
Teko currently requires that Tpetra enable either GlobalOrdinal (GO) = long
long or GO = int. Please set Tpetra_INST_INT_LONG_LONG=ON to enable GO =
long long, or Tpetra_INST_INT_INT=ON to enable GO = int. If you would like
to use other GO types, please contact the Teko developers.
Here are the options I have:
-D Tpetra_ENABLE_DEPRECATED_CODE:BOOL=OFF \
-D Xpetra_ENABLE_DEPRECATED_CODE:BOOL=OFF \
…-D Tpetra_INST_INT_UNSIGNED_LONG:BOOL=ON \
-D Tpetra_INST_INT_LONG:BOOL=OFF \
-D Tpetra_INST_INT_LONG_LONG:BOOL=OFF \
-D Tpetra_INST_INT_INT:BOOL=OFF \
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#6355?email_source=notifications&email_token=ACHYSH5BKNIA67IRRG4AFLTQVXSE5A5CNFSM4JRTC5QKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFIFCQA#issuecomment-558911808>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACHYSH4G2DYFFSV3VSZQGXDQVXSE5ANCNFSM4JRTC5QA>.
|
@eric-c-cyr wrote:
That header file already includes namespace Teko {
using LO = Tpetra::Map<>::local_ordinal_type;
using GO = Tpetra::Map<>::global_ordinal_type;
using NT = Tpetra::Map<>::node_type;
} (Note the C++11 type alias syntax; it should replace all use of |
That looks exactly right, @ikalash<https://github.com/ikalash> is this something you could try? I can help over the phone/skype (maybe on Friday). You can always send a patch too.
From: Mark Hoemmen <[email protected]>
Reply-To: trilinos/Trilinos <[email protected]>
Date: Tuesday, November 26, 2019 at 10:38 PM
To: trilinos/Trilinos <[email protected]>
Cc: "Cyr, Eric C" <[email protected]>, Mention <[email protected]>
Subject: [EXTERNAL] Re: [trilinos/Trilinos] Teko: configuration error with deprecated code off and -D Tpetra_INST_INT_UNSIGNED_LONG:BOOL=ON (#6355)
@eric-c-cyr<https://github.com/eric-c-cyr> wrote:
...then in teko/src/Teko_ConfigDefs.hpp define the GO to be whatever is required from Tpetra (not sure what the line is, suggest asking @mhoemmen<https://github.com/mhoemmen>)
That header file already includes Tpetra_Map_decl.hpp, so you can just get the default GO from Map, in the same way that you already get the default node_type from Map.
namespace Teko {
using LO = Tpetra::Map<>::local_ordinal_type;
using GO = Tpetra::Map<>::global_ordinal_type;
using NT = Tpetra::Map<>::node_type;
}
Note the C++11 type alias syntax; it should replace all use of typedef in new code.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#6355?email_source=notifications&email_token=ACHYSH76TY4RZ65BNIQBTTTQVYBUTA5CNFSM4JRTC5QKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFILMDA#issuecomment-558937612>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACHYSH6IZGEZGKQORSVAOI3QVYBUTANCNFSM4JRTC5QA>.
|
@mhoemmen , @eric-c-cyr : thanks for the suggestions! Yes I can give this a try. My parents are in town for Thanksgiving so I don't know if I'll get to it this week. If not, definitely Monday. I imagine if I implement the suggestion and it fixes the problem, I can submit a PR to get it into the main code? |
Please do so that would be a great help. I may be try this while digesting this weekend and if I do I’ll send you a patch directly.
From: "Irina K. Tezaur" <[email protected]>
Reply-To: trilinos/Trilinos <[email protected]>
Date: Wednesday, November 27, 2019 at 12:48 AM
To: trilinos/Trilinos <[email protected]>
Cc: "Cyr, Eric C" <[email protected]>, Mention <[email protected]>
Subject: [EXTERNAL] Re: [trilinos/Trilinos] Teko: configuration error with deprecated code off and -D Tpetra_INST_INT_UNSIGNED_LONG:BOOL=ON (#6355)
@mhoemmen<https://github.com/mhoemmen> , @eric-c-cyr<https://github.com/eric-c-cyr> : thanks for the suggestions! Yes I can give this a try. My parents are in town for Thanksgiving so I don't know if I'll get to it this week. If not, definitely Monday. I imagine if I implement the suggestion and it fixes the problem, I can submit a PR to get it into the main code?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#6355?email_source=notifications&email_token=ACHYSH6XVHNMN25COY432K3QVYQ3XA5CNFSM4JRTC5QKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFITRIQ#issuecomment-558971042>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACHYSH5UZ3YPF54PPXX73QLQVYQ3XANCNFSM4JRTC5QA>.
|
Sounds like a plan! I’ll keep you posted. |
@eric-c-cyr , @mhoemmen : sorry about the delay - I finally had a chance to try your proposed fix, namely modify Teko_ConfigDefs.hpp to look as follows:
and make some changes to get the Teko tests/examples to compile and not show warnings when compiled. Unfortunately this leads to some failures in Albany. Some of them seem to have to do with us not allocating large enough graphs for some problems involving DTK/our Schwarz coupling method, which is not your problem, but I noticed a few other failures namely this one:
It looks like a routine in Tpetra_ComputeGatherMap.h is being called with unsigned int long, which is not supported. I'm a bit confused as to why my changes to Teko would produce this error. Without the changes, the test runs correctly (even with the deprecated Tpetra/Xpetra code off, not on my machine, which has DTK on, but on other machines, where DTK is off, so I can build everything just fine). Thoughts? BTW, I'm in ABQ next week so we could look at this together sometime if it's easier and you have time. |
Possibly in the matrix multiply? Does your preconditioner do any matrix multiplies or additions in setup? If you have a debug build you could do an assertion check if its not to costly.
I’ll be here a bit on Monday and Tuesday. But my free time is limited. If you want to meet we should schedule something.
…Sent from my iPad
On Dec 6, 2019, at 6:51 PM, Irina K. Tezaur <[email protected]> wrote:
@eric-c-cyr<https://github.com/eric-c-cyr> , @mhoemmen<https://github.com/mhoemmen> : sorry about the delay - I finally had a chance to try your proposed fix, namely modify Teko_ConfigDefs.hpp to look as follows:
namespace Teko {
typedef double ST;
using LO = Tpetra::Map<>::local_ordinal_type;
using GO = Tpetra::Map<>::global_ordinal_type;
using NT = Tpetra::Map<>::node_type;
and make some changes to get the Teko tests/examples to compile and not show warnings when compiled. Unfortunately this leads to some failures in Albany. Some of them seem to have to do with us not allocating large enough graphs for some problems involving DTK/our Schwarz coupling method, which is not your problem, but I noticed a few other failures namely this one:
3: ************************************************************************
3: -- Nonlinear Solver Step 0 --
3: ||F|| = 3.633e+08 step = 0.000e+00 dx = 0.000e+00
3: ************************************************************************
3:
3: CALCULATING FORCING TERM
3: Method: Constant
3: Forcing Term: 0.0001
3:
3: p=2: *** Caught standard std::exception of type 'std::logic_error' :
3:
3: /home/ikalash/nightlyAlbanyTests/Results/Trilinos/build/install/include/Tpetra_ComputeGatherMap.hpp:84:
3:
3: Throw number = 1
3:
3: Throw test that evaluated to true: true
3:
3: Not implemented for IntType != int, long, or long long
It looks like a routine in Tpetra_ComputeGatherMap.h is being called with unsigned int long, which is not supported. I'm a bit confused as to why my changes to Teko would produce this error. Without the changes, the test runs correctly (even with the deprecated Tpetra/Xpetra code off, not on my machine, which has DTK on, but on other machines, where DTK is off, so I can build everything just fine). Thoughts? BTW, I'm in ABQ next week so we could look at this together sometime if it's easier and you have time.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#6355?email_source=notifications&email_token=ACHYSHZQ6GB3OZBXJRDL35DQXL6SJA5CNFSM4JRTC5QKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGF24YY#issuecomment-562802275>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACHYSH5LAL4RSK27BOC7REDQXL6SJANCNFSM4JRTC5QA>.
|
Just to be clear, the tests with error message don't use teko. That's what I don't understand... |
@ikalash This is why we don't want to support random GlobalOrdinal types ;-) Trilinos doesn't test |
@mhoemmen : I agree that at this level it's a @trilinos/tpetra issue. It seems to me that the current behavior is not ideal, if the code allows you to build with the unsigned long type (which I presume it would even w/o my change to Teko, if Teko were disabled I think), but then you may get run-time errors. If you prefer not to support types like I've started looking into switching to a newer DTK, but am stuck for the moment. I'm getting various compilation errors that don't seem to have anything to do with Albany - I've opened a DTK issue on this and am waiting to hear back from Stuart Slattery on it. |
The unimplemented routine is getMpiDatatype |
@kddevin : that would be great if there's a temporary fix while I figure out how to get the newer DTK versions (which should build with a different GO than If you have a PR/snippet of code I can hack into my tpetra version with the additional getMpiDataType routine, I can test if that's sufficient. It's conceivable other issues will crop up with this fix that we're not aware of now, but hopefully not. |
Thanks for being willing to try a patch, @ikalash .
Sorry I don't have a way to reproduce your error and test this for you. |
Thanks @kddevin! I'll test it and get back to you. I wasn't expecting you to reproduce/test the fix - happy to do that myself. I'll post back once I've had a chance to do it. |
@kddevin Thanks -- I'll check whether |
@kddevin The MPI 3 standard includes |
@kddevin : sorry for the delay in my response - I'm in a workshop for most of this week. It appears your proposed fix resolves my issue. Per Mark's comment, do we want to include the unsigned and unsigned long long version of getMpiDataType too? Also, should I create a PR for the Tpetra (and Teko) changes? I am still doing some testing before this would be ready, in particular, it appears my changes broke a couple of the Teko tests, which I need to investigate/fix. |
…ossible to compile Trilinos with Tpetra_INST_INT_UNSIGNED_LONG:BOOL=ON . There are still some issues to be addressed.
@kddevin , @mhoemmen , @eric-c-cyr : I created a branch in which I implemented the proposed changes by the three of you above: https://github.com/trilinos/Trilinos/tree/ikalash-tpetra-teko-unsigned-long . I'm concerned about some of the logic throughout Teko/Tpetra that may not be right with
and
I suppose this would have been an issue in the develop branch with Also, there are some test failures in Tpetra:
These have to do with the issue I describe above, I think - I |
Just to follow up on my previous comment - I get a bunch of Tpetra test failures when building the develop branch (w/o any of my changes) with the options
It's pretty much the same failures:
So I guess the |
@ikalash wrote:
Did you actually mean to write |
@mhoemmen : no, I meant |
@ikalash wrote:
This is ... unsurprising, given that the automatic PR tests have never enabled |
@mhoemmen : thanks for the explanations. I do need DTK v2 to work for awhile (a few months, maybe?). I'm still trying to figure out what the issues I'm having with DTK v3 and newer are being caused by. Could we merge my PR in while I'm try to get the code to work with the newer DTK? |
@ikalash Did you actually make a PR out of the branch https://github.com/trilinos/Trilinos/tree/ikalash-tpetra-teko-unsigned-long ? or are you referring to a different PR? |
Yes, exactly, that is the PR I'm referring to. I added you as one of the reviewers. |
This issue has had no activity for 365 days and is marked for closure. It will be closed after an additional 30 days of inactivity. |
This issue was closed due to inactivity for 395 days. |
I attempted to switch Albany to turn off Tpetra and Xpetra deprecated code in the Albany nightlies (with @mperego). In some of the builds, I need to have the flag:
in order to avoid DTK-related compilation errors. I also have Teko on, as it is used in some of the tests that use DTK. Doing so produces the following error:
Is it possible to have a build with the following 4 options simultaneously?
@trilinos/teko
The text was updated successfully, but these errors were encountered: