From 69ddf5e09695f5d4f8b2ed6d5bd08b8100706672 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Wed, 8 May 2024 08:23:53 +0200 Subject: [PATCH] Update valgrind suppressions for Python 3.11 --- .../ExampleExperimentalConditions.ipynb | 16 ++-- python/tests/valgrind-python.supp | 87 +++++++++++++++++++ 2 files changed, 97 insertions(+), 6 deletions(-) diff --git a/python/examples/example_presimulation/ExampleExperimentalConditions.ipynb b/python/examples/example_presimulation/ExampleExperimentalConditions.ipynb index 83f23273af..63fbc7a4ff 100644 --- a/python/examples/example_presimulation/ExampleExperimentalConditions.ipynb +++ b/python/examples/example_presimulation/ExampleExperimentalConditions.ipynb @@ -21,12 +21,16 @@ "# Directory to which the generated model code is written\n", "model_output_dir = model_name\n", "\n", - "from pprint import pprint\n", - "\n", "import libsbml\n", + "import amici\n", + "import amici.plotting\n", + "import os\n", + "import sys\n", + "import importlib\n", "import numpy as np\n", - "\n", - "import amici.plotting" + "import pandas as pd\n", + "import matplotlib.pyplot as plt\n", + "from pprint import pprint" ] }, { @@ -139,7 +143,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "For this example we want to specify the initial drug and kinase concentrations as experimental conditions. Accordingly, we specify them as `fixedParameters`. The meaning of `fixedParameters` is defined in the [Glossary](https://amici.readthedocs.io/en/latest/glossary.html#term-fixed-parameters), which we display here for convenience." + "For this example we want specify the initial drug and kinase concentrations as experimental conditions. Accordingly we specify them as `fixedParameters`. The meaning of `fixedParameters` is defined in the [Glossary](https://amici.readthedocs.io/en/latest/glossary.html#term-fixed-parameters), which we display here for convenience." ] }, { @@ -365,7 +369,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The resulting trajectory is definitely not what one may expect. The problem is that the `DRUG_0` and `KIN_0` set initial conditions for species in the model. By default, these initial conditions are only applied at the very beginning of the simulation, i.e., before the preequilibration. Accordingly, the `fixedParameters` that we specified do not have any effect. To fix this, we need to set the `reinitializeFixedParameterInitialStates` attribute to `True`, to specify that AMICI reinitializes all states that have `fixedParameter`-dependent initial states." + "The resulting trajectory is definitely not what one may expect. The problem is that the `DRUG_0` and `KIN_0` set initial conditions for species in the model. By default these initial conditions are only applied at the very beginning of the simulation, i.e., before the preequilibration. Accordingly, the `fixedParameters` that we specified do not have any effect. To fix this, we need to set the `reinitializeFixedParameterInitialStates` attribue to `True`, to spefify that AMICI reinitializes all states that have `fixedParameter`-dependent initial states." ] }, { diff --git a/python/tests/valgrind-python.supp b/python/tests/valgrind-python.supp index 01bc776aec..dab3c06dc4 100644 --- a/python/tests/valgrind-python.supp +++ b/python/tests/valgrind-python.supp @@ -878,3 +878,90 @@ fun:loadAntimonyString ... } + +{ + Python + Memcheck:Cond + fun:maybe_small_long + ... +} + +{ + Python + Memcheck:Value8 + fun:medium_value + ... +} + +{ + Python + Memcheck:Value8 + fun:Py_INCREF + ... +} +{ + Python + Memcheck:Value8 + fun:Py_DECREF + ... +} +{ + Python + Memcheck:Value8 + fun:Py_SIZE + ... +} +{ + Python + Memcheck:Value8 + fun:Py_TYPE + ... +} +{ + Python + Memcheck:Value8 + fun:type_call + ... +} + +{ + Python + Memcheck:Value8 + fun:_PyEval_EvalFrameDefault + ... +} + + +{ + Python + Memcheck:Value8 + fun:PyType_HasFeature + ... +} + +{ + Python + Memcheck:Value8 + fun:unpack_indices + ... +} + +{ + Python + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:PyFloat_FromDouble + fun:fill_time + ... +} +{ + Python + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + fun:gc_alloc + ... + fun:Py_CompileStringObject + ... +}