Commit c115df9
Updated Reloading Scheme for
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.
---------
Co-authored-by: Philipp Schaad <schaad.phil@gmail.com>ReloadableDLL (spcl#2218)1 parent 935cfb6 commit c115df9
1 file changed
Lines changed: 32 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | | - | |
| 81 | + | |
| 82 | + | |
81 | 83 | | |
82 | 84 | | |
83 | 85 | | |
| |||
96 | 98 | | |
97 | 99 | | |
98 | 100 | | |
| 101 | + | |
| 102 | + | |
99 | 103 | | |
100 | 104 | | |
101 | 105 | | |
102 | 106 | | |
103 | | - | |
| 107 | + | |
104 | 108 | | |
105 | 109 | | |
106 | | - | |
| 110 | + | |
107 | 111 | | |
| 112 | + | |
108 | 113 | | |
| 114 | + | |
109 | 115 | | |
110 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
111 | 131 | | |
112 | | - | |
113 | | - | |
| 132 | + | |
| 133 | + | |
114 | 134 | | |
115 | 135 | | |
116 | 136 | | |
117 | 137 | | |
118 | 138 | | |
119 | 139 | | |
120 | 140 | | |
| 141 | + | |
121 | 142 | | |
122 | 143 | | |
123 | 144 | | |
| |||
147 | 168 | | |
148 | 169 | | |
149 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
150 | 177 | | |
151 | 178 | | |
152 | 179 | | |
| |||
0 commit comments