Skip to content

Updated Reloading Scheme for ReloadableDLL#2218

Merged
phschaad merged 4 commits intospcl:mainfrom
philip-paul-mueller:updated_compiled_sdfg_loading
Dec 4, 2025
Merged

Updated Reloading Scheme for ReloadableDLL#2218
phschaad merged 4 commits intospcl:mainfrom
philip-paul-mueller:updated_compiled_sdfg_loading

Conversation

@philip-paul-mueller
Copy link
Collaborator

Modified the reloading scheme used by ReloadableDLL.
If the library (of the compiled SDFG) is already loaded, through another instance of CompiledSDFG then ReloadableDLL will copy the SDFG library and try to load that until it founds a name that is free.
In ICON4Py we noticed that this leads sometime to a segmentation fault on Linux, but not on MacOS X.
We traced the main issue down to the fact that ReloadableDLL created a copy of the SDFG library without checking if the new name is already used, instead the file is simply overwritten.

The new scheme changes this slightly, in the following ways:

  • If the new name is already taken, then no copy is performed and the class tries to use that file, that already exists.
  • Instead of copying library n - 1 to n it always makes a copy from the initial library.

@phschaad phschaad added this pull request to the merge queue Dec 4, 2025
Merged via the queue into spcl:main with commit c115df9 Dec 4, 2025
10 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