Editing User:Edu159

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 17: Line 17:


== C: Contact ==
== C: Contact ==
*''' Please state the (unique and identical where possible) nick you use on IRC and any other communication channel related to Octave. ''We really want unique nicks. You might want to bold it.'''''
'''* Please state the (unique and identical where possible) nick you use on IRC and any other communication channel related to Octave. ''We really want unique nicks. You might want to bold it.'''''
nick: edu159  
nick: edu159  


*''' Which time zone do you live in? Will that change over GSoC duration? ''Perhaps DST adjustment or a relocation. Note that both UTC and GMT are not aware of daylight saving time! Please state UTC+x or -x.'''''
'''* Which time zone do you live in? Will that change over GSoC duration? ''Perhaps DST adjustment or a relocation. Note that both UTC and GMT are not aware of daylight saving time! Please state UTC+x or -x.'''''


Time zone: UTC+0. It won't change during GSoC.
Time zone: UTC+0. It won't change during GSoC.


*''' Please state the timeframe (in UTC+0) when you feel most comfortable working during GSoC. Where are your time buffers? ''Example: I usually code around 9.00 to 18.00 and could also try to start earlier (~7.00) for few days ;-)'''''
'''* Please state the timeframe (in UTC+0) when you feel most comfortable working during GSoC. Where are your time buffers? ''Example: I usually code around 9.00 to 18.00 and could also try to start earlier (~7.00) for few days ;-)'''''


I can code from 7:00-13:00 in May, June and first half of July from Monday to Thursday. On Fridays, Saturdays and Sundays I have almost the whole day free for coding. In the second half of July and August I have no timeframe restrictions.
I can code from 7:00-13:00 in May, June and first half of July from Monday to Thursday. On Fridays, Saturdays and Sundays I have almost the whole day free for coding. In the second half of July and August I have no timeframe restrictions.
Line 37: Line 37:
I have only that kind of experience while doing some personal projects with a friend of mine, so I have not experience with such a large project and free software community.
I have only that kind of experience while doing some personal projects with a friend of mine, so I have not experience with such a large project and free software community.
* '''Please describe the biggest project you have written code for and what you learned by doing so. Also describe your role in that project over time.'''
* '''Please describe the biggest project you have written code for and what you learned by doing so. Also describe your role in that project over time.'''
I have dealt with projects with around 2.5-3k lines of code, not more. I don't have a extraordinary successful story about a project I have been in although I have been in lots of small ones. I worked the last year while in college with a friend on a website for informal job seeking done in PHP+MySQL (around 3K lines of PHP code). We even sent the idea to Ycombinator to get funding. Unfortunately we were not selected and the idea was not as good as we thought. I learned a lot with that project, particularly combining both college and a project at the same time, working regularly and establishing deadlines.
I have dealt with projects with around 2.5-3k lines of code, not more. I don't have a extraordinary successful story about a project I have been in although I have been in lots of small ones. I worked the last year while in college with a friend on a website for informal job seeking done in PHP+MySQL (around 3K lines of PHP code). We even sent the idea to Ycombinator to get funding. Unfortunately we were not selected and the idea was not at good as we thought. I learned a lot with that project, particularly combining both college and a project at the same time, working regularly and establishing deadlines.
* '''Please state the commits and patches you already contributed to Octave. ''This question (one of the most important parts by the way) is the only part of your application our wiki admins will edit for you even after the application deadline. Code sometimes speaks louder than many words do.'''''
* '''Please state the commits and patches you already contributed to Octave. ''This question (one of the most important parts by the way) is the only part of your application our wiki admins will edit for you even after the application deadline. Code sometimes speaks louder than many words do.'''''


*Contributions to Octave:
*Contributions to Octave:
** Patch submitted for bug [http://savannah.gnu.org/bugs/?41839 #41839].(m-file) '''UPDATE:''' The patch has been accepted.
** Patch submitted for bug [http://savannah.gnu.org/bugs/?41839 #41839] (m-file)
** Patch submitted for bug [http://savannah.gnu.org/bugs/?41796 #41796].(c++)
** Patch submitted for bug [http://savannah.gnu.org/bugs/?41796 #41796] (c++)
*Others:
** Code that implements partial functionality of '''ilu''' function("no-fill option") : [https://db.tt/hzpWkTkq file]


== F: Feeling fine ==
== F: Feeling fine ==
Line 77: Line 75:
I like programming on Linux.
I like programming on Linux.
* '''If you have access to more than one, please state them and the conditions under which you are granted this access.'''
* '''If you have access to more than one, please state them and the conditions under which you are granted this access.'''
I own also a Windows native installation.
I have windows (native) and mac virtualized.
* '''Please estimate an average time per day you will be able to ''(if separated)'' access'''
* '''Please estimate an average time per day you will be able to ''(if separated)'' access'''
** an internet connection --> ~18 hours a day
** an internet connection --> ~18 hours a day
Line 97: Line 95:


== Y: Your task ==
== Y: Your task ==
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.
The functions are '''ichol''', '''ilu''', '''sprand''', '''sprandn''', '''sprandsym''', '''minres''' and '''lsqr'''.


'''Introduction'''
*'''Approach:'''
------------
My intention is to implement the missing '''ilu''' and '''ichol''' functions and to continue last year's GSoC project developed by Kai Torben. The goal is the complete integration in the core of Octave. Those functions will have a direct impact on quite a few functions that solve sparse linear systems as ilu and ichol are known to be good algorithms for generating preconditioners. Some of the functions that will take advantage of them are pcg, bicg or gmres among others. Bottom line, performance of sparse linear system solvers in Octave will be raised.


 
**'''ilu:''' That function has a big chunk of options and the last year was almost implemented by Kai Torben as his GSOC [http://siko1056-gsoc.blogspot.de/ project]. He interfaced Octave with ITSOL/ZITSOL libraries but in the end there were some issues with that approach:
'''Approach'''
----------------
 
*'''ilu:''' This function has a big chunk of options and the last year was almost implemented by Kai despite of the fact that he could not finally integrate it into Octave . His approach was interfacing Octave with ITSOL/ZITSOL libraries but in the end there were some issues with that direction:
:#ILUTP algorithm did not work for him
:#ILUTP algorithm did not work for him
:#He had to patch the library to get things work. Not nice for achieve integration.
:#He had to patch the library to get things work, not nice for integration.
:#modified versions of algorithms ("milu" option) were not implemented in the libraries
:#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 of the function with the development\n repository could not be achieved.
:#That "ugly" scenario lead to finally not being able to include ITSOL as a dependency with Octave. Bottom line, the integration of the function with the development\n repository could not be achieved.
::I have been in contact with Kai by mail and agrees that writing from scratch all the functions needed as oct-files (ILUTP, ILU0, ILUC and ILUT) would be a valid way to go. This way no dependencies are needed to be added and the overhead of translating the data from Octave to ITSOL and vice verse is eliminated. Algorithms will be taken from Yousef Saad's  book "Iterative methods for sparse linear systems Ed. 2". Moreover, I can use some of the code that Kai wrote, mostly the tests, documentation and the m-file "ilu.m" that glue together all the functions. ITSOL source code is also a good place to look for some help.
::I have implemented the ILU0 algorithm so far and benchmarked it against Matlab and Kai's last GsOC version(using ITSOL). The performance is great. You can check the code and see a table with the execution times in a blog I have created for the project([http://edu159-gsoc2014.blogspot.com.es/2014/03/ilu0-implementation.html link])


::I have been in contact with Kai by mail and agrees that writing from scratch all the functions needed as oct-files (ILUTP, ILU0, ILUC and ILUT) would be a harder but safer way to go if integration want to be achieved. This way no dependencies are needed to be added and the overhead of translating the data from Octave to ITSOL and vice verse is eliminated. Algorithms will be taken from Yousef Saad's  book "Iterative methods for sparse linear systems Ed. 2". Moreover, I can use some of the code that Kai wrote, mostly the tests, documentation and the m-file "ilu.m" that glue together all the functions. ITSOL source code is also a good place to look for some help.
:*'''ichol:''' In this case things should be easier. Kai  implemented the functions related with ichol from scratch and they works great. It would be only necessary to code the complex version and the modified version of the algorithms. There is one issue here with licenses I did not know at first and Kai pointed me out (see [http://edu159-gsoc2014.blogspot.com.es/2014/03/introducing-myself.html#bc_0_1B here]). It should be solved.
 
::I have implemented the ILU0 algorithm so far and benchmarked it against Matlab and Kai's last GsOC version(using ITSOL). The performance is great. You can check the code and see a table with the execution times in a [http://edu159-gsoc2014.blogspot.com.es/2014/03/ilu0-implementation.html blog] I have created to inform about my achievements in the project. [https://db.tt/hzpWkTkq Here] is the link to the source code I have written so far. I has not got any doc-strings nor tests, but is functional.
 
 
*'''ichol:''' In this case things should be easier at first glance. Kai  implemented the functions related with ichol from Fortran prototypes and they work as expected. In theory would be only necessary to code the complex versions and the modified versions of the algorithms. On the other hand, there is an issue here with licenses I did not know at first and Kai pointed me out (see [http://edu159-gsoc2014.blogspot.com.es/2014/03/introducing-myself.html#bc_0_1B here]). Authors should be contact in order to ask for a permission, but if they are not in favor of giving to us then functions will be implemented from scracth.
 
 
:The road map of what and how I want to do the project is clear to me, but I don't know for sure if it will be enough for the GSoC period. Because I am concerned about that there are other functions that I would like to implement if it would be necessary like '''lsqr''' and '''minres''', both highly related with ichol and ilu. I have already done some search and found that this website [[http://www.stanford.edu/group/SOL/software/lsqr/ lsqr]] [[http://www.stanford.edu/group/SOL/software/minres/ minres]]. The website is from the people that wrote the papers given as references in Matlab documentation. In the website there are several codes that can be used. I have mailed 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). He claimed that they are very unrestrictive but I've been told that they are not compatible with GPL3. I will need some insights about that if I happen to have time for implementing them.
 
 
'''Project structure'''
-------------------------
 
These are the main files that will be needed for the project:
 
* ilu.m -- Act as a wrapper for the rest of ilu functions
** ilu0.cc -- Implements ilu decomposition zero level of fill
** ilut.cc -- Implements ilu decomposition with threshold
** iluc.cc -- Implements Crout version of ilu decomposition
** ilutp.cc-- Implements the ilu decomposition with threshold and pivoting


*ichol.m -- Act as a wraper for the rest of functions
:*'''sprand/sprandn:'''I have already sent a [http://savannah.gnu.org/bugs/?41839 patch] for those functions that IMHO works, but it suffers from some performance issues for large matrices. Should be revisited by someone that really knows about that. I mailed Rik who appeared as author of the function and has told me that in a few weeks he maybe be able to revise the algorithm. So in the meanwhile I will focus on other functions.
** ichol0.cc -- Implements ichol decomposition with zero level of fill
** icholt.cc -- Implements ichol decomposition with threshold
** icholt0jp.cc -- Implements ichol decomposition following Jones and Plassmann strategy


NOTE: All the algorithms could be used with real and complex numbers and "modifified versions" will be implemented as well.
:*'''sprandsym:'''That function may be implemented following the strategy used in sprand, but I need to analyze closer.


:*'''minres & lsqr:'''With the implementation of those ones I need a bit of guidance. I dont know if they must be implemented as m-scripts or in c++. I would say that they way to go is m-scripting them as ''gmres'' is implemented this way, and they are cousins. Anyway I found that this website are the place to look [http://www.stanford.edu/group/SOL/software/lsqr/ lsqr] [http://www.stanford.edu/group/SOL/software/minres/ minres]. The website is from the people that wrote the papers given as references in Matlab documentation. In the website there are several codes that can be used. I have mailed 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). He claimed that they are very unrestrictive but I've been told that they are not compatible with GPL3. I will need some insights about that.


'''Estimated timeline:'''
-------------------------


:'''->'''I think I have a clear road map of what I want to do but I don't know for sure if it will be enough for the GSoC period. There are other functions that I would like to implement if it would be necessary. Let me know what do you think about.


*'''FIRST PERIOD:'''  
*'''Estimated timeline:'''
::'''19 May-20 June:'''  Implement ilu related functions. In that order ilu0, ilut, iluc , ilutp.
::'''20-25  June:'''  Write ilut, iluc, ilutp automated tests, documentation and benchmarking.
::'''27    June:'''  '''(Millstone 1)''' ilu.m is fully functional and ready to be integrated with Octave core.
::'''27    June:'''  Mid-term evaluation


*'''SECOND PERIOD:'''
:*'''FIRST PERIOD:'''  
::'''28   June-2 July:''' Strategy for ichol will be fully established in those days. Better to plan wisely before code.
::'''19   May:''' Start implementing ilu related functions. In the order ILUT, ILUC , ILUTP.
::'''2 July-5 August:''' Implement ichol related functions. In that order ichol0, icholt. ichol0jp if there is time left.
::'''15  June:''' Write ILUT, ILUC, ILUTP automated tests, documentation and benchmarking.
::'''5-10    August:''' Write automated tests, documentation and benchmarking for those functions.
::'''23  June:''' '''(Millstone 1)''' ilu funtion is fully funtional. Start coding ichol related functions (by this time license issues I mentioned should be resolved and a solid strategy should be set)
::'''10    August:''' '''(Millstone 2)''' ichol.m is fully functional and ready for integration.
::'''27 June:''' '''Mid-ter evaluation'''
::'''10-18 August:''' Buffer week for any unexpected situation or minor changes that should be done. If there is time left, then I will work on minres and lsqr functions.


:*'''SECOND PERIOD:'''
::'''15  July:'''  '''(Millstone 2)''' ichol is functional. Write automated tests, documentation and benchmarking.
::'''20  July:'''  start implementing lsqr and minres
::'''5  August:'''  lsqr and minres implemented and tested. Start coding sprandsym and tweaking sprand/sprandn (maybe at this point they are already tweaked)
::'''13 August:'''  '''(Millstone 3)''' all the sp* functions are implemented
::'''13-18 August:'''  Buffer days for any unexpected situation or minor change that should be done.


'''Note:''' I set schedule starting on May 19th but I would like to start coding since I know I am selected (22 April), so maybe goals would be reached before stated above. So that dates should be taken as top limits. In June 3 college exams are scheduled that still not have fixed dates. I am not worried about them since I have a lot of time for studying.
'''Note:''' I set schedule starting on May 19th but I would like to start coding since I know I am selected (22 April), so maybe goals are would be reached before stated above. So that dates should be taken as high limits. In June I have scheduled 3 exams that still not have fixed dates. I am not worried about them since I have a lot of time for studying.
Please note that all contributions to Octave may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Octave:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)