GSoC 2018 - Working Demo with Usage Docs for the Mex Module
Contents
-
GSoC 2018 - Working Demo with Usage Docs for the Mex Module
- Project Link
- Student and Mentors
- Timeline for GSoC 2018
- Overview
- Community Bonding
- Coding Period Begins May 14, 2018
- Week 1-4 Report (May 14, 2018 - June 14, 2018)
- Week 5-8 Report (June 14, 2018 - July 9, 2018)
- Week 9-12 Report (July 13, 2018 - August 14, 2018)
- Notes and Updates for Final Submission
- My Commits
- Link to Final Code
Project Link
Student and Mentors
Student Name -
- Siddhartha Gairola
Mentors -
- Clément David
- Dhruv Khattar
Timeline for GSoC 2018
This timeline is for after the students projects were announced on 23rd of April, 2018.
- April 23, 2018 - May 14, 2018 - Community Bonding
- May 14, 2018 - June 15, 2018 - Students Work on their Projects.
- June 11 - 15, 2018 - First Evaluations
- June 15, 2018 - July 9, 2018 - Students Continue Coding
- July 9 - 13, 2018 - Second Evaluations
- July 13, 2018 - August 6, 2018 - Students Continue Coding
- August 6 - 14, 2018 - Students Submit Code and Evaluations
- August 14 - 21, 2018 - September 5, 2017 - Mentors Submit Final Evaluations
- August 22, 2018 - Results Announced
Overview
The aim of this project is to write a working Demo for the Matlab Mex modules present in Scilab. The Matlab MEX-Files is an API which is a wrapper on the current API Scilab. This would make it very easy to port existing Matlab Mex toolboxes into Scilab. A module - mexlib module already exists in Scilab which is compatible with the Matlab-Mex API. Currently the mex support for Scilab is good but there is a lack of a concrete demo. Thus, it is necessary to have a working demo for Mex within Scilab.
Community Bonding
The community bonding period was from April 23- May 14, 2018.
Tasks |
Description |
Status |
||
Discussing with mentors the workflow and get a final idea of how to approach the project. |
I had a fair idea of the MEX API was looking at some existing MEX toolboxes. |
Done |
||
Discuss the reference toolbox to use for the development with the mentors. |
Came up with a few reference toolboxes. |
Done |
||
Boost my knowledge about the API’s and skills required for the project. |
Inspected the current API and review of last year's work. |
Done |
||
Get acquainted with the code base and exploring the Matlab Mex module examples and documentation to get a more thorough understanding of the module. |
Same as above. |
Done. |
||
Make final changes to any open bugs. |
Reviewed a few of my commits on code-review which are/were pending to be merged. |
Done |
(1.) Findings and updates from the community bonding period -
- Narrowing down of the project goals.
The project would be divided into following 3 parts:
- Working demo in Scilab which is compatible with the Scilab Mex
- Written Notes/Documentation of how to run the Demo
- Ensure most function implementations are complete and add test coverage for the mexlib module.
Coding Period Begins May 14, 2018
Week 1-4 Report (May 14, 2018 - June 14, 2018)
My mentor suggested that I should select an already existing toolbox for mex to focus my dev on. One can also refer the mex examples which are distributed with MATLAB, so that we can say that the Scilab mex is fully compatible with atleast all the MATLAB mex modules.
Note- We cannot include the MATLAB MEX examples supplied with MATLAB as they have a copyright included. But nevertheless the examples can be run and tested with the mexlib module in Scilab module. (Then we can say that all the examples given officially work.)
After a discussion with my mentor Clément, the following toolbox was narrowed down and will focus my dev on this -
Now I am currently working on the Geometry Processing Toolbox and porting it to Scilab.
Tasks |
Description |
Status |
||
Finalize the reference toolbox to work on. |
Some toolboxes were proposed and the Geometry Processing Toolbox was selected to focus on. |
Done |
||
Identify the areas which still use the old Scilab API. |
Did inspect some areas. |
Done |
||
Start with the implementation. |
Started. |
Done |
||
Get everything merged in the master branch and fix any kind of issues arising during implementation or clearing any backlog. |
Ended |
Done |
||
Write documentation for the functions and usage of the mexlib module. This will be added to the Scilab help system. |
Working |
Pending |
||
Get the code ready for the Phase 1 evaluation and fix any kind of issues which might arise.(if everything works fine then jump to the next task) |
Ended. |
Done |
Findings, updates and achievements from weeks 1 to 4 -
Reviewed the following of my commits which are/were pending to be merged on codereview -
Made the following sample mex function and demo directory -
Updates and commits for the period May, 31 - June 3, 2018
- Started work on porting the GP Toolbox.
Corrected the directory structure for the toolbox and referred to the following link : https://scilab.gitlab.io/legacy_wiki/howto/Create%20a%20toolbox
Created a new repo on GitHub : https://www.github.com/sidgairo18/SCILAB_MEX_TOOLBOX/ , will continue the development over there.
- Made the following commit on codereview - with the following samples for the MEX demo - mexlib/mex_toolboxes/Sample_Toolbox and /mexlib/mex_toolboxes/Geometry_Processing_Toolbox
Link to the above commit : https://codereview.scilab.org/#/c/20097/
First Evaluations -
The evaluations went okay. Will now proceed with the second phase.
Week 5-8 Report (June 14, 2018 - July 9, 2018)
Porting of the toolbox continues. Will mostly complete the porting by the second evaluations and start with the final compilation, tests and documentation in the third evaluation.
Tasks |
Description |
Status |
||
Upgrade the current implementation to use the new API for Scilab 6. |
Most of the current implementation of the mexlib module is updated. |
Done |
||
Continue with the implementation of the DEMO. |
Working on the porting of the GP toolbox. |
Done |
||
Get everything merged in the master branch and fix any kind of issues arising during implementation or clearing any backlog. |
Working |
Pending |
||
Write documentation and helpers for the added files. |
Will be done before the third eval. |
Done |
||
Write tests for the functions which have been implemented. |
Will be done before the third eval. |
Pending |
||
Get the code ready for the Phase 2 evaluation and fix any kind of issues which might arise.(if everything works fine then jump to the next task) |
Ended. |
Done |
Updates and commits for the period
Most of the development work and code is updated on the following Github repo: https://www.github.com/sidgairo18/SCILAB_MEX_TOOLBOX/
Second Evaluation Notes -
- The second evaluations are over. There are still a few functions which need to be ported and dependencies to be resolved.
- The final builder will use ilib_mex_build(0 and not tbx_build_gateway()
Work done -
- Updated builder.
- Added more functions and a help .xml file. (Add for all functions)
Week 9-12 Report (July 13, 2018 - August 14, 2018)
Tasks |
Description |
Status |
||
Get finished with the implementation of the working demonstration for the mexlib library. |
Port the remaining functions. |
Done |
||
Ensure that everything is working fine and is consistent. |
Cross check with source. |
Done |
||
Complete documentation and demonstrate with the help of examples the use of the MEX API for existing MEX based libraries. |
Help section |
Done |
||
Try to find a work around for the inconsistent functions between mexlib in Scilab and the mex functions in Matlab. |
Will work on this after toolbox work is complete. |
Pending |
||
Write more tests for the existing mex functions in Scilab to increase test coverage. |
Will work on this after toolbox work is complete. |
Pending |
||
Clean up the code. Make any final changes if necessary. Fix any merge conflicts or issues that might be present. |
End check. |
Done |
Summary of above points -
- Write final Builder.
- Help for the functions.
- Update dependencies.
- Port remaining functions. (add tests if possible)
Code is updated on the following Github repo: https://www.github.com/sidgairo18/SCILAB_MEX_TOOLBOX/
Notes and Updates for Final Submission
The work is complete and the Mex Toolbox is ready as of 7 August, 2018. The final toolbox is available on github in the FINAL_SUBMISSION directory of the following repo - https://github.com/sidgairo18/SCILAB_MEX_TOOLBOX/tree/master/FINAL_SUBMISSION
Help .xml files have been added for most functions. Please read the README and Build files to install dependencies and build the Toolbox function files.
For any bugs or issues please add them here - https://github.com/sidgairo18/SCILAB_MEX_TOOLBOX/issues or email me at - siddhartha.gairola18@gmail.com
Comments for final Submission -
- The help for most functions is present. (Check help/ directory)
- See BUILD for build instructions and pre-installation.
- Go through README to see dependencies or any other information about the toolbox.
- Func-List - contains the list of functions which have been ported from Alec Jacobson's Geometry Processing Toolbox.
Build Instructions -
Pre-Installation
Install Scilab (>=6.0.1)
Download Geometry Processing Toolbox
From - https://github.com/sidgairo18/SCILAB_MEX_TOOLBOX
(can git clone this repository and the toolbox can be found in https://github.com/sidgairo18/SCILAB_MEX_TOOLBOX/FINAL_SUBMISSION)
Build the toolbox
Run the following code in Scilab command window:
--> cd /path/to/Geometry_Processing_Toolbox/src/cpp --> exec runner.sce
If no error appears, then the functions in the Geometry Processing Toolbox can be used.
My Commits