Dear NESTML Users,
In the last post I fixed a problem that was related to the fact that in the 'izhikevich_solution.nestml' the first line was commented.
Now, after following the guide in "https://nestml.readthedocs.io/en/latest/installation.html" related to the NESTML installation, I tried to follow the NESTML Izhikevich tutorial in "https://nestml.readthedocs.io/en/latest/tutorials/izhikevich/nestml_izhikevi...". After installing the cmake with "pip install cmake", when I execute the following part of the tutorial:
generate_nest_target(input_path="izhikevich_solution.nestml", target_path="/tmp/nestml-component", logging_level="ERROR", codegen_opts={"nest_path": NEST_SIMULATOR_INSTALL_LOCATION})
I obtain the following error: Warning: PyGSL is not available. The stiffness test will be skipped. Warning: No module named 'pygsl'
Option "nest_path" does not exist in builder --------------------------------------------------------------------------- CalledProcessError Traceback (most recent call last) /opt/data/nestml/pynestml/codegeneration/nest_builder.py in build(self) 149 try: --> 150 subprocess.check_call(make_all_cmd, stderr=subprocess.STDOUT, shell=shell, 151 cwd=str(os.path.join(target_path)))
/usr/lib/python3.8/subprocess.py in check_call(*popenargs, **kwargs) 363 cmd = popenargs[0] --> 364 raise CalledProcessError(retcode, cmd) 365 return 0
CalledProcessError: Command '['make', 'all']' returned non-zero exit status 2.
During handling of the above exception, another exception occurred:
GeneratedCodeBuildException Traceback (most recent call last) <ipython-input-2-f0909be085f4> in <module> ----> 1 generate_nest_target(input_path="izhikevich_solution.nestml", 2 target_path="/tmp/nestml-component", 3 module_name="nestml_izhikevich_module", 4 suffix="_nestml", 5 logging_level="ERROR",
/opt/data/nestml/pynestml/frontend/pynestml_frontend.py in generate_nest_target(input_path, target_path, install_path, logging_level, module_name, store_log, suffix, dev, codegen_opts) 181 A dictionary containing additional options for the target code generator. 182 """ --> 183 generate_target(input_path, target_platform="NEST", target_path=target_path, logging_level=logging_level, 184 module_name=module_name, store_log=store_log, suffix=suffix, install_path=install_path, 185 dev=dev, codegen_opts=codegen_opts)
/opt/data/nestml/pynestml/frontend/pynestml_frontend.py in generate_target(input_path, target_platform, target_path, install_path, logging_level, module_name, store_log, suffix, dev, codegen_opts) 150 FrontendConfiguration.set_codegen_opts(codegen_opts) 151 --> 152 if not process() == 0: 153 raise Exception("Error(s) occurred while processing the model") 154
/opt/data/nestml/pynestml/frontend/pynestml_frontend.py in process() 278 options=FrontendConfiguration.get_codegen_opts()) 279 if _builder is not None: --> 280 _builder.build() 281 282 if FrontendConfiguration.store_log:
/opt/data/nestml/pynestml/codegeneration/nest_builder.py in build(self) 151 cwd=str(os.path.join(target_path))) 152 except subprocess.CalledProcessError as e: --> 153 raise GeneratedCodeBuildException('Error occurred during 'make all'! More detailed error messages can be found in stdout.') 154 155 # finally execute make install
GeneratedCodeBuildException: Error occurred during 'make all'! More detailed error messages can be found in stdout.
So, the "nest_path" keyword does not exist. Can anyone help me?
Best,
Salvo
Hi,
I'm happy to hear that you're making some progress.
Actually, the warning is misleading and can be ignored (Ayssar was already kind enough to open an issue about that, https://github.com/nest/nestml/issues/731).
The actual error must be occurring in a part of the logs that we are not seeing here, in particular the output of the C++ compiler. Sometimes, when you run in a Jupyter notebook, this output is sent to the console that you started the Jupyter server from. Sometimes it also appears as output text in one of the notebook cells. Could you post those additional parts of the logs?
Cheers! Charl
On Mon, Feb 28, 2022, at 13:38, Salvo T wrote:
Dear NESTML Users,
In the last post I fixed a problem that was related to the fact that in the 'izhikevich_solution.nestml' the first line was commented.
Now, after following the guide in "https://nestml.readthedocs.io/en/latest/installation.html" related to the NESTML installation, I tried to follow the NESTML Izhikevich tutorial in "https://nestml.readthedocs.io/en/latest/tutorials/izhikevich/nestml_izhikevi...". After installing the cmake with "pip install cmake", when I execute the following part of the tutorial:
generate_nest_target(input_path="izhikevich_solution.nestml", target_path="/tmp/nestml-component", logging_level="ERROR", codegen_opts={"nest_path": NEST_SIMULATOR_INSTALL_LOCATION})
I obtain the following error: Warning: PyGSL is not available. The stiffness test will be skipped. Warning: No module named 'pygsl'
Option "nest_path" does not exist in builder
CalledProcessError Traceback (most recent call last) /opt/data/nestml/pynestml/codegeneration/nest_builder.py in build(self) 149 try: --> 150 subprocess.check_call(make_all_cmd, stderr=subprocess.STDOUT, shell=shell, 151 cwd=str(os.path.join(target_path)))
/usr/lib/python3.8/subprocess.py in check_call(*popenargs, **kwargs) 363 cmd = popenargs[0] --> 364 raise CalledProcessError(retcode, cmd) 365 return 0
CalledProcessError: Command '['make', 'all']' returned non-zero exit status 2.
During handling of the above exception, another exception occurred:
GeneratedCodeBuildException Traceback (most recent call last) <ipython-input-2-f0909be085f4> in <module> ----> 1 generate_nest_target(input_path="izhikevich_solution.nestml", 2 target_path="/tmp/nestml-component", 3 module_name="nestml_izhikevich_module", 4 suffix="_nestml", 5 logging_level="ERROR",
/opt/data/nestml/pynestml/frontend/pynestml_frontend.py in generate_nest_target(input_path, target_path, install_path, logging_level, module_name, store_log, suffix, dev, codegen_opts) 181 A dictionary containing additional options for the target code generator. 182 """ --> 183 generate_target(input_path, target_platform="NEST", target_path=target_path, logging_level=logging_level, 184 module_name=module_name, store_log=store_log, suffix=suffix, install_path=install_path, 185 dev=dev, codegen_opts=codegen_opts)
/opt/data/nestml/pynestml/frontend/pynestml_frontend.py in generate_target(input_path, target_platform, target_path, install_path, logging_level, module_name, store_log, suffix, dev, codegen_opts) 150 FrontendConfiguration.set_codegen_opts(codegen_opts) 151 --> 152 if not process() == 0: 153 raise Exception("Error(s) occurred while processing the model") 154
/opt/data/nestml/pynestml/frontend/pynestml_frontend.py in process() 278 options=FrontendConfiguration.get_codegen_opts()) 279 if _builder is not None: --> 280 _builder.build() 281 282 if FrontendConfiguration.store_log:
/opt/data/nestml/pynestml/codegeneration/nest_builder.py in build(self) 151 cwd=str(os.path.join(target_path))) 152 except subprocess.CalledProcessError as e: --> 153 raise GeneratedCodeBuildException('Error occurred during 'make all'! More detailed error messages can be found in stdout.') 154 155 # finally execute make install
GeneratedCodeBuildException: Error occurred during 'make all'! More detailed error messages can be found in stdout.
So, the "nest_path" keyword does not exist. Can anyone help me?
Best,
Salvo _______________________________________________ NEST Users mailing list -- users@nest-simulator.org To unsubscribe send an email to users-leave@nest-simulator.org
Thanks for your answer. I modified the part of the code where I have the error, now it is: generate_nest_target(input_path="izhikevich_solution.nestml", target_path="/tmp/nestml-component", module_name="nestml_izhikevich_module", suffix="_nestml", logging_level="ERROR", codegen_opts={"nest_path": NEST_SIMULATOR_INSTALL_LOCATION})
The output of the Ubuntu terminal is the following:
-- N E S T -- Copyright (C) 2004 The NEST Initiative
Version: UNKNOWN Built: Jan 18 2022 13:53:41
This program is provided AS IS and comes with NO WARRANTY. See the file LICENSE for details.
Problems or suggestions? Visit https://www.nest-simulator.org
Type 'nest.help()' to find out more about NEST.
-- The CXX compiler identification is GNU 9.3.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done
------------------------------------------------------- nestml_izhikevich_module Configuration Summary -------------------------------------------------------
C++ compiler : /usr/bin/c++ Build static libs : OFF C++ compiler flags : NEST compiler flags : -std=c++11 -O2 -Wall -fopenmp -pthread -fdiagnostics-color=auto NEST include dirs : -I/opt/nest/include/nest -I/usr/include -I/usr/include -I/usr/include -I/opt/music-install/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/include NEST libraries flags : -L/opt/nest/lib/nest -lnestutil -lnest -lsli -lnestkernel -fopenmp /usr/lib/x86_64-linux-gnu/libltdl.so /usr/lib/x86_64-linux-gnu/libreadline.so /usr/lib/x86_64-linux-gnu/libncurses.so /usr/lib/x86_64-linux-gnu/libgsl.so /usr/lib/x86_64-linux-gnu/libgslcblas.so /opt/music-install/lib/libmusic.so /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so
-------------------------------------------------------
You can now build and install 'nestml_izhikevich_module' using make make install
The library file libnestml_izhikevich_module.so will be installed to /opt/nest/lib/nest The module can be loaded into NEST using (nestml_izhikevich_module) Install (in SLI) nest.Install(nestml_izhikevich_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.22)
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 -- Generating done -- Build files have been written to: /tmp/nestml-component [ 16%] Building CXX object CMakeFiles/nestml_izhikevich_module_module.dir/nestml_izhikevich_module.o In file included from /opt/nest/include/nest/connector_base.h:35, from /opt/nest/include/nest/connection_manager.h:36, from /opt/nest/include/nest/connection_manager_impl.h:26, from /tmp/nestml-component/nestml_izhikevich_module.cpp:26: /opt/nest/include/nest/sort.h:36:10: fatal error: boost/sort/spreadsort/spreadsort.hpp: No such file or directory 36 | #include <boost/sort/spreadsort/spreadsort.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [CMakeFiles/nestml_izhikevich_module_module.dir/build.make:76: CMakeFiles/nestml_izhikevich_module_module.dir/nestml_izhikevich_module.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:112: CMakeFiles/nestml_izhikevich_module_module.dir/all] Error 2 make: *** [Makefile:156: all] Error 2
Cheers! Salvo
fatal error: boost/sort/spreadsort/spreadsort.hpp: No such file or directory
It looks like there's a problem with your Boost installation. Perhaps Boost is installed in a non-standard location, or not at all? It is recommended (but not strictly necessary) to compile NEST Simulator itself with Boost, because it yields improvements in performance.
On Mon, Feb 28, 2022, at 14:31, Salvo T wrote:
Thanks for your answer. I modified the part of the code where I have the error, now it is: generate_nest_target(input_path="izhikevich_solution.nestml", target_path="/tmp/nestml-component", module_name="nestml_izhikevich_module", suffix="_nestml", logging_level="ERROR", codegen_opts={"nest_path": NEST_SIMULATOR_INSTALL_LOCATION})
The output of the Ubuntu terminal is the following:
-- N E S T -- Copyright (C) 2004 The NEST Initiative
Version: UNKNOWN Built: Jan 18 2022 13:53:41
This program is provided AS IS and comes with NO WARRANTY. See the file LICENSE for details.
Problems or suggestions? Visit https://www.nest-simulator.org
Type 'nest.help()' to find out more about NEST.
-- The CXX compiler identification is GNU 9.3.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done
nestml_izhikevich_module Configuration Summary
C++ compiler : /usr/bin/c++ Build static libs : OFF C++ compiler flags : NEST compiler flags : -std=c++11 -O2 -Wall -fopenmp -pthread -fdiagnostics-color=auto NEST include dirs : -I/opt/nest/include/nest -I/usr/include -I/usr/include -I/usr/include -I/opt/music-install/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/include NEST libraries flags : -L/opt/nest/lib/nest -lnestutil -lnest -lsli -lnestkernel -fopenmp /usr/lib/x86_64-linux-gnu/libltdl.so /usr/lib/x86_64-linux-gnu/libreadline.so /usr/lib/x86_64-linux-gnu/libncurses.so /usr/lib/x86_64-linux-gnu/libgsl.so /usr/lib/x86_64-linux-gnu/libgslcblas.so /opt/music-install/lib/libmusic.so /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so
You can now build and install 'nestml_izhikevich_module' using make make install
The library file libnestml_izhikevich_module.so will be installed to /opt/nest/lib/nest The module can be loaded into NEST using (nestml_izhikevich_module) Install (in SLI) nest.Install(nestml_izhikevich_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.22)
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 -- Generating done -- Build files have been written to: /tmp/nestml-component [ 16%] Building CXX object CMakeFiles/nestml_izhikevich_module_module.dir/nestml_izhikevich_module.o In file included from /opt/nest/include/nest/connector_base.h:35, from /opt/nest/include/nest/connection_manager.h:36, from /opt/nest/include/nest/connection_manager_impl.h:26, from /tmp/nestml-component/nestml_izhikevich_module.cpp:26: /opt/nest/include/nest/sort.h:36:10: fatal error: boost/sort/spreadsort/spreadsort.hpp: No such file or directory 36 | #include <boost/sort/spreadsort/spreadsort.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [CMakeFiles/nestml_izhikevich_module_module.dir/build.make:76: CMakeFiles/nestml_izhikevich_module_module.dir/nestml_izhikevich_module.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:112: CMakeFiles/nestml_izhikevich_module_module.dir/all] Error 2 make: *** [Makefile:156: all] Error 2
Cheers! Salvo _______________________________________________ NEST Users mailing list -- users@nest-simulator.org To unsubscribe send an email to users-leave@nest-simulator.org
In order to compile NEST with Boost (I use the docker installation method) I use:
sudo docker run --rm -e LOCAL_USER_ID=`id -u $USER` -v $(pwd):/opt/data -p 8084:8084 nestsim/nest:latest notebook libboost-all-devD
But, when I install NESTML and run the script, I have the same problem.