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
MCERD crashes if the total amount of elements in the target composition exceeds 15.
The elements don't have to be unique, i.e. alternating pattern of GaAs and GaAsBi layers will crash the simulation after 6 layers.
If there are even more layers and elements, MCERD does not crash but simulation gets stuck on "Reading target file" or "Reading detector file"
Reproduction:
Create a target with for example 5 layers that have 3 elements each
Start simulation (still works)
Add one more element to one of the layers
MCERD stopped with an error code 3221225477
Notes:
Does not work on February Windows release either
Behavior is consistent on different requests
Layers in Potku might be structured in a way that MCERD is given a "new" element every time even if the element is already on some previous layer. This might exceed some "element-maximum" in MCERD. (As suggested by @jaakkojulin)
The text was updated successfully, but these errors were encountered:
There clearly is a maximum of 20 elements defined in general.h. Some of these are reserved for a) primary ion b) target atom c) recoil d) recoil cascades in the energy detector (my code!) so this should be consistent of 15 elements left for the target. Crashing is probably due to lacking a check of boundaries somewhere.
Potku indeed adds a new element for every element in every layer, so 15 is a low limit.
Solution: make Potku re-use elements, change the maximum in MCERD to be dynamic or larger. MCERD runs out of stack space as it is, so allocation of large tables from the heap with malloc() should be done anyways.
MCERD crashes if the total amount of elements in the target composition exceeds 15.
The elements don't have to be unique, i.e. alternating pattern of GaAs and GaAsBi layers will crash the simulation after 6 layers.
If there are even more layers and elements, MCERD does not crash but simulation gets stuck on "Reading target file" or "Reading detector file"
Reproduction:
Notes:
The text was updated successfully, but these errors were encountered: