project-rig / rig

A collection of tools for developing SpiNNaker applications.
GNU General Public License v2.0
4 stars 0 forks source link

Fix bug in machine boot kwargs #265

Closed mundya closed 7 years ago

mundya commented 7 years ago

Some of the keyword arguments used to boot SpiNNaker machines were overloaded. In particular, boot_delay is present both in the sv struct and in the list of arguments expected by boot. This commit fixes this issue by making it possible to set the SV overrides explicitly.

Note that the API changes are backwards compatible, this only adds to the commands accepted by boot.


Example of problem

mc.boot(boot_delay=10) 

If it was intended that this value were used to modify the value in the SV struct this will not happen. Instead the value of boot_delay is used to change the delay between transmitting boot packets to the SpiNNaker machine.

After this commit the correct call is

mc.boot(sv_overrides={"boot_delay": 10})

Tests

This is hard to test well, so I've opted for not adding further tests. I can probably be persuaded to change my mind.

Thanks @lplana for spotting this!

neworderofjamie commented 7 years ago

Ick, but it makes sense