matlabpool is not supported because Java is not currently available
5 views (last 30 days)
Show older comments
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?
Answers (1)
Titus Edelhofer
on 26 Jul 2011
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
See Also
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!