Skip to content

Extreme memory usage when setting a non-existent synapse property #3359

@clinssen

Description

@clinssen

When setting a non-existent property on a large number of synapses, the memory consumption of NEST explodes and the process soon crashes. Minimal reproducer:

import numpy as np
import nest

pop = nest.Create("iaf_psc_exp", 160000)
nest.Connect(pop, pop, "one_to_one")
connections = nest.GetConnections()
connections.set({"awefwef": np.linspace(0,1,len(connections))})  # crash here

This is working totally fine for 16000 nodes on my system and gives the following (expected) error message without delay:

NESTErrors.DictError: DictError in SLI function SetStatus_CD: Unused dictionary items:  awefwef
Maybe you tried to set common synapse properties through an individual synapse?

If I change the line to

connections.set({"awefwef": 42})

the issue also goes away, so having a large data payload seems to be part of the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    I: No breaking changePreviously written code will work as before, no one should note anything changing (aside the fix)S: NormalHandle this with default priorityT: BugWrong statements in the code or documentationstaleAutomatic marker for inactivity, please have another look here

    Type

    No type

    Projects

    Status

    To do

    Status

    To do (open issues)

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions