Fix destructor Seg Faults for SYCL#60
Conversation
0ceee95 to
9701510
Compare
9701510 to
135acc1
Compare
formatting
135acc1 to
00ba5f1
Compare
davschneller
left a comment
There was a problem hiding this comment.
Generally LGTM (IMO almost merge-ready); but might it be possible to get a more exact picture of what's going on?
I.e. the probably statistics get deleted—and there's still memory to be de-allocated.
Maybe we could move the deletion of the statistics to the destructor?
interfaces/sycl/Memory.cpp
Outdated
|
|
||
| // Use the first device context to free memory | ||
| DeviceContext* context = this->availableDevices[0]; | ||
| if (!context) |
interfaces/sycl/Memory.cpp
Outdated
| } | ||
|
|
||
| // Use the first device context to free memory | ||
| DeviceContext* context = this->availableDevices[0]; |
There was a problem hiding this comment.
use the current device ID
On SuperMUC NG phase 2, I was running a few cases to study scaling, but it always ended with a Segfault. The backtrace looked like this I thought that the Probably, you are right, the API is still new to me, if you think that is a better solution, we could try that. |
16354c3 to
63d75dc
Compare
format
63d75dc to
3f490be
Compare
On SuperMUC Phase 2, there were two double-free or Invalid Pointer Access errors, which caused the program to exit with a Segmentation fault (SIGSEGV). The issue was in
freeMemmethod. It was crashing when we tried to destruct the mapthis->currentMemoryToSizeMapif it had already been destructed in another destructor. I modified the checks to return when we encounter empty objects.