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

Xpetra: In CUDA build, warning about missing return statement at end of non-void function #4878

Closed
mhoemmen opened this issue Apr 12, 2019 · 3 comments
Labels
impacting: configure or build The issue is primarily related to configuring or building pkg: Xpetra

Comments

@mhoemmen
Copy link
Contributor

@trilinos/muelu @trilinos/xpetra

.../Trilinos/packages/xpetra/sup/Matrix/Xpetra_MatrixFactory.hpp(161): warning: missing return statement at end of non-void function "Xpetra::MatrixFactory2<double, int, int, Node>::BuildCopy [with Node=Xpetra::EpetraNode]"
          detected during:
            instantiation of "Teuchos::RCP<Xpetra::Matrix<double, int, int, Node>> Xpetra::MatrixFactory2<double, int, int, Node>::BuildCopy(Teuchos::RCP<const Xpetra::Matrix<double, int, int, Node>>) [with Node=Xpetra::EpetraNode]"
.../Trilinos/packages/muelu/src/Transfers/Energy-Minimization/Solvers/MueLu_CGSolver_def.hpp(75): here
            instantiation of "void MueLu::CGSolver<Scalar, LocalOrdinal, GlobalOrdinal, Node>::Iterate(const MueLu::CGSolver<Scalar, LocalOrdinal, GlobalOrdinal, Node>::Matrix &, const MueLu::CGSolver<Scalar, LocalOrdinal, GlobalOrdinal, Node>::Constraint &, const MueLu::CGSolver<Scalar, LocalOrdinal, GlobalOrdinal, Node>::Matrix &, Teuchos::RCP<MueLu::CGSolver<Scalar, LocalOrdinal, GlobalOrdinal, Node>::Matrix> &) const [with Scalar=double, LocalOrdinal=int, GlobalOrdinal=int, Node=Kokkos_Compat_KokkosSerialWrapperNode]"
.../Trilinos/packages/muelu/src/Utils/MueLu_ETI_4arg.hpp(32): here
@mhoemmen mhoemmen added pkg: Xpetra impacting: configure or build The issue is primarily related to configuring or building labels Apr 12, 2019
@jhux2
Copy link
Member

jhux2 commented Apr 12, 2019

@mhoemmen That's weird, note that I put in TEUCHOS_UNREACHABLE_RETURN, presumably b/c nvcc was complaining that the return on 160 wasn't reachable. What's the compiler version?

147    #ifdef HAVE_XPETRA_TPETRA
148        // Underlying matrix is Tpetra
149        RCP<const TpetraCrsMatrix> oldTCrsOp = Teuchos::rcp_dynamic_cast<const TpetraCrsMatrix>(oldCrsOp);
150        if (oldTCrsOp != Teuchos::null) {
151          RCP<CrsMatrix>     newTCrsOp(new TpetraCrsMatrix(*oldTCrsOp));
152          RCP<CrsMatrixWrap> newOp    (new CrsMatrixWrap(newTCrsOp));
153           newOp->SetFixedBlockSize(A->GetFixedBlockSize());
154          return newOp;
155        }
156    #else
157        throw Exceptions::BadCast("Cast from Xpetra::Matrix to Xpetra::EpetraCrsMatrix or Xpetra::TpetraCrsMatrix failed");
158    #endif
159 
160        TEUCHOS_UNREACHABLE_RETURN(Teuchos::null); // make compiler happy
161     }
162   };

@mhoemmen
Copy link
Contributor Author

@jhux2 GCC 7.2.0, CUDA 9.2.88.

jhux2 added a commit that referenced this issue Apr 16, 2019
jhux2 added a commit that referenced this issue Apr 16, 2019
@jhux2
Copy link
Member

jhux2 commented May 6, 2019

@mhoemmen Closing as fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impacting: configure or build The issue is primarily related to configuring or building pkg: Xpetra
Projects
None yet
Development

No branches or pull requests

2 participants