a chapel module for interacting with matrix market formatted data files
ct-clmsn / matrixmarket Goto Github PK
View Code? Open in Web Editor NEWa chapel module for interacting with matrix market formatted data files
License: Apache License 2.0
a chapel module for interacting with matrix market formatted data files
License: Apache License 2.0
On the format page only the "Coordinate Format" appears to require ordered rows within the file.
Does this package require row or column ordered entries per line? Specifically when reading sparse matrices.
Thanks
mason build with Chapel 1.19 results in errors due to old-world constructors:
MatrixMarket/src/MatrixMarket.chpl:94: note: Constructors have been deprecated as of Chapel 1.18. Please use initializers instead.
MatrixMarket/src/MatrixMarket.chpl:94: error: Type 'MMWriter' defines a constructor here
MatrixMarket/src/MatrixMarket.chpl:196: error: Type 'MMReader' defines a constructor here
See here for more info.
As documented here, please support the new CS layouts in the MM package.
As discussed in #7440 the MatrixMarket format does not support the new sparse layouts. The loaded matrices therefore have very little analytic support, including transpose.
@bradcray suggests this sort of work-around for starters.
diff --git a/modules/packages/MatrixMarket.chpl b/modules/packages/MatrixMarket.chpl
index 316647c..ff0a8ee 100644
--- a/modules/packages/MatrixMarket.chpl
+++ b/modules/packages/MatrixMarket.chpl
@@ -363,8 +363,10 @@ class MMReader {
(nrows, ncols, nnz) = read_matrix_info();
}
+ use LayoutCS;
+
Dtoret = {1..nrows, 1..ncols};
- var spDom : sparse subdomain(Dtoret);
+ var spDom : sparse subdomain(Dtoret) dmapped CS();
var toret : [spDom] eltype;
if finfo.mm_types == MMTypes.Real { assert(eltype == real, "expected real, data in file is not real"); }
The MM format states that the header has three values like 5 5 6
which indicate the number rows, columns and entries respectively.
The head of my file
%%MatrixMarket matrix coordinate real general
60563 569425 314056
1 99609 1.0
1 122912 1.0
1 138968 1.0
2 7870 1.0
2 7871 1.0
2 7876 1.0
2 51987 1.0
2 219571 1.0
Indicating 60,563 rows, 569,425 columns and 314056 entries. However, when running this I get
$CHPL_HOME/modules/internal/ChapelDistribution.chpl:583: error: halt reached - Sparse domain/array index out of bounds: (60589, 25906) (expected to be within {1..60563, 1..569425})
make: *** [core] Error 1
If you get for that line, however, you see the (i,j)
entries are reversed
> cat data/condition_cui.txt | grep 60589
25906 60589 1.0
So this should be within bounds.
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.