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

MatrixMarket Package should support CS* layouts #7448

Closed
buddha314 opened this issue Sep 22, 2017 · 9 comments
Closed

MatrixMarket Package should support CS* layouts #7448

buddha314 opened this issue Sep 22, 2017 · 9 comments

Comments

@buddha314
Copy link

buddha314 commented Sep 22, 2017

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"); }
@buddha314
Copy link
Author

If possible, it would be nice to get an estimate on this as it is right in my way. Thanks!

@bradcray
Copy link
Member

it is right in my way

Does this imply that applying and using the workaround patch is not working?

@bradcray bradcray changed the title MatrixMarket Package should support Sparse layouts MatrixMarket Package should support CS* layouts Sep 22, 2017
@buddha314
Copy link
Author

I haven't tried it yet, and I haven't had much experience with the new CS layouts nor the DefaultSparse, so that seems like I will be spending time learning the interfaces of two packages and how they play with each other instead of running the calculations I was hoping to get to today.

I like your new title better!

@bradcray
Copy link
Member

You should simply be able to apply the patch, add the missing use that @ben-albrecht pointed out on issue #7440, recompile and be on your way. I don't think you'll need to learn anything to get that program compiling.

One of the reasons I'm proposing the workaround is that this package is externally contributed by @ct-clmsn and I can't speak to how quickly he'll be able to make a change to it.

@ben-albrecht
Copy link
Member

ben-albrecht commented Sep 22, 2017

I think this should be an issue (or PR if you implement that patch :) ) on https://github.com/ct-clmsn/MatrixMarket rather than chapel.

@buddha314
Copy link
Author

Oh man, move it again? Looking more and more like I'm S.O.L. on this one.. I'll try the patch myself, but that means re-doing it every time I pull

@bradcray
Copy link
Member

I don't think you should have to re-apply the patch on pulls... It might be a hassle if MatrixMarket changes, but hopefully any conflicting change there would just remove the need for the patch.

@bradcray
Copy link
Member

Oh man, move it again?

And my apologies on the duplicated effort... In suggesting to file the issue, I didn't think to check whether issues were enabled on Chris's github repo (didn't even think about his repo at all).

@bradcray
Copy link
Member

Closing this issue in favor of ct-clmsn/MatrixMarket#4

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

No branches or pull requests

3 participants