Hi Xavier,
I find your observation slightly surprising. I assume you do very roughly something like this:
n = nest.Create(...)
nest.Connect(n, n)
l = nest.GetLocalNodeCollection(n)
c = nest.GetConnections(source=n, target=l)
w = c.weight
total_w = sum(w) # and sum across MPI processes
c.weight /= total_w
The critical point here being the GetConnections() call. Since GetConnections() only returns connections with local targets, the following two calls should give identical results:
nest.GetConnections(source=n, target=l)
nest.GetConnections(source=n, target=n)
I haven't had time to look at the implementation of GetConnections() yet, but naïvely I'd almost expect the first call to be slower, because the node collection l has a more complicated structure than the node collection n.
If my interpretation of your use case is correct, we should take a look at the implementation of GetConnections().
Best,
Hans Ekkehard
--
Prof. Dr. Hans Ekkehard Plesser
Research Committee Chair, Faculty of Science and Technology
Department of Data Science
Faculty of Science and Technology
Norwegian University of Life Sciences
PO Box 5003, 1432 Aas, Norway
Phone +47 6723 1560
From: Xavier Otazu Porter <xotazu@cvc.uab.cat>
Date: Monday, 15 June 2026 at 11:37
To: NEST User Mailing List <users@nest-simulator.org>
Subject: [NEST Users] Re: GetLocalNodeCollection at version 3.10
Hi Hans!
About first point, I agree it appears risky, but users of this function are aware of what it implies. If somebody doesn't want to take this risk, a GetNodeCollection() function is OK.
About second point, I do not use GetLocalNodeCollection() with devices (do not know about other users). As said before, if it is explained in the function documentation, the user should take the risk of using it.
About third point ... I take the local nodes in order to retrieve the incoming synapsis weights (hence, these variables are also "local" for every MPI process). I perform weight normalization (there is an example in the web documentation page) and it is MUCH
faster when performed on local nodes (every MPI automatically processes ONLY its own weights). I also change nodes parameters, but it is not a bottleneck. But if you say that from version 3.10 GetLocalNodeCollection() is slower and, in addition, it does not
work correctly with spatial node collections (I use them), then I have a serious problem ... 🙁
Best,
Xavier
From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
Sent: Friday, June 12, 2026 11:40 AM
To: NEST User Mailing List <users@nest-simulator.org>
Subject: [NEST Users] Re: GetLocalNodeCollection at version 3.10
Hello Xavier,
Thank you very much for your input! We deprecated GetLocalNodeCollection() for several reasons:
But it may be that we have overlooked important use cases for doing rank-specific operations based on GetLocalNodeCollection(). Could you write a bit about your use case?
Best,
Hans Ekkehard
--
Prof. Dr. Hans Ekkehard Plesser
Research Committee Chair, Faculty of Science and Technology
Department of Data Science
Faculty of Science and Technology
Norwegian University of Life Sciences
PO Box 5003, 1432 Aas, Norway
Phone +47 6723 1560
From: Xavier Otazu <xotazu@cvc.uab.cat>
Date: Friday, 12 June 2026 at 10:40
To: users@nest-simulator.org <users@nest-simulator.org>
Subject: [NEST Users] GetLocalNodeCollection at version 3.10
Hi!
I have seen that in the latest 3.10 version you have deprecated GetLocalNodeCollection() ...
I would very please you to DON'T do it. Since it has the "Local" word, we users know that it only returns MPI nodes. Hence, we know that we have to deal with it and the hight risk of incorrect code, but it is not more difficult that writing concurrent code
in mind. This function HUGELY accelerates execution of the code because we (programmers) know that it (and operations on nodes and their connections) is executed in different MPI processes with different data.
Best,
Xavier
_______________________________________________
NEST Users mailing list -- users@nest-simulator.org
To unsubscribe send an email to users-leave@nest-simulator.org