GithubHelp home page GithubHelp logo

ct-clmsn / matrixmarket Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 11 KB

a chapel module for interacting with matrix market formatted data files

License: Apache License 2.0

Chapel 100.00%
chapel chapel-language matrix matrix-market

matrixmarket's Introduction

chapel-module-matrixmarket

a chapel module for interacting with matrix market formatted data files

matrixmarket's People

Contributors

benharsh avatar buddha314 avatar ct-clmsn avatar

Stargazers

 avatar

Watchers

 avatar

matrixmarket's Issues

Error on "Error index out of bounds"

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.

Support Chapel 1.19

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.

MatrixMarket Package should support CS* layouts

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"); }

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.