Open-Systems-Pharmacology / OSPSuite.SimModel

Calculation engine for models built with PK-Sim® or MoBi®
Other
4 stars 3 forks source link

Non-deterministic simulation runs from SimModel #151

Closed rwmcintosh closed 2 years ago

rwmcintosh commented 2 years ago

I've been doing testing on this issue: https://github.com/esqLABS/esqlabsR/issues/310

there seems to be no predictable pattern. Most of the time at least one run will fail to return results, but it's not consistent which run, nor how many. Sometimes several executions will succeed without any runs failing to produce results.

PavelBal commented 2 years ago

Very strange and also very dangerous. It is not a population simulation where parameter values are generated from a distribution or something, so it MUST be deterministic. Could it be that the parallelization does not work as expected?

Yuri05 commented 2 years ago

@rwmcintosh Can you create C# Code snippet which allows to reproduce this behaviour?

msevestre commented 2 years ago

Well we know that the parallelization does not work as expected as we have reached a max degree of parallelism that is not nearly as good as what we expect.

I have asked Ron to verify that when.the results are not failing, they are also consistent (e..g I want to make sure that one sim failing does not influence the other runs).

Clearly one can see that the simulation is running, no error, but simmodel does not return any results. Looks to me more like some kinds of memory leak

msevestre commented 2 years ago

Also what is special with this simulation? This behaviour is typically not observed (I think) with standard simulations so something is different. Can you confirm that this does not happen with a standard PKSim simulation?

rwmcintosh commented 2 years ago

I'll be working on isolating and trying to understand the non-error result repeatability. Also C# code if I can.

PavelBal commented 2 years ago

This is a standard PK-Sim simulation (the Aciclovir example) with applied individual parametrization (using createIndividual) and then varying the Lipophilicity value.

rwmcintosh commented 2 years ago

I’ll push a test in C# in ospsuite.core tomorrow. It looks promising that all non failing runs produce consistent results.

Yuri05 commented 2 years ago

was a problem in OSPSuite.Core, fixed with https://github.com/Open-Systems-Pharmacology/OSPSuite.Core/pull/1712