Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with random_normal() function #1016

Open
pnbabu opened this issue Mar 18, 2024 · 1 comment
Open

Error with random_normal() function #1016

pnbabu opened this issue Mar 18, 2024 · 1 comment

Comments

@pnbabu
Copy link
Contributor

pnbabu commented Mar 18, 2024

When the random_normal() function is called from the parameters or state block of the NESTML model, the simulation script with the model throws an error:

Assertion failed: (tid < static_cast< size_t >( vp_specific_rngs_.size() )), function get_vp_specific_rng, file random_manager.h, line 166.

In the generated code, the parameter with the random_normal() function is initialized in the constructor

P_.internal_val = ((0) + (0.2) * normal_dev_( nest::get_vp_specific_rng( get_thread() ) )); // as real

At this point in the code, the thread ID via the get_thread() function is not yet available with the node which results in the error.

@clinssen
Copy link
Contributor

Based on discussion at the 2024 Q1 NEST hackathon, we concluded that implementing this in NEST Simulator would be difficult. In this case, we should forbid users from using RNGs in the parameters (or internals, or state) initialisation when generating code for the NEST target. (This should be a target platform-specific coco.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants