can I use multiple cores of my CPU?

8 visualizaciones (últimos 30 días)
Michael Levin
Michael Levin el 22 de Feb. de 2017
Editada: Michael Levin el 22 de Feb. de 2017
I have an Apple Mac Pro with 6 cores. I've got a math-intensive application running. Can I launch another instance of Matlab or some other way run another copy of my code (with different parameters) do use multiple cores in parallel and get several (different) copies of my algorithm done in the same overall time frame? To be clear: my code is not parallel code - it's a simple looping computation, and I just want to run several different versions of it at the same time, using multiple CPUs in Apple OS X. Possible?
  2 comentarios
Rik
Rik el 22 de Feb. de 2017
What do you mean when you say that your code is not parallel code? parfor doesn't work I guess?
On Windows it is possible to open multiple instances of Matlab, so I don't see why you shouldn't be able to on a Mac. They should run on different cores, but there is an easy way to check...
Is it really impossible to vectorize your loop? Or at the very least convert it to something that you can hand over to rowfun?
Michael Levin
Michael Levin el 22 de Feb. de 2017
Editada: Michael Levin el 22 de Feb. de 2017
It certainly could be parallelized, with some effort. I simply meant, I'm not trying to run parallel code now. Right now all I want is to run 2 instances (ideally, less work than rewriting the whole thing to work in N parallel threads). How do I open a multiple instance of Matlab in Apple OS? I don't see a "New Main Window" command or anything like that. When I activate the main application, all it does is take me back to the original one, not run a new copy. I tried
> right select on the Matlab icon in the dock and select "Open Additional Instance"
but nothing at all seems to be happening.

Iniciar sesión para comentar.

Respuestas (1)

Adam
Adam el 22 de Feb. de 2017
Editada: Adam el 22 de Feb. de 2017
You can launch as many instances of Matlab as you like (on Windows at least, I don't know about Apple) as far as I am aware (well, there must be a limit, but I have never wanted more than 2). Why don't you just try doing it, it seems the easiest way to find out?!

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by