logo.jpg

GSoC 2018 - Working Demo with Usage Docs for the Mex Module

Student and Mentors

Student Name -

Mentors -

Timeline for GSoC 2018

This timeline is for after the students projects were announced on 23rd of April, 2018.

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 -

The project would be divided into following 3 parts:

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

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

Second Evaluation Notes -

Work done -

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 -

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 -

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:

If no error appears, then the functions in the Geometry Processing Toolbox can be used.

My Commits

Link

FINAL CODE

CategoryHomepage

public: Working Demo with Usage Docs for the Mex Module (last edited 2018-08-10 17:38:27 by 14)