Coder Social home page Coder Social logo

linearalgebrajama's Introduction

linearalgebrajama's People

Contributors

benharsh avatar ct-clmsn avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

benharsh mppf

linearalgebrajama's Issues

Improve memory management of 'Matrix' types (and others)

As noted here, the current implementation of LinearAlgebraJama has the disadvantage of using classes as its Matrix representation, which puts a significant burden on the user to ensure that memory is freed. For user-defined variables, this is not the worst thing in the world, but given that most of the library routines also create and return new Matrices, this can complicate code significantly. For example any self-update of a matrix like A = mult(A, B); will cause the RHS copy of A to be leaked.

It seems like an attractive approach to take here, if it could be made to work, would be to use Chapel's Owned type wrappers to manage the memory automatically based on the lifetime of the variable. This might be a good acid test for the feature (it hasn't been stressed much yet) and seems to represent the kind of use case it was designed for.

In our nightly memory leaks testing, the exercise of LinearAlgebraJama, TestMatrix.chpl had become our #1 leaking program:

       53392  TestMatrix.chpl

I spent some time trying to close all the leaks in the PR noted above, but ended up deciding that it was taking too much time for the value and that a better solution would be to remove the burden from the user. Hence this issue. In the meantime, I've disabled that test from our memory leaks test runs which reduced our total memory leaks by about 10% (should show up on this graph tomorrow).

Support Chapel 1.19

mason build with Chapel 1.19 results in errors due to old-world constructors:

Updating mason-registry
Compiling [debug] target: LinearAlgebraJama
LinearAlgebraJama/src/LinearAlgebraJama.chpl:185: note: Constructors have been deprecated as of Chapel 1.18. Please use initializers instead.
LinearAlgebraJama/src/LinearAlgebraJama.chpl:185: error: Type 'CholeskyDecomposition' defines a constructor here
LinearAlgebraJama/src/LinearAlgebraJama.chpl:1166: error: Type 'EigenvalueDecomposition' defines a constructor here
LinearAlgebraJama/src/LinearAlgebraJama.chpl:1296: error: Type 'LUDecomposition' defines a constructor here
LinearAlgebraJama/src/LinearAlgebraJama.chpl:1555: error: Type 'Matrix' defines a constructor here
LinearAlgebraJama/src/LinearAlgebraJama.chpl:1567: error: Type 'Matrix' defines a constructor here
LinearAlgebraJama/src/LinearAlgebraJama.chpl:1580: error: Type 'Matrix' defines a constructor here
LinearAlgebraJama/src/LinearAlgebraJama.chpl:1612: error: Type 'Matrix' defines a constructor here
LinearAlgebraJama/src/LinearAlgebraJama.chpl:1624: error: Type 'Matrix' defines a constructor here
LinearAlgebraJama/src/LinearAlgebraJama.chpl:2307: error: Type 'QRDecomposition' defines a constructor here
LinearAlgebraJama/src/LinearAlgebraJama.chpl:2529: error: Type 'SingularValueDecomposition' defines a constructor here

See here for more info.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.