Running gmx_mpi mdrun on a local workstation to perform REMD returns an "Invalid MIT-MAGIC-COOKIE-1"

GROMACS version:2023.2
GROMACS modification: No
Here post your question
I have successfully installed GROMACS, both regular and MPI flavors, on a Dell workstation with a Intel® Xeon(R) Silver 4110 CPU @ 2.10GHz × 32 processor and AMD® Radeon pro wx2100 GPU, both with CUDA GPU support.

An aside, running the same test.tpr file in the now GPU supported build resulted in a 20% speed increase in the lysozyme test run over the non-GPU enabled version. This with a 6 y.o. GPU available for $36 on Ebay.

The actual problem:
When I execute the command “gmx-mpi mdrun -h” locally on my workstation it immediately returns:

Invalid MIT-MAGIC-COOKIE-1 key

Then, a moment or two later it returns the help SYNOPSIS for gmx mdrun. A quick search suggested that these commands might help:
xhost +local:
export DISPLAY=desktop:0
Neither changed the behavior.

My build using -DGMX_MPI=on built w/out issue and passed 87/87 tests

Three (related) questions:

  1. Is the “Invalid MIT-MAGIC-COOKIE” message a problem working on a local workstation?
  2. Subsequent to the MIT message the help page displayed is for gmx mdrun not gmx_mpi mdrun. Is this a subtle way of telling me the MIT message is precluding my gmx_mpi installation from running?
  3. How do I remove this message if it is in fact an issue?

Thanks in advance, as always,

Ken

Hi @ksr!

There is something weird going on with your system.

  1. Invalid MIT-MAGIC-COOKIE message is related to the graphic (how the application authenticates with the X11 server to be able to draw things, not the accelerated compute). We only had one utility that used it, gmx view, but it and all related code were removed in GROMACS 2023. Perhaps some of the libraries GROMACS uses decide, for whatever reason, to try to check the availability of graphical output. Whatever that is, the “MIT Magic cookie” error is not originating from GROMACS 2023.

  2. “AMD® Radeon pro wx2100 GPU, both with CUDA GPU support.” That does not sound right. CUDA is only available on NVIDIA GPUs. You could use OpenCL on AMD GPUs, but if you build with GMX_GPU=CUDA, then GROMACS won’t be able to use AMD GPUs and will fall back to the CPU.

  3. “Is this a subtle way of telling me the MIT message is precluding my gmx_mpi installation from running?” If you run gmx(_mpi) -h, then the help output is expected. Could you please elaborate what affect it has besides a few extra log lines?

I’m getting these errors with a 2025.2 install on Ubuntu 24.04 running RealVNC server.

There’s no problem opening an xterm from the console window, so the DISPLAY seems correct.

I’ve attached an strace log in case in helps generate some insight into what’s causing the warning.

log.txt (2.9 MB)

Hi!

As noted previously, GROMACS itself does not use any graphics, does not interact with X11, and should work regardless of X11 presence / absence / misconfiguration.

Based on your logs, it might be that hwloc_gl is trying to query the state of OpenGL on the system, and, in the process, triggers these warnings. Perhaps unsetting DISPLAY altogether would silence them.