Hi Chiara,

We concluded that implementing this from NEST would be difficult. We will update the NESTML documentation to forbid using random number generators in parameters and state blocks. They can still be used in the update block.

So the way forward would be to initialize your parameters from PyNEST with nest.random.normal() function. Does this solution work for your case? Is there a specific case where you would want the generators in the neuron model?

Thanks,
Pooja

On 19. Mar 2024, at 11:00, chiara de luca <deluca.1665541@studenti.uniroma1.it> wrote:

Dear Pooja,

thank you very much for your kind response. Yes, I can definitely implement such feature in alternative ways. Still, I would like to create a neuron model simulating hardware platform mismatch and would be nice to be able to initialize each parameter with a defined uncertainty :)

thanks!

Chiara



Il giorno mar 19 mar 2024 alle ore 10:31 Babu, Pooja <p.babu@fz-juelich.de> ha scritto:
Hi Chiara,

Thank you for writing to us.

This error is something that needs to be fixed from our side. I have created an issue for this: https://github.com/nest/nestml/issues/1016

For now, could I ask you to remove the call to random_normal() from the parameters block and instead use the PyNEST set() function for the neuron to set the random number from the simulation script? Please find some examples here: https://nest-simulator.readthedocs.io/en/stable/nest_behavior/random_numbers.html#examples-of-using-randomness

I hope this helps!

Best regards,
Pooja

On 18. Mar 2024, at 15:24, chiara de luca <deluca.1665541@studenti.uniroma1.it> wrote:

Dear NESTML community,

I have a problem with random number generator in the new version of nestml. Specifically, I am using

nest 3.6.0
nestml 7.0

This is what I would like to do:

whenever creating a neuron with a set of parameters defined by the user, each parameter should be affected by a "gaussian error" with defined variability.

I tried to use the internal random_normal() function but with the current version I am getting some issues there. Specifically, whenever trying to call such function from the "internals", "parameters", "state" blocks the model is correctly generated (no errors returned) but exits with en error whenever trying to "install".

The error is the following

Assertion failed: (tid < static_cast< size_t >( vp_specific_rngs_.size() )), function get_vp_specific_rng, file my/path/to/miniforge3/conda-bld/nest-simulator_1707218961774/work/nestkernel/random_manager.h, line 173.
[1]    32875 abort      python test.py

Such problem does not exist for random_normal() called within the update and equations blocks.

Attached some minimal code to reproduce the error.

Best,

Chiara
<minimal.zip>_______________________________________________
NEST Users mailing list -- users@nest-simulator.org
To unsubscribe send an email to users-leave@nest-simulator.org

_______________________________________________
NEST Users mailing list -- users@nest-simulator.org
To unsubscribe send an email to users-leave@nest-simulator.org
_______________________________________________
NEST Users mailing list -- users@nest-simulator.org
To unsubscribe send an email to users-leave@nest-simulator.org