matlabpool is not supported because Java is not currently available

5 visualizzazioni (ultimi 30 giorni)
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?

Risposte (1)

Titus Edelhofer
Titus Edelhofer il 26 Lug 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
  1 Commento
Linar
Linar il 26 Lug 2011
Hi Titus,
originally I didn't pass any arguments and it didn't work as well.
I was just trying to find out an argument which enables java.
Of course, "-nodesktop", "-nodisplay", "-nosplash" don't do this, but -nodisplay for example helps to get rid of unwanted plots which I found helpful.
Linar

Accedi per commentare.

Categorie

Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by