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
A crash may occur when the number of threads is larger than the number of points in OpenMP mode. For example, a boundary condition marker has a few edge elements, and the model runs on a 10-core CPU (20 threads).
One of the crash places is at InverseDiagonalBlock_ILUMatrix(end-1, &invM[(end-1)*nVar*nVar]);
The value end-1 could be a random value due to the skipped value assignment in vector omp_partitions.
It seems that the logic for setting and using omp_partitions needs to be revised. The reproducing script is provided.
My local fix is to initialize all elements in vector omp_partitions with value nPointDomain. Then 'continue' the for loop if omp_partitions[thread] == omp_partitions[thread+1] at several places.
Sounds like a sensible fix. Please open a PR.
We should also warn or throw an error if that condition happens because the performance is not going to be good with very few nodes per thread.
lcheng9
pushed a commit
to lcheng9/SU2
that referenced
this issue
Jun 21, 2022
Initialize the omp_partitions vector with the number of points, skip the for loop if the last partition has been calculated. A light-weight checker is added to verify the validation of the partition vector.
A crash may occur when the number of threads is larger than the number of points in OpenMP mode. For example, a boundary condition marker has a few edge elements, and the model runs on a 10-core CPU (20 threads).
One of the crash places is at
InverseDiagonalBlock_ILUMatrix(end-1, &invM[(end-1)*nVar*nVar]);
The value
end-1
could be a random value due to the skipped value assignment in vectoromp_partitions
.It seems that the logic for setting and using
omp_partitions
needs to be revised. The reproducing script is provided.Win11 + VS2022
SU2 7.3.1
omp_crash_su2.cfg.txt
mesh.su2.txt
The text was updated successfully, but these errors were encountered: