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

Fix calls to deprecated Tpetra functions. #763

Closed
mperego opened this issue Nov 16, 2021 · 6 comments · Fixed by #776
Closed

Fix calls to deprecated Tpetra functions. #763

mperego opened this issue Nov 16, 2021 · 6 comments · Fixed by #776
Assignees
Labels
Trilinos Stuff related to trilinos

Comments

@mperego
Copy link
Collaborator

mperego commented Nov 16, 2021

We need to fix calls to Tpetra deprecated functions before they are removed.
We expect to have a minor version of Trilinos in mid December. After that, Tpetra will start removing the deprecated code, so, to be on the safe side, we should fix this issue before the winter break.

Below are a few some errors that occurs when Trilinos is built with

-D Tpetra_ENABLE_DEPRECATED_CODE=OFF  \
-D Xpetra_ENABLE_DEPRECATED_CODE:BOOL=OFF \

Is anybody volunteering for working on this?
@jewatkins @bartgol @kliegeois @ikalash

Errors:

In file included from /ascldap/users/mperego/Workspace/albany/sources/albany-src/src/utility/Albany_TpetraThyraUtils.hpp:4,
                 from /ascldap/users/mperego/Workspace/albany/sources/albany-src/src/Albany_NullSpaceUtils.cpp:13:
/ascldap/users/mperego/Workspace/albany/sources/albany-src/src/Albany_TpetraTypes.hpp:66:55: error: ‘local_graph_type’ in ‘Tpetra_CrsGraph’ {aka ‘class Tpetra::CrsGraph<int, long long int, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial> >’} does not name a type
   66 | static_assert (std::is_same<typename Tpetra_CrsGraph::local_graph_type,Albany::DeviceLocalGraph>::value,
      |                                                       ^~~~~~~~~~~~~~~~
/ascldap/users/mperego/Workspace/albany/sources/albany-src/src/Albany_TpetraTypes.hpp:66:96: error: template argument 1 is invalid
   66 | static_assert (std::is_same<typename Tpetra_CrsGraph::local_graph_type,Albany::DeviceLocalGraph>::value,
      |                                                                                                ^
/ascldap/users/mperego/Workspace/albany/sources/albany-src/src/Albany_TpetraTypes.hpp:69:56: error: ‘local_matrix_type’ in ‘Tpetra_CrsMatrix’ {aka ‘class Tpetra::CrsMatrix<double, int, long long int, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial> >’} does not name a type
   69 | static_assert (std::is_same<typename Tpetra_CrsMatrix::local_matrix_type,Albany::DeviceLocalMatrix<ST>>::value,
      |                                                        ^~~~~~~~~~~~~~~~~
/ascldap/users/mperego/Workspace/albany/sources/albany-src/src/Albany_TpetraTypes.hpp:69:102: error: template argument 1 is invalid
   69 | static_assert (std::is_same<typename Tpetra_CrsMatrix::local_matrix_type,Albany::DeviceLocalMatrix<ST>>::value,
In file included from /ascldap/users/mperego/Workspace/albany/sources/albany-src/src/Albany_EigendataInfoStructT.hpp:14,
                 from /ascldap/users/mperego/Workspace/albany/sources/albany-src/src/Albany_StateManager.hpp:20,
                 from /ascldap/users/mperego/Workspace/albany/sources/albany-src/src/Albany_Utils.hpp:18,
                 from /ascldap/users/mperego/Workspace/albany/sources/albany-src/src/InitialCondition.cpp:9:
/ascldap/users/mperego/Workspace/albany/sources/albany-src/src/Albany_TpetraTypes.hpp:66:55: error: ‘local_graph_type’ in ‘Tpetra_CrsGraph’ {aka ‘class Tpetra::CrsGraph<int, long long int, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial> >’} does not name a type
   66 | static_assert (std::is_same<typename Tpetra_CrsGraph::local_graph_type,Albany::DeviceLocalGraph>::value,
      |                                                       ^~~~~~~~~~~~~~~~
/ascldap/users/mperego/Workspace/albany/sources/albany-src/src/Albany_TpetraTypes.hpp:66:96: error: template argument 1 is invalid
   66 | static_assert (std::is_same<typename Tpetra_CrsGraph::local_graph_type,Albany::DeviceLocalGraph>::value,
      |                                                                                                ^
/ascldap/users/mperego/Workspace/albany/sources/albany-src/src/Albany_Utils.cpp: In function ‘void Albany::ReplaceDiagonalEntries(const Teuchos::RCP<Tpetra::CrsMatrix<double, int, long long int, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial> > >&, const Teuchos::RCP<Tpetra::Vector<double, int, long long int, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial> > >&)’:
/ascldap/users/mperego/Workspace/albany/sources/albany-src/src/Albany_Utils.cpp:203:39: error: cannot convert ‘Teuchos::ArrayView<int>’ to ‘Tpetra::CrsMatrix<double, int, long long int, Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial> >::nonconst_local_inds_host_view_type&’ {aka ‘Kokkos::View<int*, Kokkos::LayoutRight, Kokkos::Device<Kokkos::Serial, Kokkos::HostSpace> >&’}
  203 |     matrix->getLocalRowCopy(i, Indices(), Values(), NumEntries);
      |                                ~~~~~~~^~
      |                                       |
      |                                       Teuchos::ArrayView<int>
In file included from /home/mperego/Workspace/trilinos/builds/devel-shared-tmp/install/include/Tpetra_CrsMatrix.hpp:1,
                 from /ascldap/users/mperego/Workspace/albany/sources/albany-src/src/Albany_TpetraTypes.hpp:24,
                 from /ascldap/users/mperego/Workspace/albany/sources/albany-src/src/Albany_EigendataInfoStructT.hpp:14,
                 from /ascldap/users/mperego/Workspace/albany/sources/albany-src/src/Albany_StateManager.hpp:20,
                 from /ascldap/users/mperego/Workspace/albany/sources/albany-src/src/Albany_Utils.hpp:18,
                 from /ascldap/users/mperego/Workspace/albany/sources/albany-src/src/Albany_Utils.cpp:7:
/home/mperego/Workspace/trilinos/builds/devel-shared-tmp/install/include/Tpetra_CrsMatrix_decl.hpp:2665:58: note:   initializing argument 2 of ‘void Tpetra::CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>::getLocalRowCopy(LocalOrdinal, Tpetra::CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>::nonconst_local_inds_host_view_type&, Tpetra::CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>::nonconst_values_host_view_type&, size_t&) const [with Scalar = double; LocalOrdinal = int; GlobalOrdinal = long long int; Node = Kokkos::Compat::KokkosDeviceWrapperNode<Kokkos::Serial>; Tpetra::CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>::nonconst_local_inds_host_view_type = Kokkos::View<int*, Kokkos::LayoutRight, Kokkos::Device<Kokkos::Serial, Kokkos::HostSpace> >; Tpetra::CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>::nonconst_values_host_view_type = Kokkos::View<double*, Kokkos::LayoutRight, Kokkos::Device<Kokkos::Serial, Kokkos::HostSpace> >; size_t = long unsigned int]’
 2665 |                      nonconst_local_inds_host_view_type &Indices,
      |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
@mperego mperego added the Trilinos Stuff related to trilinos label Nov 16, 2021
@bartgol
Copy link
Collaborator

bartgol commented Nov 17, 2021

I am a bit swamped, so I don't think I can get to this until mid December (maybe a bit earlier). From what you say, it seems we should be able to wait till then, no?

@mperego
Copy link
Collaborator Author

mperego commented Nov 18, 2021

I am a bit swamped, so I don't think I can get to this until mid December (maybe a bit earlier). From what you say, it seems we should be able to wait till then, no?

@bartgol Yes, I think it's fine to wait until mid december. Thanks!

@mperego
Copy link
Collaborator Author

mperego commented Nov 30, 2021

@mperego
Copy link
Collaborator Author

mperego commented Jan 17, 2022

@jewatkins @ikalash I think we are good with this. In order to test the changes in the nightly builds, it might be good if you turned off the Tpetra and Xpetra deprecated code in a few nightlybuilds:

-D Tpetra_ENABLE_DEPRECATED_CODE:BOOL=OFF  \
-D Xpetra_ENABLE_DEPRECATED_CODE:BOOL=OFF \

Thanks!

@jewatkins
Copy link
Collaborator

@jewatkins @ikalash I think we are good with this. In order to test the changes in the nightly builds, it might be good if you turned off the Tpetra and Xpetra deprecated code in a few nightlybuilds:

-D Tpetra_ENABLE_DEPRECATED_CODE:BOOL=OFF  \
-D Xpetra_ENABLE_DEPRECATED_CODE:BOOL=OFF \

Thanks!

Do we know if it works with frosch now? I can turn it off on blake/weaver.

@mperego
Copy link
Collaborator Author

mperego commented Jan 17, 2022

Yes it should work with FROSch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Trilinos Stuff related to trilinos
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants