Did the problem persist? I had the same as you or the one you mention and fixed it ("it fixed itself" would be more accurate).
I had installed a NVIDIA driver to use OpenCL and CUDA before installing MPI on my local computer and had the same warning. I switched back to X.Org driver (my way of doing it: Software & Updates -> Settings -> Additional Drivers -> Using X.Org), rebooted and warning messages had disappeared.
I tried to switch again to my NVIDIA driver, rebooted and the warning didn't reappear, so eventually just changing driver may solve the problem. It's not elegant and doesn't explain much, but it is worth trying. Also, as I fail to reproduce the problem, it is possible that simply "turn it off and on again" was what did the magic, which is why I asked if your problem persisted.
This was done out of total despair after an hour or more of looking for an answer to similar problems. xhost +local:
, xhost +
, unset DISPLAY
or export DISPLAY=whatever:X.X
didn't change anything, nor did it work to specify DISPLAY in the mpirun options (as stated in the official documentation). I had also rebooted (before changing the driver), and grep xauth ~/.bash*
didn't give any result (so my .Xauthority file had not been modified from the terminal).
Another way I found to avoid the problem while I had it was to disable the graphic interface and go with only the command line (ctrl+alt+F3), but I believe the warning is a minor inconvenience compared to no graphic interface.
Clues for people who are far more knowledgeable than little me about mpi and Xserver and somehow want to tackle this:
- The question here may be related, and apparently compiling with
mpich
solves the problem, while when I compiled a small c script with mpicc
I had the warning.
Clues for people who would have this, and for whom changing driver + rebooting didn't work and are as clueless as I was about xauth and .Xauthority:
- The path to your .Xauthority file referenced in so many similar problems (like here and there.) can be found with
echo $XAUTHORITY
.
- As stated in this problem, you interact with it through
xauth
. I was about to try to manually change MIT-MAGIC-COOKIE-1 as a last resort, although I believe at this point it would probably be easier to install older versions of mpi and switch between them with update-alternatives