trilinos / Trilinos

Primary repository for the Trilinos Project
https://trilinos.org/
Other
1.2k stars 565 forks source link

Tpetra: Albany warning-free build broken #13107

Open ikalash opened 3 months ago

ikalash commented 3 months ago

It looks like there are some unused variables in Tpetra causing the Albany nightly warning-free build to break: https://sems-cdash-son.sandia.gov/cdash/viewBuildError.php?buildid=83786

[Trilinos/packages/tpetra/core/src/Tpetra_CrsMatrix_def.hpp:5095](https://blob/master/Trilinos/packages/tpetra/core/src/Tpetra_CrsMatrix_def.hpp#L5095):20: error: unused variable 'nrows' [-Werror=unused-variable]

Could someone please remedy this?

@trilinos/tpetra

brian-kelley commented 3 months ago

@ikalash #13090 will fix this. Hopefully it'll pass the autotester today

ikalash commented 3 months ago

Thank you @brian-kelley !

brian-kelley commented 3 months ago

@ikalash That's merged now, when the nightly build runs again can you confirm that this is fixed?

ikalash commented 3 months ago

Thanks @brian-kelley ! I will check tomorrow after the nightlies run and close the issue if it is fixed.

ikalash commented 3 months ago

Now there are issues with Ifpack2:

https://sems-cdash-son.sandia.gov/cdash/viewBuildError.php?buildid=88080

[Trilinos/packages/ifpack2/src/Ifpack2_RILUK_def.hpp:615](https://blob/master/Trilinos/packages/ifpack2/src/Ifpack2_RILUK_def.hpp#L615):38: error: comparison of integer expressions of different signedness: 'int' and 'std::vector<Kokkos::View<int*, Kokkos::LayoutLeft, Kokkos::Device<Kokkos::Serial, Kokkos::HostSpace>, Kokkos::Experimental::EmptyViewHooks, Kokkos::MemoryTraits<0> >, std::allocator<Kokkos::View<int*, Kokkos::LayoutLeft, Kokkos::Device<Kokkos::Serial, Kokkos::HostSpace>, Kokkos::Experimental::EmptyViewHooks, Kokkos::MemoryTraits<0> > > >::size_type' {aka 'long unsigned int'} [-Werror=sign-compare]

Do you work on Ifpack2 @brian-kelley , or I should open a separate ticket?

brian-kelley commented 3 months ago

@ikalash It doesn't have to be a separate issue. I grabbed the warning flags from that build and will fix all the warnings I see. If these two got through PR testing there are probably more...

ikalash commented 3 months ago

@brian-kelley : Ah ok. Let me know if it would be helpful to have build scripts to reproduce the issue.

brian-kelley commented 3 months ago

I got the exact -W... flags you are using but kind of guessed on what Trilinos packages are enabled so if you have anything that's not in this list, then maybe I do need the Trilinos build script:

Kokkos Teuchos KokkosKernels RTOp Sacado Zoltan Shards Tpetra TrilinosSS Thyra Xpetra
Galeri Pamgen Zoltan2Core Belos ShyLU_Node Amesos2 Anasazi Ifpack2 Stratimikos Teko
Intrepid2 Compadre NOX MueLu Zoltan2Sphynx Zoltan2 Stokhos
jhux2 commented 3 months ago

@sebrowne Would it be reasonable to merge in Albany's warning flags to the warnings-as-errors PR test after @brian-kelley finishes?

sebrowne commented 3 months ago

Yes, it would. I'm guessing -Werror=unused-variable would be enough for this? Or do we want to add more? I'm all for enabling every warning-as-error that we can as a general rule, assuming that the development community is willing to make the initial effort to get the warnings cleaned

jhux2 commented 3 months ago

@brian-kelley What error flags did you grab?

brian-kelley commented 3 months ago
-DCMAKE_CXX_FLAGS:STRING="-Wall -Wno-clobbered -Wno-vla -Wno-pragmas -Wno-unknown-pragmas -Wno-unused-local-typedefs -Wno-literal-suffix -Wno-deprecated-declarations -Wno-misleading-indentation -Wno-int-in-bool-context -Wno-maybe-uninitialized -Wno-nonnull-compare -Wno-address -Wno-inline -Wno-return-type -Wno-mismatched-new-delete -Wno-catch-value -Wno-use-after-free -Werror"
sebrowne commented 3 months ago

We cannot currently turn on -Werror unqualified because of the way that the deprecated package warnings were implemented. But I'm happy to set up a PR that sets each of those warnings to errors individually in the interim. Should have much the same effect. Does that work?

jhux2 commented 3 months ago

Thanks, @sebrowne!

ikalash commented 3 months ago

Here is the Albany flags in the warning-free build: https://github.com/sandialabs/Albany/blob/master/doc/dashboards/blake.sandia.gov/do-cmake-trilinos-gcc-debug

 -D CMAKE_CXX_FLAGS:STRING='-Wall -Wno-clobbered -Wno-vla -Wno-pragmas -Wno-unknown-pragmas -Wno-unused-local-typedefs -Wno-literal-suffix -Wno-deprecated-declarations -Wno-misleading-indentation -Wno-int-in-bool-context -Wno-maybe-uninitialized -Wno-nonnull-compare -Wno-address -Wno-inline -Wno-return-type -Wno-mismatched-new-delete -Wno-catch-value -Wno-use-after-free -Werror' \
jhux2 commented 2 months ago

@sebrowne Are there any non-blocking builds that we can check for warnings?

sebrowne commented 2 months ago

@jhux2 can you be more clear with what you're looking for, I don't think I fully understand what you're asking. I did just schedule getting the warnings-as-errors story working, @achauphan should be starting it soon.

jhux2 commented 2 months ago

can you be more clear with what you're looking for, I don't think I fully understand what you're asking. I did just schedule getting the warnings-as-errors story working, @achauphan should be starting it soon.

That sounds great, thanks. I was wondering if there might already be a build somewhere that had these type of warnings as errors.

sebrowne commented 2 months ago

That sounds great, thanks. I was wondering if there might already be a build somewhere that had these type of warnings as errors.

Not really at the moment, at least not that I can remember.