OS: Fedora 33, the latest OpenMPI 4.0.4 gcc 10.2.1 20201125 (Red Hat 10.2.1-9)
For the source code from the link: https://stackoverflow.com/questions/65281642/mpi-returns-incorrect-results-for-one-of-processes some processes randomly return wrong results on the given configuration. When tested the same source code on Debian GNU/Linux 7 (wheezy) with OpenMPI 1.4.5 it returns correct results each time. Test on each configuration was executed 30 times in a loop. OpenMPI 4.0.4 started to work properly after set $OMPI_MCA_pml to "^ucx". For details please refer to the provided above stackoverflow post.