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

Load skims into shared memory to be accessed by later models #67

Merged
merged 2 commits into from
Apr 12, 2024

Conversation

aber-sandag
Copy link

@aber-sandag aber-sandag commented Apr 8, 2024

Skims are loaded as a multiprocessing.shared_memory.SharedMemory buffer. Will only load skims from OMX if buffer does not already exist in shared memory. When used with an external script to hold onto shared memory, this allows skims to be kept in memory between models.

An additional improvement could be to add a GUID to the shared memory name as a failsafe to ensure the shared memory buffer is only usable by the current run. This GUID could potentially be set in network_los.yaml.

Functionality is currently disabled when running single-processed due to a crash that I am still investigating. This does mean that running a single-processed model after a multi-processed model will create two copies of the skims in memory, so ideally multiprocessing should be used either for all models or no models in a given run.

@bhargavasana bhargavasana merged commit f3b9ee8 into BayDAG_estimation Apr 12, 2024
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants