Skip to content

Commit 6358911

Browse files
authored
add HPC running instructions to the documentation (#1238)
1 parent 19a0e44 commit 6358911

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

doc/running/index.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,3 +213,30 @@ This will generate, compile, build, and install the code for a set of specified
213213
* - ``--codegen_opts``
214214
- (Optional) Path to a JSON file containing additional options for the target platform code generator. A list of available options can be found under the section "Code generation options" for your intended target platform on the page :ref:`Running NESTML`.
215215

216+
Filesystem permissions
217+
~~~~~~~~~~~~~~~~~~~~~~
218+
219+
If you are using NESTML on a shared server or high performance computing (HPC) system, it could be that NESTML was installed in a location in the filesystem to which you do not have write access. In this case, make sure to explicitly set the ``install_path`` when generating the target code to a directory to which you have write access, for example, inside your home directory. For example:
220+
221+
.. code-block:: python
222+
223+
from pynestml.frontend.pynestml_frontend import generate_nest_target
224+
225+
nestml_file_path = "~/nestml-neurons" # this should be a path inside your home directory
226+
# or other directory to which you have write permission
227+
nestml_target_path = nestml_file_path + "/nestml_target/"
228+
nestml_install_path = nestml_file_path + "/nestml_install/"
229+
230+
print(f"Generating NEST target code from {nestml_file_path} to {nestml_target_path}")
231+
232+
generate_nest_target(
233+
input_path=str(nestml_file_path),
234+
target_path=str(nestml_target_path),
235+
install_path=str(nestml_install_path)
236+
)
237+
238+
Then, when running the Python simulation script which contains the ``nest.Install(<module_name>)``, make sure to first set the ``LD_LIBRARY_PATH``, such as:
239+
240+
.. code-block:: bash
241+
242+
export LD_LIBRARY_PATH="~/nestml-neurons/nestml_install":$LD_LIBRARY_PATH

doc/running/running_nest_desktop.rst

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,17 @@ NEST Desktop target
33

44
*NESTML features supported:* :doc:`neurons </nestml_language/neurons_in_nestml>`
55

6-
The aim of the NEST Desktop target is to generate ``json`` files with parameters for models. This data will be used for rendering the parameter values in the NEST Desktop UI when a NESTML model is loaded.
6+
The aim of the NEST Desktop as target is to generate ``json`` files for the neuron models. The resulting file contains details about the state variables, parameters and their initial values defined in their respective ``.nestml`` files. The ``json`` files are used to load them in the NEST Desktop user interface.
7+
8+
For example, for the neuron model ``iaf_psc_exp``, the ``json`` file will be generated by running the ``generate_target`` function with ``target_platform`` option set to ``NEST_DESKTOP``.
9+
10+
.. code-block:: python
11+
12+
from pynestml.frontend.pynestml_frontend import generate_target
13+
14+
generate_target(input_path="/home/nest/work/pynestml/models/neurons/iaf_psc_exp.nestml",
15+
target_platform="NEST_DESKTOP",
16+
target_path="/tmp/nestml_target")
717
818
919
Code generation options

0 commit comments

Comments
 (0)