Sparse Matrices - CSR and RSB

In the Sparse primer it says

Anyone reading this far who is interested in exploring more with sparse domains and
arrays in Chapel is encouraged to contact us. We currently have a Compressed Sparse
Row (CSR) sparse domain/array layout within our modules and an implementation of
the NAS CG benchmark that makes use of it, and would be happy to provide the curious
with full explanations of the features therein, and are open to new suggestions.

Consider this contact. Is there much documentation other than the primer and source code?
Do you need any more detail about my application - implicit finite element structural code.

Is support for CSR all about the implementation or are their compiler hooks/tweaks that help it.

Apart from wanting to learn more about how to better understand how to use this module ...

I ask this in the context of considering the implementation in the new year of RSB (recursive
sparse block) format. I got prompted by today's release of LIBRSB RSB is claimed
to outperform CSR in some/many circumstances. In neither CSR nor RSB am I an expert and
the mistakes I make with both sometimes makes me think I am not much better than a novice.

Hi Damian,

In broad strokes, I believe that the primer covers most aspects of using the sparse layout. If there is something about using sparse that would be valuable to you and you are not seeing, please let us know.

We can help you set up your implementation of RSB, using modules/layouts/LayoutCS.chpl as a starting point. No need for compiler changes.

The way to structure your implementation is:

  • define three classes — the counterparts of CS, CSDom, and CSArr
  • define certain methods on these classes that Chapel expects from a domain map, such as initializers (if needed), iterators these, and a few methods whose names start with dsi.

Our technote on DSI has more details. However, it may be out of date and surely incomplete. A hacky way to approach the project is to make a skeleton and compile a simple test case that uses it, then see what the compiler says is missing.

Please let us know what you would like us to zoom into. Note that our team is out of office until early January so we may not respond before that.

Thanks for that detail. That answers most of the immediate questions. I know zip[ about domain maps.

There is no rush on this. I will chase you up in mid January for a (possible) Zoom later in the month.

Thanks again Vass - Damian

Sounds good. I am up for zoom. Homework for you: have a simple program that uses our regular sparse array(s) that you would like to switch to RSB. You could probably pass it to me beforehand.