Hi Frederick,
thanks again for help. So I have tested different simulation variants and I know that the problem occurs when using OMP. For MPI calculations without OMP all tests pass. I have also tested the effect of the `OMP_PROC_BIND` and `OMP_PLACES` parameters and apart from the effect on simulation time, they have no significant effect on the presence of errors. Below are the results for ssmp:
```
OMP_PROC_BIND, OMP_PLACES, correct, total, wrong, failed, time
spread, threads, 3850, 4144, 4, 290, 186min
spread, cores, 3831, 4144, 3, 310, 183min
spread, sockets, 3864, 4144, 3, 277, 104min
close, threads, 3879, 4144, 3, 262, 171min
close, cores, 3854, 4144, 0, 290, 168min
close, sockets, 3865, 4144, 3, 276, 104min
master, threads, 4121, 4144, 0, 23, 1002min
master, cores, 4121, 4144, 0, 23, 986min
master, sockets, 3942, 4144, 3, 199, 219min
false, threads, 3918, 4144, 0, 226, 178min
false, cores, 3919, 4144, 3, 222, 176min
false, sockets, 3856, 4144, 4, 284, 104min
```
and psmp:
```
OMP_PROC_BIND, OMP_PLACES, results
spread, threads, Summary: correct: 4097 / 4227; failed: 130; 495min
spread, cores, 26 / 362
spread, cores, 26 / 362
close, threads, Summary: correct: 4133 / 4227; failed: 94; 484min
close, cores, 60 / 362
close, sockets, 13 / 362
master, threads, 13 / 362
master, cores, 79 / 362
master, sockets, Summary: correct: 4153 / 4227; failed: 74; 563min
false, threads, Summary: correct: 4153 / 4227; failed: 74; 556min
false, cores, Summary: correct: 4106 / 4227; failed: 121; 511min
false, sockets, 96 / 362
not specified, not specified, Summary: correct: 4129 / 4227; failed: 98; 263min
```
Any ideas what I could do next to have more information about the source of the problem or maybe you see a potential solution at this stage? I would appreciate any further help.
Best
Bartosz