Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion activitysim/core/skim_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -958,10 +958,19 @@ def _should_ignore(ignore, x):
# requires no realignment (i.e. the land use table and skims match
# exactly in order and length).
d_shared_mem = d.shm.to_shared_memory(backing, mode="r", load=False)
# Build an extended ignore list that includes any skims that were
# dropped as unused, so reload_from_omx_3d doesn't try to load them
reload_ignore = list(state.settings.omx_ignore_patterns or [])
all_omx_names = set()
for f in omx_file_handles:
all_omx_names.update(f.list_matrices())
dropped_names = all_omx_names - set(d.variables.keys())
for name in dropped_names:
reload_ignore.append(f"^{re.escape(name)}$")
sh.dataset.reload_from_omx_3d(
d_shared_mem,
[str(i) for i in omx_file_paths],
ignore=state.settings.omx_ignore_patterns,
ignore=reload_ignore,
)
for f in omx_file_handles:
f.close()
Expand Down
Loading