Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenGL test fails, but configure script is not aborting #218

Closed
samfux84 opened this issue Apr 15, 2015 · 7 comments
Closed

OpenGL test fails, but configure script is not aborting #218

samfux84 opened this issue Apr 15, 2015 · 7 comments

Comments

@samfux84
Copy link

Dear MRtrix3 Community,

I was trying to install MRtrix3 on a HPC cluster (CentOS 6.5, intel Xeon CPU's, Haswell architecture). The dependencies Python 2.7.6, GSL 1.16 and QT 4.8.4 have been installed from source code.

[sfux@develop01 ~]$ glxinfo | grep "OpenGL version"
OpenGL version string: 1.4 (2.1 (4.4.13084 Compatibility Profile Context 14.301.1001))

I executed the configure script with the -verbose option. After the QT program was compiled to test the OpenGL, I got the follwoing output:

EXEC <<
CMD: ./a.out
EXIT: 0
STDOUT:
1.4 (2.1 (4.4.13084 Compatibility Profile Context 14.301.1001))
STDERR:
X Error: BadRequest (invalid request code or no such operation) 1
Extension: 138 (Uknown extension)
Minor opcode: 34 (Unknown request)
Resource id: 0x3200003

1.4 (2.1 (4.4.13084 Compatibility Profile Context 14.301.1001))

writing configuration to file './config.default': ok

Even though STDERR gives out an X Error, the test passes and does not abort. After compiling (no error messages during compilation) I tried to start the "mrview" GUI and got the following error:

[sfux@develop01 bin]$ ./mrview
X Error: BadLength (poly request too large or internal Xlib length error) 16
Extension: 138 (Uknown extension)
Minor opcode: 2 (Unknown request)
Resource id: 0x4a00046
X Error: GLXBadLargeRequest 155
Extension: 138 (Uknown extension)
Minor opcode: 2 (Unknown request)
Resource id: 0x20002
mrview: [ERROR] error linking OpenGL shader program ID 0

Any ideas what could have gone wrong ?

Best regards

Samuel Fux

@jdtournier
Copy link
Member

Hi Samuel,

In a word, your OpenGL version is not sufficient to run MRView: it requires OpenGL 3.3. The output of glxinfo suggests your graphics card simply doesn't support that.

Alternatively, maybe you're trying to run this remotely over an X11 connection? Unfortunately, X11 doesn't support remote OpenGL operation for versions 3 and above... There are a couple of ways around this: using an OpenGL-capable VNC server, or using the VirtualGL backend. But both of these rely on rendering on the remote system's graphics stack, and the chances are your HPC is not equipped with a decent graphics card - and even if it was, the drivers would probably be too old for OpenGL 3.3...

Not being able to support remote displays might seem like a regression, but ultimately, X11 is on its way out. The Xorg developers are currently focusing mainly on its replacement, Wayland, which will also include a much more modern and flexible remote display facility. But that will be some way off, particularly on a HPC cluster...

The approach I normally take to get around this is to access the remote server via a network file system (sshfs is simplest, and available on all platforms), and run MRView locally from that location. MRView also runs on all platforms natively nowadays, and it's not too hard to set up. But I agree that would be more effort to support if you expect many users...

By the way, the reason the build proceeds despite the failure of the OpenGL test is that OpenGL is not required to build the executables, as you've witnessed. It is required at runtime for the GUI components, which is why the test is there at all: to alert the user that their environment will not support the viewer.

And I really need to mention all this in the wiki...

Hope this helps,
Donald

@jdtournier
Copy link
Member

Actually, I should probably provide a slightly more helpful error message when this test fails... Maybe something along the lines that the current OpenGL environment will not be capable of running MRView. Could also point to the wiki entry that I will hopefully add in the near future...?

@jdtournier jdtournier self-assigned this Apr 15, 2015
@jdtournier jdtournier added this to the MRtrix3 3.0 release for ISMRM milestone Apr 15, 2015
@jdtournier
Copy link
Member

Well, the ./configure should already output the following error message on failure:

Checking for OpenGL: not found

WARNING: no OpenGL implementation found.
         Some of the graphical user interface components may not be stable on
         this system.

Was this message not displayed? In any case, I'll add information on this issue in the wiki and add a link to that page in the error message.

@samfux84
Copy link
Author

Hi Donald,

actually, the configure script was not printing any error message if I run it without the -verbose option:

[sfux@develop01 mrtrix3]$ ./configure

MRtrix build type requested: release

Detecting OS: linux
Checking for C++11 compliant compiler [g++]: 4.8.2 - tested ok
Detecting pointer size: 64 bit
Detecting byte order: little-endian
Checking for variable-length array support: yes
Checking for non-POD variable-length array support: yes
Checking for zlib compression library: 1.2.3
Checking for GNU Scientific Library: 1.16
Checking whether GSL compiles with -DHAVE_INLINE: yes
Checking shared library generation: yes
Checking for Qt moc: moc (version 4.8.4)
Checking for Qt qmake: qmake (version 4.8.4)
Checking for Qt rcc: rcc (version 4.8.4)
Checking for Qt: 4.8.4
Checking for OpenGL: 1.4 (2.1 (4.4.13084 Compatibility Profile Context 14.301.1001))

writing configuration to file './config.default': ok

[sfux@develop01 mrtrix3]$

But I am anyway confused about the version numbering of OpenGL. I don't know if the output means 1.4, 2.1 or 4.4.

Best regards

Sam

@jdtournier
Copy link
Member

OK, it looks like the test command runs and exits cleanly, despite the obvious X11 error. It reports getting an OpenGL 1.4 context, which is not sufficient to run MRView. I'll add another check to make sure the version is >= 3.3.

The numbers are indeed confusing. I think what this is telling you is that your local graphics stack is capable of OpenGL 4.4, your local GLX implementation (which does the forwarding) can handle OpenGL 2.1, but the remote GLX implementation only supports OpenGL 1.4. That's my best guess at what these numbers mean - but it is only an educated guess...

@samfux84
Copy link
Author

Thank you very much for the fast reaction to the two issues I created today.

I work in a group that operates and maintains the HPC clusters of a university and installed MRtrix3 for one of our cluster users. He is fine with the command line version and does not necessarily need the GUI. But I still wanted to let you know about the configure script not aborting when not finding a new enough version of OpenGL as it might be useful for other people that need the GUI.

Best regards

Sam

@jdtournier
Copy link
Member

No problem. Thanks for the feedback, it's always appreciated!

jdtournier added a commit that referenced this issue Apr 15, 2015
Also provide more useful error message, with a link to the wiki entry on
OpenGL and remote display. Fixes #218.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants