How to compile standalone executables without using hardware accelerated graphics?

8 vues (au cours des 30 derniers jours)
chacoon
chacoon le 30 Nov 2017
I face low-level graphics errors in MATLAB r2017a. MATLAB is running on a compute cluster and there is nothing I can do about any graphic card drivers etc.
I need to compile software for deployment to my colleagues. So my workaround would be that I compile my MATLAB executables with mcc with the option of -softwareopengl. Just like I would start MATLAB, if I wouldn't want to use hardware accelerated graphics.
So, how can I compile programs not using hardware graphics acceleration? Does anybody know?

Réponses (2)

Bob Blaine
Bob Blaine le 18 Déc 2017
Hi chacoon,
Not sure if this helps you or not, but I think deployed apps actually run softwareopengl if you run the script that is also generated, rather than running the executable directly. If you don't wan't to run from the script, the key would be to set the following:
LD_LIBRARY_PATH=$(LD_LIBRARY_PATH);<matlabinstall>/sys/opengl/lib/glnxa64
Hope that helps.

Jan
Jan le 30 Nov 2017
Maybe just insert this line in the code:
opengl('software');
  2 commentaires
chacoon
chacoon le 30 Nov 2017
Hey Jan, thanks for the answer.
This unfortunately doesn't work. That's what I tried first. When running the executable under linux (which I missed to state), the program exits with the error that you cannot change to software OpenGL during runtime in Linux :-/
Therefore the executable needs to start in OpenGL software mode like you can start MATLAB on the command line with the option -softwareopengl
I would expect that you could compile the code with that option, but I didn't find out how to do that. Starting the executable with the option doesn't work.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Graphics Performance dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by