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

solve() method implemented in hiopLinSolver.hpp file. #58

Closed
pelesh opened this issue Jul 15, 2020 · 1 comment
Closed

solve() method implemented in hiopLinSolver.hpp file. #58

pelesh opened this issue Jul 15, 2020 · 1 comment

Comments

@pelesh
Copy link
Collaborator

pelesh commented Jul 15, 2020

Should we consider moving implementation of the solve() method below from hiopLinSolver.hpp to a source file? Simplifying API would likely help porting to GPU and managing compile-time dependencies. See also #43.

  void solve ( hiopVector& x_ )
  {
    assert(M.n() == M.m());
    assert(x_.get_size()==M.n());
    int N=M.n(), LDA = N, info;
    if(N==0) return;

    hiopVectorPar* x = dynamic_cast<hiopVectorPar*>(&x_);
    assert(x != NULL);

    char uplo='L'; // M is upper in C++ so it's lower in fortran
    int NRHS=1, LDB=N;
    DSYTRS(&uplo, &N, &NRHS, M.local_buffer(), &LDA, ipiv, x->local_data(), &LDB, &info);
    if(info<0) {
      nlp->log->printf(hovError, "hiopLinSolverIndefDenseLapack: DSYTRS returned error %d\n", info);
      assert(false);
    } else if(info>0) {
      nlp->log->printf(hovError, "hiopLinSolverIndefDenseLapack: DSYTRS returned error %d\n", info);
    }   
  }

CC @ashermancinelli

@cnpetra
Copy link
Collaborator

cnpetra commented Jul 24, 2020

will be addressed soon in branch gpu-devperf

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

No branches or pull requests

2 participants