-
Notifications
You must be signed in to change notification settings - Fork 54
Add HPC running instructions to the documentation #1238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
clinssen
wants to merge
1
commit into
nest:master
Choose a base branch
from
clinssen:hpc_instructions
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -245,17 +245,30 @@ This will generate, compile, build, and install the code for a set of specified | |
* - ``--codegen_opts`` | ||
- (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`. | ||
|
||
NEST Desktop target | ||
~~~~~~~~~~~~~~~~~~~ | ||
Filesystem permissions | ||
~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
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. | ||
|
||
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``. | ||
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: | ||
|
||
.. code-block:: python | ||
|
||
from pynestml.frontend.pynestml_frontend import generate_target | ||
from pynestml.frontend.pynestml_frontend import generate_nest_target | ||
|
||
generate_target(input_path="/home/nest/work/pynestml/models/neurons/iaf_psc_exp.nestml", | ||
target_platform="NEST_DESKTOP", | ||
target_path="/tmp/nestml_target") | ||
nestml_file_path = "~/nestml-neurons" # this should be a path inside your home directory | ||
# or other directory to which you have write permission | ||
nestml_target_path = nestml_file_path + "/nestml_target/" | ||
nestml_install_path = nestml_file_path + "/nestml_install/" | ||
|
||
print(f"Generating NEST target code from {nestml_file_path} to {nestml_target_path}") | ||
|
||
generate_nest_target( | ||
input_path=str(nestml_file_path), | ||
target_path=str(nestml_target_path), | ||
install_path=str(nestml_install_path) | ||
) | ||
|
||
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: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't the toolchain do this automatically when the |
||
|
||
.. code-block:: bash | ||
|
||
export LD_LIBRARY_PATH="~/nestml-neurons/nestml_install":$LD_LIBRARY_PATH |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this comment be on the line where the
nestml_install_path
is declared?