You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can see that this segfaults pretty straightforwardly. It mallocs n materials, but we actually need materials_size + n.
If we let this sit for a bit, I have an implementation coming that fixes this and uses std::realloc for potential efficiency improvement. It also makes a few of the commonly used classes trivially copyable. Currently resolving a few other problems.
Lesson learned: in any future GPU-portable implementation, we must avoid managing memory by hand at all costs since it is so error prone.
The text was updated successfully, but these errors were encountered:
openmc/src/material.cpp
Line 1506 in 3e13d39
You can see that this segfaults pretty straightforwardly. It mallocs n materials, but we actually need materials_size + n.
If we let this sit for a bit, I have an implementation coming that fixes this and uses std::realloc for potential efficiency improvement. It also makes a few of the commonly used classes trivially copyable. Currently resolving a few other problems.
Lesson learned: in any future GPU-portable implementation, we must avoid managing memory by hand at all costs since it is so error prone.
The text was updated successfully, but these errors were encountered: