I really just want to run in PyNN with nest as the simulator. (I eventually want to run the same code in SpiNNaker, but that’s an entirely different kettle of fish.) However, it does seem that the problem is with nest, again because nest (invokes sli SLI>) fails, pynest fails, and pynn with nest fails. These all fail when I have the NEST_MODULES variable set, and do not fail when I do not have it set. I can actually use the iaf_cond_beta_neuron in pynest when I do not have the NEST_MODULES variable set.
My problem popped up when I was trying to use my own synapse model and the iaf_cond_beta_neuron model. (Yes, I know about, in my case iaf_cond_beta_neruon__with_stp_synapse, but thanks anyway.) This morning while trying to fix the problem, I made the nestmlmodule.so file with just the iaf_cond_beta_neuron. That’s what runs in pyNest now.
I can imagine the SLI is interpreted language, but it gets compiled (like python usually does to a .pyc file). So, when I use nest - - debug, the M_DEBUG change doesn’t come through when I rerun it. Is that the case?
Look, I do appreciate that you’ve responded to several emails today. It is entirely plausible that I’m making some stupid mistake. However, I’m digging down into your sli code to debug this, and I’m not particularly well equipped to do that. I’m getting to the point that I’m just going to try to rebuild nest. However, if the bug I caused with nestml happens again, I could end up spending a lot of time building nest. I’d really like to avoid that. Do you have any idea how that last nest-init.sli line causes a crash when there is a working nestmlmodule.so file? On a perhaps simpler note, do you have any idea how to get the change to the M_DEBUG line into nest so that I can debug using those M_DEBUG prints? Do you think I should just give up on it and rebuild nest?
-Chris
From: Charl Linssen <nest-users@turingbirds.com>
Sent: 06 February 2025 15:25
To: users@nest-simulator.org
Subject: [NEST Users] Re: export NEST_MLMODULES=nestmlmodule breaks nest
Dear Chris,
SLI is an interpreted language that is now deprecated and will be removed in future versions of NEST. What are you ultimately trying to do—to run NEST without needing a Python interpreter? You may want to consider using the (unofficial) C++ API for that, which you can find in ``nestkernel/nest.h``.
If you are building a neuron and synapse model from NESTML, please check the output of the NESTML toolchain for errors that might have gone unnoticed. Also notice that the names of the models will be changed due to interdependencies between the neuron and synapse model, resulting in names such as "iaf_psc_exp__with__stdp_synapse" and "stdp_synapse__for__iaf_psc_exp".
With kind regards,
Charl
On Thu, Feb 6, 2025, at 15:44, Chris Huyck wrote:
You are correct. NEST_MLMODULES was not the environment variable I was using. The variable I was (and am) using is NEST_MODULES. (Sorry I’m typing copying not cut and pasting.)
I’m using nest3.7 that I built in August. The error that I gets, prompts me to run nest - - debug, which I do.
I’m now trying to unpack that and it includes .sli files, nest-init.sli and sli-init.sli in particular.
I assume that language is sli, which I don’t really know.
In nest-init.sli the last line is NEST_MODULES. I think it’s failing on that command, but I’m not sure.
I modified the M_DEBUG statement at the beginning of nest-init.sli “Initializing SLI support” to “Initializing SLI C support”, and the change doesn’t come through. I expect that the sli code is compiled in the build process. I don’t want to rebuild. I expect one option is just to build nest from scratch.
-Chris
From: Chris Huyck <C.Huyck@mdx.ac.uk>
Sent: 06 February 2025 12:38
To: NEST User Mailing List <users@nest-simulator.org>
Subject: [NEST Users] Re: export NEST_MLMODULES=nestmlmodule breaks nest
Thanks, but that’s not my problem. The systems are clearly finding the file. They found it before I had my problem. (The library sits in a file in the nest directory. Nestml copies it from the targetdir to there.) If I set the LD_LIBRARY_PATH, it doesn’t help. (I tried before, and just now.) The problem is that when you call nest (and I think nest.nest_init) any way, it has some problem. Another key indicator, from my initial email below, is that I can actually load the library, and use it if I run it in pynest without the NEST_MLMODULES variable.
(You are indeed right that nestml does not use the environment variable, at least the way I use it. I can run nestml.) I’m pretty sure that nest does use it in some fashion. I’m not sure if there is something cached away in a temporary file or variable. (I don’t think it’s a __pycache__ thing because the problem arises when I used the nest command (and get an SLI prompt)).
-Chris
From: Charl Linssen <nest-users@turingbirds.com>
Sent: 06 February 2025 11:44
To: users@nest-simulator.org
Subject: [NEST Users] Re: export NEST_MLMODULES=nestmlmodule breaks nest
Hi Chris,
NEST_MLMODULES is not an environment variable used by NEST or NESTML, so it shouldn't affect anything. To help NEST find the "nestmlmodule.so" file that is generated by NESTML, you can use LD_LIBRARY_PATH (on the Mac: DYLD_LIBRARY_PATH) to specify the path.
Please let us know if this helps.
With kind regards,
Charl
On Thu, Feb 6, 2025, at 12:29, Chris Huyck wrote:
I’ve been using nestml with pynn and nest for some time.
I think I built a new model (combining a synapse and a neuron) and it broke nest.
So, I can start an environment that has nest, and run nest (sli), pynest and pynn files with nest.
However, if I
export NEST_MLMODULES=nestmlmodule it breaks nest (sli).
That is, I invoke nest, and it says it can’t find nestmlmodule.
However, if I start a new shell, and do not export NEST_MLMODULES I can run python, import nest, then
nest.Install(“./nestmlmodule”) # in the right directory
neuron = nest.Create(“iaf_cond_beta_neuron”)
If I then export NEST_MLMODULES=nestmlmodule I can’t import nest from python.
Somewhere in the middle of all this, I reran nestml to create just the iaf_cond_beta_neuron, so that’s the library I’m using. I’m pretty sure that library works fine.
Any idea how to fix it?
-Chris
From: Chris Huyck <C.Huyck@mdx.ac.uk>
Sent: 31 January 2025 12:10
To: NEST User Mailing List <users@nest-simulator.org>
Subject: [NEST Users] Re: nestml synapses in pyNN
I’m trying to use my own short term potentiation model with an existing model. The model is the IF_cond_exp model from PyNN. I tried your nestml integrate and fire models from
Git…/nestml/master/models/neurons, and none seem to be the IF_cond_exp model. The closest I could find was the iaf_cond_beta_neuron. Am I missing something. Is the IF_cond_exp model done somewhere in nestml? (I’m relatively vested in that IF_cond_exp model. I need the nestml neuron model before I can properly use the nestml synapse model.)
-Chris
From: Charl Linssen <nest-users@turingbirds.com>
Sent: 23 July 2024 11:25
To: users@nest-simulator.org
Subject: [NEST Users] Re: nestml synapses in pyNN
You don't often get email from nest-users@turingbirds.com. Learn why this is important
Hi Chris,
Thank you for writing in! It would be great to have a better compatibility and better documentation for using NESTML models in pyNN, but as of now this is not yet in place, please let us know if you have any tips or experience to share.
On SpiNNaker, only neuron models are supported for now, we have an open position for a student project to implement synaptic plasticity as well!
With kind regards,
Charl
On Mon, Jul 22, 2024, at 16:32, Chris Huyck wrote:
I’ve taken your noisy_synapse model and got that to run in pyNest. When I try it in PyNN it fails (can’t find weight if you set w, weight not an argument if you use weight). I understand that you don’t support pyNN. Do you support SpiNNaker (as it’s a target)? If so, how do you access the model on SpiNNaker? (I only access SpiNNaker through PyNN).
-Chris
_______________________________________________
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
_______________________________________________NEST Users mailing list -- users@nest-simulator.orgTo unsubscribe send an email to users-leave@nest-simulator.org