__
Hi, sorry, but this is turning out to be a little bit tricky.
First, there is a problem with the NEST environment: when NESTML runs and tries to query
the NEST version, the correct $PYTHONPATH is not picked up so there is an error when it
tries to run "import nest" from a subprocess.
I manually worked around that, but then there is an error with the build step: "The
CMAKE_CXX_COMPILER: /usr/local/bin/x86_64-conda-linux-gnu-c++ is not a full path to an
existing compiler tool." I believe this is a known issue with running via conda. I
was not able to bypass this error by overriding the CMake flags.
These issues might take a considerable time to solve on our side. Would it be possible
for you to use an alternative way of running NEST/NESTML? Personally I often use the
Docker containers for deployment. Possibly, you could also obtain access to the European
EBRAINS cloud via your institution.
Sorry for the difficulty, but we do not have experience using Google Collab for running
NEST/NESTML and a lot of workarounds are needed. Steffen: as you are maintaining the
Anaconda packages, do you have any thoughts on this issue? Why doesn't everything
(including the shell environment) run from inside the conda environment? I thought
everything in our Anaconda distribution is set up right for using NESTML.
Cheers!
Charl
On Wed, May 8, 2024, at 20:01, Ashraf Ul Islam Shihab wrote:
Hi,
I installed NEST using the following code.
loading = False
from google.colab import drive
drive.mount('/content/drive')
!pip install -q condacolab
import condacolab
condacolab.install()
!conda install -c conda-forge nest-simulator
import nest
nest.__version__
!pip install nestml
import pynestml
pynestml.__version__
Then, I manually imported the path to iaf_psc_delta_neuron.nestml. It gave me this
error:
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-10-7981312f3233> <https://localhost:8080/#> in <cell line:
1>()
----> 1 module_name, neuron_model_name, synapse_model_name =
NESTCodeGeneratorUtils.generate_code_for(
* 2* "/content/iaf_psc_delta_neuron.nestml",
* 3* nestml_stdp_model,
* 4* post_ports=["post_spikes"])
* 5*
/usr/local/lib/python3.10/site-packages/pynestml/codegeneration/nest_code_generator_utils.py
<https://localhost:8080/#> in generate_code_for(cls, nestml_neuron_model,
nestml_synapse_model, module_name, target_path, post_ports, mod_ports, logging_level)
* 87*
* 88* # update neuron model name inside the file
---> 89 neuron_model_name = re.findall(r"neuron [^:\s]*:",
nestml_neuron_model)[0][7:-1]
* 90* neuron_fn = neuron_model_name + ".nestml"
* 91* with open(neuron_fn, "w") as f:
IndexError: list index out of range
This is on NEST version 3.7.0 and NESTML version 7.0.2.
Best,
Ashraf
On Wed, May 8, 2024 at 4:59 AM Charl Linssen <nest-users(a)turingbirds.com> wrote:
__
Hi,
Thanks for your inquiry! I'm not sure from your description what the actual problem
is, you are running the stdp_windows tutorial notebook, and there is an error? Could you
post a full log?
It would be great if you could use the latest NESTML version from GitHub (try running
python3 -m pip install
git+https://github.com/nest/nestml/).
Note that the notebook (in cell 3) contains the path
"../../../models/neurons/iaf_psc_delta_neuron.nestml", so you should first
change directory (cd) to "doc/tutorials/stdp_windows" and run Jupyter Notebook
or Python from that directory. There is no need to change any internal code inside the
generate_code_for() function.
For the error importing the "nest" module in Python, please make sure that the
environment is set up correctly before starting the Jupyter Notebook server. Typically you
can do this by sourcing nest_vars.sh (see bottom of this page
<https://nest-simulator.readthedocs.io/en/stable/installation/noenv_install.html#noenv>),
which sets up the correct PYTHONPATH environment variable. How did you install NEST?
With kind regards,
Charl
On Wed, May 8, 2024, at 00:54, Ashraf Ul Islam Shihab wrote:
> Hi,
>
> In nestml/doc/tutorials/stdp_windows notebook, in cell 3, I see an example of
fetching model name, neuron name, and synapse name from
nestml/models/neurons/iaf_psc_delta_neuron.nestml, which appears to have only model inside
of it. It tries to extract the names from a format of
> 1. model <name>:
> 2. neuron <name>:
> 3. synapse <name>:
> But the iaf_psc_delta_neuron.nestml file from the latest build doesn't have any
structure as neuron <name>: to my best knowledge. Please let me know if there is any
fix for this problem.
>
> I went ahead and tried to edit the generate_code_for function from
NESTCodeGeneratorUtils class. It can be found here <https://pastebin.com/Qz8JwinA>.
But it gives an error as follows:
>> [6,GLOBAL, ERROR]: An error occurred while importing the `nest` module in Python.
Please check your NEST installation-related environment variables and paths, or specify
``nest_version`` manually in the code generator options.
>> An exception has occurred, use %tb to see the full traceback.
>
>
>
> Best,
> Ashraf Ul Islam Shihab
>
> Graduate Research Assistant
>
> Department of Electrical and Computer Engineering
> Boise State University (BSU)
>
> Boise, Idaho 83725
>
> Email: ashrafshihab(a)u.boisestate.edu
>
>
> _______________________________________________
> NEST Users mailing list -- users(a)nest-simulator.org
> To unsubscribe send an email to users-leave(a)nest-simulator.org
>
_______________________________________________
NEST Users mailing list -- users(a)nest-simulator.org
To unsubscribe send an email to users-leave(a)nest-simulator.org
_______________________________________________
NEST Users mailing list -- users(a)nest-simulator.org
To unsubscribe send an email to users-leave(a)nest-simulator.org
_______________________________________________
NEST Users mailing list -- users(a)nest-simulator.org
To unsubscribe send an email to users-leave(a)nest-simulator.org