Tuesday 18 March 2014

Project goals

My intention is upgrading  some functions related with sparse matrices  so they become compliant with Matlab  and implement others that are not present in Octave right now. This is the list plus some comments about how I expect to do things.

  1. Implement  sprand/sprandn with the 4rth parameter.(link) (Patch accepted)
  2. sprandsym (implement arguments needed to be compliant with Matlab)
  3. lsqr 
  4. minres
  5. ilu (complete last year GSOC project)
  6. ichol (complete last year GSOC project)
 1: I have already submitted a patch but maybe some modifications are needed to improve performance. Anyway I have mailed Rik (the last one that modified the source code of that functions) and has told me that he will give it a look in a couple of weeks.

2: I have not yet investigated enough to give a road map for implementing that function.

3 & 4: For implementing that functions I found those links:

In this website there are codes written in several programming languages that implement the algorithms (the authors are the ones that written the paper that Matlab gives as reference in their documentation for both functions). I have emailed professor Michael Saunders about adapting them into Octave versions and he answered me that I am welcome to do while I respect the license (CPL or BSD licenses). They are meant to be very unrestrictive but I need to get informed about the compatibility with GPL3.

5: Here comes the big one. That function has a big chunk of options and the last year was almost implemented by Kai Torben as his GSOC project. He interfaced Octave with ITSOL/ZITSOL libraries but in the end there were some issues with that approach:

  • ILUTP algorithm did not work 
  • He had to patch the library to get things work!
  • modified versions of algorithms ("milu" option) were not implemented in the libraries
  • That "ugly" scenario lead to finally not being able to include ITSOL as a dependency with Octave. Bottom line, the integration with the development repository could not be achieved.
My approach: I will write from scratch all the functions needed as oct-files (ILUTP, ILU0, ILUC and ILUT) for real and complex numbers implementing the algorithms described by Yousef Saad in his book "Iterative methods for sparse linear systems Ed. 2". I can use some of the code that Kai wrote, mostly the tests and the m-file "ilu.m" that glue together all the functions.

6: That function need less work since it is almost all implemented. Just some complex implementations are missing and the modified version of the algorithms too. Since Kai implemented those functions from scratch there are no dependency problems. That is nice.

Update 1: Kai has commented me that there are some license issues on the FORTRAN code he used (see here). So ichol related functions need to be implemented from scratch.


Update 2: Following Kai's recommendations I will focus on ilu/ichol functions for the GSoC period and just in case there is some time left go ahead with the other functions.

4 comments:

  1. Regarding your point 3 & 4, the original BSD license is not GPL compatible (https://www.gnu.org/licenses/license-list.en.html#OriginalBSD) neither is CPL. For exactly the same reason it is not possible to use the ICHOL functions from your point 6. So we have to find another approach unfortunately.

    And sure, this will be enough fun for three months ;-)

    ReplyDelete
    Replies
    1. Which ichol functions cannot be used? I get lost in this point. You did the implementation, did you?

      Delete
    2. I've reimplemented two Fortran Algorithms ichol0 and ichol0jp in C from this paper: http://dl.acm.org/citation.cfm?id=200986. They work very good, no doubt. But it is derived from their work, which is licensed under TOMS. The authors didn't answer my request to use that code as free software. That is my dilemma. Nevertheless these algorithms can be taken next to MATLAB as reference, for an own approach with a clean room implementation.

      Delete
  2. Oh I did not know that detail... Thanks for the info. Anyway I will focus first on ilu so I am not concerned about that right now. But good to know.

    ReplyDelete