MATLAB OpenGL Warning

When you start a GUI Matlab session on the cluster, you may see the following warning:

Warning: MATLAB has disabled some advanced graphics rendering features by switching to software OpenGL.

This can also cause errors when you use some Matlab programs / toolboxes, for example “CONN: functional connectivity toolbox” . The following is a workaround for getting rid of the warning:

1) Start a GUI Slurm session and run “matlab”
2) Run the following Matlab script
opengl('save','hardware');
3) Restart Matlab