How to run multiple cores without graphical interfaces?

1 visualización (últimos 30 días)
Xin-Qiang
Xin-Qiang el 18 de Dic. de 2018
Comentada: Xin-Qiang el 20 de Dic. de 2018
How to run multiple cores without graphical interfaces?
Usually, I use the graphical interface of MATLAB to execute the following code.
an example,
parpool('local',4);
parfor ik=1:10
a(ik)=1;
end
But this code can not be run if I don't open the graphical interface of MATLAB.
I would like to know how to run a programe like this example without the graphical interface of MATLAB.
Can I implement the calculation with other commands without the graphical interface of MATLAB?
  2 comentarios
Jan
Jan el 19 de Dic. de 2018
The problem might be hidden in te expression "can not be run if I don't open the graphical interface". What are you doing exactly? To understand what happens, it is helpful if you post, what you are doing and what you observe. E.g. do you get an error message?
Xin-Qiang
Xin-Qiang el 20 de Dic. de 2018
Thanks for your help. I know what happened now. I use '-nojvm' to run matlab which does not allow parpool to work according to Edric Ellis's answer. When I use '-nodisplay', everything works well.

Iniciar sesión para comentar.

Respuesta aceptada

Edric Ellis
Edric Ellis el 19 de Dic. de 2018
I'm guessing you're starting MATLAB by running matlab -nojvm. This will not allow parpool to work. Use matlab -nodisplay instead.

Más respuestas (0)

Categorías

Más información sobre Graphics Objects en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by