matlabpool is not supported because Java is not currently available
5 次查看(过去 30 天)
显示 更早的评论
I'm trying to run MultiStart solver in parallel from my c++ code. I compiled the matlab function containing matlabpool open 16 into a c++ shared library. However, when I call the function from c++ code, I get the following: Error using ==> matlabpool>iVerifyJava at 379 matlabpool is not supported because Java is not currently available.
Error in ==> matlabpool at 92
The shared library was compiled without -nojvm option. I guess, I have to use some additional argument when calling mclInitializeApplication. This is how I call it currently:
const char *args[] = {"-nodesktop", "-nodisplay", "-nosplash"};
if (!mclInitializeApplication(args, 3))
{
std::cerr << "mclInitializeApplication = false";
return false;
}
There is an option -java (<http://www.mathworks.com/help/toolbox/compiler/mclinitializeapplication.html)>, but when I try to use, it doesn't recognize it.
Any ideas?
回答(1 个)
Titus Edelhofer
2011-7-26
Hi Linar,
for using mclInitializeApplications for a shared library I would usually pass no arguments at all, i.e.,
if (!mclInitializeApplication(NULL, 0))
although I doubt this will make a difference, does it?
Titus
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!