open-simulation-platform / libcosim

OSP C++ co-simulation library
https://open-simulation-platform.github.io/libcosim
Mozilla Public License 2.0
58 stars 10 forks source link

Add support for persistent FMU cache directory #230

Open kyllingstad opened 5 years ago

kyllingstad commented 5 years ago

This requires using the same cse::fmi::importer object for all slaves. Currently, we create a new object for each slave in cse_local_slave_create().

ljamt commented 4 years ago

Can this be considered solved with PR #388?

kyllingstad commented 4 years ago

Not really. I see I've been a bit hasty when writing this, but this was about the C library. There, we're still using separate FMU-unpacking directories for separate slaves, even those that are based on the same FMUs. So there are two things to decide:

  1. Do we want the contents of each FMU to be unpacked only once and reused for each slave based on that FMU? If so, we need to use a shared fmi::importer object for them all.
  2. If the answer to 1. was "yes", do we also want the cache to be persistent between processes and simulations? If so, we need to use the new persistent_file_cache functionality.