Hi Charl,

Thank you for the helpful response. It was exactly as you said and everything works now.

Have a nice weekend :) 

Kind regards,
Jona

On Fri, Sep 13, 2024 at 10:38 AM Charl Linssen <nest-users@turingbirds.com> wrote:
Ah, yes, that is indeed very informative. It indicates that the Boost C++ libraries are missing. Would it be possible for you to add Boost to the conda environment?

Perhaps you could check the full installation instructions for NESTML on Anaconda at: https://nestml.readthedocs.io/en/latest/installation.html#anaconda-installation

Hope this helps!
Charl


On Fri, Sep 13, 2024, at 09:41, Jona Scholz wrote:
Hi Charl,

The terminal logs are shown below. Is that the error message you were looking for? 

Thanks for your help :)

Kind regards,
Jona

CMake Warning (dev) at CMakeLists.txt:93 (project):
  cmake_minimum_required() should be called prior to this top-level project()
  call.  Please see the cmake-commands(7) manual for usage documentation of
  both commands.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The CXX compiler identification is GNU 11.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/jona/miniconda3/envs/neuro/bin/x86_64-conda-linux-gnu-c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done

-------------------------------------------------------
nestml_7f8d1ff3e3e8497da87659816759e61b_module Configuration Summary
-------------------------------------------------------

C++ compiler         : /home/jona/miniconda3/envs/neuro/bin/x86_64-conda-linux-gnu-c++
Build static libs    : OFF
C++ compiler flags   : -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/jona/miniconda3/envs/neuro/include
NEST compiler flags  : -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/jona/miniconda3/envs/neuro/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/nest-simulator_1724732927678/work=/usr/local/src/conda/nest-simulator-3.8 -fdebug-prefix-map=/home/jona/miniconda3/envs/neuro=/usr/local/src/conda-prefix -lrt -std=c++17 -Wall -fopenmp -O2 -fdiagnostics-color=auto
NEST include dirs    :  -I/home/jona/miniconda3/envs/neuro/include/nest -I/home/jona/miniconda3/envs/neuro/include -I/home/jona/miniconda3/envs/neuro/include -I/home/jona/miniconda3/envs/neuro/include -I/home/jona/miniconda3/envs/neuro/include
NEST libraries flags : -L/home/jona/miniconda3/envs/neuro/lib/nest -lnest -lsli /home/jona/miniconda3/envs/neuro/x86_64-conda-linux-gnu/sysroot/usr/lib/libpthread.so

-------------------------------------------------------

You can now build and install 'nestml_7f8d1ff3e3e8497da87659816759e61b_module' using
  make
  make install

The library file libnestml_7f8d1ff3e3e8497da87659816759e61b_module.so will be installed to
  /tmp/nestml_target_t1m_k1tx
The module can be loaded into NEST using
  (nestml_7f8d1ff3e3e8497da87659816759e61b_module) Install       (in SLI)
  nest.Install(nestml_7f8d1ff3e3e8497da87659816759e61b_module)   (in PyNEST)

CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.30)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done (3.7s)
-- Generating done (0.0s)
-- Build files have been written to: /home/jona/rstdp-gym/target
[ 66%] Building CXX object CMakeFiles/nestml_7f8d1ff3e3e8497da87659816759e61b_module_module.dir/iaf_psc_alpha_neuron_nestml.o
[ 66%] Building CXX object CMakeFiles/nestml_7f8d1ff3e3e8497da87659816759e61b_module_module.dir/nestml_7f8d1ff3e3e8497da87659816759e61b_module.o
In file included from /home/jona/miniconda3/envs/neuro/include/nest/sort.h:36,
                 from /home/jona/miniconda3/envs/neuro/include/nest/connector_base.h:35,
                 from /home/jona/miniconda3/envs/neuro/include/nest/connection_manager.h:36,
                 from /home/jona/miniconda3/envs/neuro/include/nest/connection_manager_impl.h:26,
                 from /home/jona/rstdp-gym/target/nestml_7f8d1ff3e3e8497da87659816759e61b_module.cpp:26:
/home/jona/miniconda3/envs/neuro/include/nest/iterator_pair.h:26:10: fatal error: boost/iterator/iterator_adaptor.hpp: No such file or directory
   26 | #include <boost/iterator/iterator_adaptor.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from /home/jona/miniconda3/envs/neuro/include/nest/sort.h:36,
                 from /home/jona/miniconda3/envs/neuro/include/nest/connector_base.h:35,
                 from /home/jona/miniconda3/envs/neuro/include/nest/connection_manager.h:36,
                 from /home/jona/miniconda3/envs/neuro/include/nest/kernel_manager.h:30,
                 from /home/jona/rstdp-gym/target/iaf_psc_alpha_neuron_nestml.cpp:33:
/home/jona/miniconda3/envs/neuro/include/nest/iterator_pair.h:26:10: fatal error: boost/iterator/iterator_adaptor.hpp: No such file or directory
   26 | #include <boost/iterator/iterator_adaptor.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/nestml_7f8d1ff3e3e8497da87659816759e61b_module_module.dir/build.make:76: CMakeFiles/nestml_7f8d1ff3e3e8497da87659816759e61b_module_module.dir/nestml_7f8d1ff3e3e8497da87659816759e61b_module.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/nestml_7f8d1ff3e3e8497da87659816759e61b_module_module.dir/build.make:90: CMakeFiles/nestml_7f8d1ff3e3e8497da87659816759e61b_module_module.dir/iaf_psc_alpha_neuron_nestml.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:110: CMakeFiles/nestml_7f8d1ff3e3e8497da87659816759e61b_module_module.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

On Thu, Sep 12, 2024 at 12:17 PM Charl Linssen <nest-users@turingbirds.com> wrote:

Hi Jona,

Sorry about the error. It might be related to the conda environment; the issue seems to be that there is an error during compilation, but the error message is not shown in these logs. Could you check in your terminal (that you used to launch the Jupyter notebook server) for the error messages from gcc?

Cheers,
Charl


On Wed, Sep 11, 2024, at 22:06, Jona Scholz wrote:
Dear Charl and Anno,

Thank you for your replies. 

I hadn't heard about neurons that don't reset and will have to look into it more. Thank you :)

I can't seem to run the SFA neuron tutorial linked in Charl's reply. It fails in the first call to NESTCodeGeneratorUtils.generate_code_for(...) with an error found below. I have tried it on two Ubuntu systems using NestML versions 8.0.0-rc1 and 8.0.0-rc2 with the iaf_psc_alpha_neuron.nestml model from the NestML master branch. It is probably just some technical problem on my end and I'm sure I will be able to resolve it soon. Nonetheless, if anyone spots something obvious in the error message below, please let me know.

Thanks for your help and have a great day!

Kind regards,
Jona

The error message:
--------------------------------------------------------------------------- CalledProcessError Traceback (most recent call last) File ~/miniconda3/envs/neuro/lib/python3.10/site-packages/pynestml/codegeneration/nest_builder.py:174, in NESTBuilder.build(self) 173 current_stage = "build" --> 174 subprocess.check_call(make_all_cmd, stderr=stderr, stdout=stdout, shell=shell, 175 cwd=str(os.path.join(target_path))) 176 current_stage = "install" File ~/miniconda3/envs/neuro/lib/python3.10/subprocess.py:369, in check_call(*popenargs, **kwargs) 368 cmd = popenargs[0] --> 369 raise CalledProcessError(retcode, cmd) 370 return 0 CalledProcessError: Command '['make', '-j8', 'all']' returned non-zero exit status 2. During handling of the above exception, another exception occurred: GeneratedCodeBuildException Traceback (most recent call last) Cell In[2], line 3 1 # generate and build code 2 module_name_no_sfa, neuron_model_name_no_sfa = \ ----> 3 NESTCodeGeneratorUtils.generate_code_for("iaf_psc_alpha_neuron.nestml") File ~/miniconda3/envs/neuro/lib/python3.10/site-packages/pynestml/codegeneration/nest_code_generator_utils.py:136, in NESTCodeGeneratorUtils.generate_code_for(cls, nestml_neuron_model, nestml_synapse_model, module_name, target_path, post_ports, mod_ports, codegen_opts, logging_level) 133 uniq_id = str(uuid.uuid4().hex) 134 module_name = "nestml_" + uniq_id + "_module" --> 136 generate_nest_target(input_path=input_fns, 137 install_path=install_path, 138 logging_level=logging_level, 139 module_name=module_name, 140 target_path=target_path, 141 suffix="_nestml", 142 codegen_opts=_codegen_opts) 144 if nestml_synapse_model: 145 return module_name, mangled_neuron_name, mangled_synapse_name File ~/miniconda3/envs/neuro/lib/python3.10/site-packages/pynestml/frontend/pynestml_frontend.py:270, in generate_nest_target(input_path, target_path, install_path, logging_level, module_name, store_log, suffix, dev, codegen_opts) 243 def generate_nest_target(input_path: Union[str, Sequence[str]], target_path: Optional[str] = None, 244 install_path: Optional[str] = None, logging_level="ERROR", 245 module_name=None, store_log: bool = False, suffix: str = "", 246 dev: bool = False, codegen_opts: Optional[Mapping[str, Any]] = None): 247 r"""Generate and build code for NEST Simulator. 248 249 Parameters (...) 268 A dictionary containing additional options for the target code generator. 269 """ --> 270 generate_target(input_path, target_platform="NEST", target_path=target_path, logging_level=logging_level, 271 module_name=module_name, store_log=store_log, suffix=suffix, install_path=install_path, 272 dev=dev, codegen_opts=codegen_opts) File ~/miniconda3/envs/neuro/lib/python3.10/site-packages/pynestml/frontend/pynestml_frontend.py:193, in generate_target(input_path, target_platform, target_path, install_path, logging_level, module_name, store_log, suffix, dev, codegen_opts) 165 r"""Generate and build code for the given target platform. 166 167 Parameters (...) 188 A dictionary containing additional options for the target code generator. 189 """ 191 configure_front_end(input_path, target_platform, target_path, install_path, logging_level, 192 module_name, store_log, suffix, dev, codegen_opts) --> 193 if not process() == 0: 194 raise Exception("Error(s) occurred while processing the model") File ~/miniconda3/envs/neuro/lib/python3.10/site-packages/pynestml/frontend/pynestml_frontend.py:482, in process() 480 # perform build 481 if _builder is not None: --> 482 _builder.build() 484 if FrontendConfiguration.store_log: 485 store_log_to_file() File ~/miniconda3/envs/neuro/lib/python3.10/site-packages/pynestml/codegeneration/nest_builder.py:181, in NESTBuilder.build(self) 177 subprocess.check_call(make_install_cmd, stderr=stderr, stdout=stdout, shell=shell, 178 cwd=str(os.path.join(target_path))) 180 except subprocess.CalledProcessError as e: --> 181 raise GeneratedCodeBuildException(stages_exception[current_stage]) 183 finally: 184 if self._options["redirect"]:

On Tue, Sep 10, 2024 at 9:33 AM Anno Kurth <a.kurth@fz-juelich.de> wrote:
Hi Jona,

you might also be interested in the leaky integrate-and-fire model with
adaptive threshold
Here, the voltage is not reset after a threshold crossing, though.

Best

Anno

On 10.09.24 09:15, Charl Linssen wrote:
> Hi Jona,
>
> Thanks for writing in! Could the NESTML model(s) used in the tutorial at https://nestml.readthedocs.io/en/latest/tutorials/spike_frequency_adaptation/nestml_spike_frequency_adaptation_tutorial.html be what you're looking for? In general, it's easy to take a NESTML model (see https://nestml.readthedocs.io/en/latest/models_library/index.html) and add a threshold adaptation mechanism to it. Please let us know how you fare! (Please make sure you're using the latest NESTML, v8.0.0-rc1 or the GitHub master version.)
>
> With kind regards,
> Charl
>
> On Tue, Sep 10, 2024, at 08:09, jona.m.scholz@gmail.com wrote:
>> Hello everyone,
>>
>> just a quick question in case anybody knows: is there a LIF model that
>> has an adaptive spike threshold in NEST?
>>
>> I know there's the GLIF model which can have a threshold, but it seems
>> to bring other deviations from the conventional LIF model that I want
>> to avoid. There's also the adaptive exponential integrate and fire
>> model, but again I don't want the exponential part.
>>
>> It's not a problem if no such model exists in NEST, I am only asking so
>> I don't reimplement an existing model.
>>
>> Any feedback would be appreciated.
>>
>> Kind regards,
>> Jona
>> _______________________________________________
>> 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

--
Anno Kurth
Institute for Advanced Simulation (IAS-6)
Computational and Systems Neuroscience
Jülich Research Centre
Jülich, Germany

Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Stefan Müller
Geschäftsführung: Prof. Dr. Astrid Lambrecht (Vorsitzende),
Karsten Beneke (stellv. Vorsitzender), Dr. Ir. Pieter Jansens

_______________________________________________
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.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