[Numeric] Fwd: HMatrix priorities

dominic at steinitz.org dominic at steinitz.org
Fri Jul 10 08:16:08 UTC 2020


Hi Huw,

Thanks very much for the questions and working on hmatrix. Apologies for not having more informative answers.

Dominic Steinitz
dominic at steinitz.org
http://idontgetoutmuch.org
Twitter: @idontgetoutmuch

> On 8 Jul 2020, at 08:18, Huw Campbell <huw.campbell at gmail.com> wrote:
> 
> Hi all,
> 
> I've put a bit of time into hmatrix over the past week. My main
> priorities at the moment are fixing bugs, segfaults, memory leaks, and
> other infelicities. But after that's done I'm planning on tackling
> some broader API and design issues.
> 
> I have a few questions:
> 
> - Why are CSR and CSC 1 indexed? The early literature uses 0 indexing
> AFAICS, and it means that Ben Gamari's libsvd wrapper has to do extra
> leg work reindexing before calling its C code.

I didn’t even know it did this. I don’t think the author (Alberto Ruiz) is subscribed to this list. We could try asking him directly.

> - Why do we have our own mutable vector type? I would have thought the
> version in
> the vector package would be sufficient.

My guess would be that when the code was written mutable vectors were not available in vector.

> - Should we try to move more of the library towards the general matrix
> `GMatrix`? At the moment there are not very many functions which
> actually use it (and it has partial record labels), and one can't
> project out back to any of the underlying matrix forms.

I have no view on this other than to be careful about performance which reminds me: we should really do some performance measurements.

> - Can we bring the test suites and benchmarks back into the libraries
> proper? The test suite is currently lagging the major version, and on
> master doesn't compile with GHC 8.6+ (I have a PR for that).

Yes please.

> - CI looks like it's only testing one version of GHC, do we have a
> policy on how many versions we support?

No policy but I guess we should aim for a few more versions.

> - What are all of your priorities? Dominic has mentioned a few use cases around
> sparse matrices people have been working on.

Some time ago, I created hmatrix-sundials but gave it its own repo. The idea was to have an identical interface to ODE solving so that you could switch between SUNDIALS and GSL. Roman Cheplyaka has vastly improved hmatrix-sundials and it now uses suitesparse for sparse matrices.

In terms of priorities, my own are focussed on solving PDEs so I really need sparse matrices. And SUNDIALS is really a lot better for differential equations than GSL. I really like the statically typed matrices (the rows and columns being typed by their size). Are you thinking just about the base package or the other packages like glpk?

> We've also spoken about github etiquette. I agreed with Dominic that
> branches and pull requests are probably the best approach at the
> moment. I won't merge my own PRs without input from another maintainer
> at this stage, so please do have a look.

I am not totally convinced having a monorepo is the best way forward but I don’t feel strongly.

> Regards,
> Huw
> _______________________________________________
> Numeric mailing list
> Numeric at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/numeric


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/numeric/attachments/20200710/b9345c62/attachment.html>


More information about the Numeric mailing list