Skip to content
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

Cloning a simulation destroys Persistable-property #796

Closed
Yuri05 opened this issue May 24, 2018 · 5 comments
Closed

Cloning a simulation destroys Persistable-property #796

Yuri05 opened this issue May 24, 2018 · 5 comments

Comments

@Yuri05
Copy link
Member

Yuri05 commented May 24, 2018

Once a simulation was run in PK-Sim: cloning this simulation will set a lot of quantities as persistable.
E.g. in project attached: clone simulation S1 to S1_clone and compare both simulations
CloneTest.zip

aufnahme1

It happens only after original simulation was run. If cloned before the first run: all Persistable flags are cloned properly.

In the UI the differences cannot be seen directly
E.g. if Define Settings and Run dialog is opened in the cloned simulation: only the quantities which were selected for output in the original simulation are also selected.

However exporting SimModel-XMLs for both simulations will also show the differences in persistable flag
(which will result in much higher memory consumption of the cloned simulation during calculation, especially for population simulations and PIs if run in parallel on multiple cores!)

XMLs.zip

In the example above following quantities were set to persistable after cloning :

  • ALL Observers (with 3 or 4 exceptions, hmm)
  • 3 molecule amounts: Gallbladder, Lumen|Feces and Organism|Kidney|Urine

(happens in 7.2 and 7.3)

@Yuri05 Yuri05 changed the title Cloning a population destroys Persistable-property Cloning a simulation destroys Persistable-property May 24, 2018
@Yuri05
Copy link
Member Author

Yuri05 commented May 24, 2018

just tried it with 6.1: same problem. Seems it's here for quite a while...

@msevestre
Copy link
Member

My observations are slightly different, or maybe the same but then let me formulate it my way

  • When creating a simulation (or cloning), a bunch of variables are set to persistable, even though they should not be set to persistable. This happens as well when creating a brand new simulation (which variable is persisted is not defined yet...probably default persisted flag is true in Core
    image

  • as soon as I run the simulation, the persistable flag is set properly according to selection (and Xml is also ok)
    image

(here we only see displayunit issue that are solved when saving loading project)

  • So in my opinion, there is no higher memory consumptions UNLESS the simulation is exported without being run once in PKSim.

image

You can see in the picture above the SimModel Xml exported after running the simulation once. It's is absolutely correct. Only 4 persistable entities. The flag is actually SET before sending to SimModel xml the first time

So I'd say all in all this is all fine. The display unit should probably be set properly upon creation, but this is very minor

@msevestre
Copy link
Member

Do you agree that this is not HIGH prio?

msevestre added a commit to msevestre/PK-Sim that referenced this issue May 25, 2018
@Yuri05 Yuri05 closed this as completed in 1a1b3ae May 27, 2018
@Yuri05 Yuri05 reopened this May 27, 2018
@msevestre
Copy link
Member

@Yuri05 Do you agree that this bug is absolutely not critical? You set it to high and 7.3 but the only issue is when creating/cloning a simulation without running it once!

msevestre added a commit to msevestre/PK-Sim that referenced this issue May 27, 2018
@msevestre
Copy link
Member

I think this is however a pretty easy fix. See PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants