GSoC2018: A Simulation Execution Manager for ns-3
Return to GSoC 2018 Accepted Projects page.
- Project name: A Simulation Execution Manager for ns-3
- Student: Davide Magrin
- Mentor: Dizhi Zhou
- Abstract: This GSoC project will develop a Python library to automatize the ns-3 simulation script execution and result management processes.
- Proposal: PDF
- Code: Github repository
- Documentation: ReadTheDocs
- About me: I am a first-year PhD student at the University of Padova, Italy, working under the supervision of Prof. Michele Zorzi. My research interests include large scale IoT network simulation and medium access layer protocol design.
Week 1 (May 14 - May 19)
Week 1 was used to set up the project and define the structure of the code that will be necessary to get to Milestone 1. For now, code is maintained in src/stats/utils.
- Created a basic Python project using pipenv;
- Defined an initial set of classes and functions to outline code structure (code available in the sem folder);
- A detailed report can be found in the dev.txt file in the project repository.
Week 2 (May 21 - May 25)
Week 2 was dedicated to a first implementation of the database management structures.
- Moved project to its own github repository, outside ns-3-dev;
- Created documentation page, available at readthedocs;
- Implemented database creation, management and insertion/querying of results.
- Code available at the project repository, under tag gsoc-week2
Week 3 (May 28 - June 1)
Week 3 saw the implementation of simulation running facilities in SEM.
- Interfaced with waf libraries, to programmatically get information about libraries and the script executable. Now waf isn't needed anymore to run simulations from the sem library;
- Created an ns-3 git submodule to facilitate example execution;
- Stdout and files created by ns-3 scripts are now saved in the database;
- Added code to perform sequential simulations;
- Added a simple ParallelRunner class that uses threads to spawn multiple simulations in parallel;
- Extended the documentation;
- Add a function that takes into account the contents of the database before running simulations to get a list of parameter combinations and desired repetitions for each.
Week 4 (June 4 - June 8)
Week 4 was dedicated to writing code to allow users to export simulation results.
- Check whether the ns-3 repository is at the right commit before running simulations;
- Added numpy and xarray exports
- Progress bars were added to indicate the advancement in compilation and simulation running.
Week 5 (June 11 - June 15)
Week 5 was dedicated to writing tests and documentation.
- Set up pytest/ns-3 test facilities;
- Wrote tests for database, campaign manager and runner;
- Re-wrote the getting started section of the documentation to show how it's possible to go from a vanilla ns-3 installation to plotting results;
- Added example plots to the wifi-plotting-xarray.py example.
Week 6 (June 18 - June 22)
Week 6 was mainly focused on adding support for running ns-3 simulations on cluster architectures.
- Added the GridRunner class, which allows users to run simulations on any DRMAA compatible cluster architecture;
- Output files produced by simulations can now be easily accessed through dedicated functions.