Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invalid MIT-MAGIC-COOKIE-1 key when locally running MPI application or starting ParaView

Tags:

ubuntu

mpi

xauth

I am using Ubuntu 20.04, locally, no remote access or anything. Still, whenever I start up paraview from the terminal, or when I run an application that uses MPI (I think it's enough if it calls MPI_Init()), then I get the error message Invalid MIT-MAGIC-COOKIE-1 key

How can I solve this?

MPI implementation: Open MPI 4.0.3

ParaView version: 5.7.0

like image 895
RL-S Avatar asked Nov 26 '25 18:11

RL-S


1 Answers

The issue is caused by the libhwloc library, which is used by OpenRTE (the OpenMPI component) to explore the hardware topology of the node during the launch of parallel processes. When hwloc_topology_load() is called, libhwloc iterates over all of its available components, which are implemented as plug-ins. One of these components, gl, is responsible for gathering information about the system's graphics devices and uses X11 calls like XOpenDisplay(), which can generate the error message "Invalid MIT-MAGIC-COOKIE-1 key" if it fails to connect to the X11 server.

In many cases, this gl component is not needed on HPC clusters and can be safely disabled by setting the HWLOC_COMPONENTS environment variable to exclude it:

export HWLOC_COMPONENTS="-gl"

like image 172
Alexey Medvedev Avatar answered Nov 28 '25 15:11

Alexey Medvedev