From fac3a2402dd0fa89c68c9d6cbdb91be4ccbaac37 Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Tue, 6 Feb 2024 14:12:11 +0000 Subject: [PATCH 1/3] feat(pynml): respect `JNML_MAX_MEMORY_LOCAL` env variable --- pyneuroml/pynml.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pyneuroml/pynml.py b/pyneuroml/pynml.py index 36a2ef67..6bea5b52 100644 --- a/pyneuroml/pynml.py +++ b/pyneuroml/pynml.py @@ -103,9 +103,16 @@ def generate_interactive_plot(*args, **kwargs): ) +# read from env variable if found +try: + java_max_memory = os.environ["JNML_MAX_MEMORY_LOCAL"] +except KeyError: + java_max_memory = "400M" + + DEFAULTS = { "v": False, - "default_java_max_memory": "400M", + "default_java_max_memory": java_max_memory, "nogui": False, } # type: dict[str, typing.Any] @@ -2497,7 +2504,9 @@ def run_jneuroml( :param target_file: LEMS or NeuroML file to run jnml on :type target_file: str :param max_memory: maximum memory allowed for use by the JVM - :type max_memory: bool + Note that the default value of this can be overridden using the + JNML_MAX_MEMORY_LOCAL environment variable + :type max_memory: str :param exec_in_dir: working directory to execute LEMS simulation in :type exec_in_dir: str :param verbose: toggle whether jnml should print verbose information From 021ec16a97ce67975010b70cd33fe7523bb7110b Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Tue, 6 Feb 2024 14:51:52 +0000 Subject: [PATCH 2/3] fix(setup.cfg): include template channel file in data --- setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.cfg b/setup.cfg index 1899c346..66f26f92 100644 --- a/setup.cfg +++ b/setup.cfg @@ -60,6 +60,7 @@ console_scripts = *.md *.xsl *.hoc + TEMPLATE.channel.nml [options.extras_require] neuron = From f25dd5cf48d5de997c88bc59f182abb2ef10c9eb Mon Sep 17 00:00:00 2001 From: "Ankur Sinha (Ankur Sinha Gmail)" Date: Tue, 6 Feb 2024 16:21:15 +0000 Subject: [PATCH 3/3] chore(docs): add parameter note --- pyneuroml/analysis/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyneuroml/analysis/__init__.py b/pyneuroml/analysis/__init__.py index 9dfdd8be..531064b9 100644 --- a/pyneuroml/analysis/__init__.py +++ b/pyneuroml/analysis/__init__.py @@ -158,6 +158,8 @@ def generate_current_vs_frequency_curve( :param simulator: simulator to use :type simulator: str :param num_processors: number of processors to use for analysis + This option is only used with NetPyNE which can use MPI for + parallelising simulations. For other simulators, this is unused. :type num_processors: int :param include_included: include included files :type include_included: bool