ct-clmsn / linearalgebrajama Goto Github PK
View Code? Open in Web Editor NEWa Chapel implementation of NIST's JAMA linear algebra library
License: Apache License 2.0
a Chapel implementation of NIST's JAMA linear algebra library
License: Apache License 2.0
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).
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.