How to exclude the Java virtual machine from astand-alone application?
5 次查看(过去 30 天)
显示 更早的评论
I want to use the mcc compiler to generate a stand-alone application to run on a shared cluster. Due to memory restrictions, I want to exclude jvm. I use
mcc -m -R -nojvm -R -nosplash -R -nodisplay -R -nodesktop -R -singleCompThread -I [included directories] -o application_name
During compiling, I get the message:
Warning: You have specified '-R -nojvm', which may restrict or eliminate MATLAB graphics functionality at runtime.
That sounds good. Now I set
ulimit -v 1000000
because that is the setting on the shared machine. Then I run
sh run_application_name.sh $mcrroot
with $mcrroot pointing to my Matlab runtime installation. The results is:
------------------------------------------ Setting up environment variables --- LD_LIBRARY_PATH is .:/usr/local/MATLAB/R2016a//runtime/glnxa64:/usr/local/MATLAB/R2016a//bin/glnxa64:/usr/local/MATLAB/R2016a//sys/os/glnxa64:/usr/local/MATLAB/R2016a//sys/opengl/lib/glnxa64 Opening log file: /home/veen/java.log.20374 Fatal Error on startup: Unable to start the JVM. Error occurred during initialization of VM Could not reserve enough space for object heap
There is not enough memory to start up the Java virtual machine. Try quitting other applications or increasing your virtual memory. ----------------------------
What am I missing? It seems that the JVM is started anyway. Moreover, if I compile again right away (on the same machine and terminal) I even get the "Unable to start the JVM" message at compile time!
0 个评论
回答(1 个)
Soma Ardhanareeswaran
2016-10-21
Which version of MATLAB are you using to compile the standalone application? Can you try creating a standalone with the -nojvm option for the following code?
surf(peaks)
This code should fail by throwing 'Error using gcf' since the application tries to use the JVM then the compiled application does not support it.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 MATLAB Runtime 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!