PyNN icon indicating copy to clipboard operation
PyNN copied to clipboard

Temporary fix for MPI bug in Projection.get

Open lkoelman opened this issue 7 years ago • 2 comments

This is a rather subtle bug. With MPI enabled it fails with error "File "projections.py", line 352, in get() : return values[0] : IndexError: list index out of range"

The problem is that if gather is not 'all', on line 352 the method tries to address the array which is empty on nodes with rank != 0. Another solution would be to put that statement inside the preceding if-block and merge that if block with the enclosing one, so an empty 'values' is returned on nodes with rank != 0.

lkoelman avatar Jun 18 '18 09:06 lkoelman

Many thanks for spotting this problem.

Concerning the proposed solution, I would prefer not to change the public API where it can be avoided. In addition, using 'all' increases the network traffic, so will potentially slow down many simulations unnecessarily.

Please could you create an Issue with a minimal script that illustrates the problem?

apdavison avatar Jun 19 '18 15:06 apdavison

That seems sensible. I'll implement the other proposed fix then? This may take a while as I'm currently busy with a deadline though (ISEK 2018).

PS: thanks for all the good work on PyNN and Neo, finding it a delight to work with :)

lkoelman avatar Jun 21 '18 12:06 lkoelman