views:

786

answers:

1

I just setup a Extra Large Heavy Computation EC2 instance to throw it at my Genetic Algorithms problem, hoping to speed up things.

This instance has 8 Intel Xeon processors (around 2.4Ghz each) and 7 Gigs of RAM.

On my machine I have an Intel Core Duo, and matlab is able to work with my two cores just fine by runinng:

matlabpool open 2

On the EC2 instance though, matlab only is capable of detecting 1 out of 8 processors, and if I try running:

matlabpool open 8

I get an error saying that the ClusterSize is 1 since there's only 1 core on my CPU. True, there is only 1 core on each CPU, but I have 8 CPUs on the given EC2 instance!

So the difference from my machine and the ec2 instance is that I have my 2 cores on a single processor locally, while the EC2 instance has 8 distinct processors.

My question is, how do I get matlab to work with those 8 processors?

I found this paper, but it seems related to setting up matlab with multiple EC2 instances (not related to multiple processors on the same instance, EC2 or not), which is not my problem.

Any help appreciated!

Note: the point is not EC2, I am remoting into it and running matlab on it as if it was any other machine. The point is that I can't get matlab to see the 8 processors!

+1  A: 

MATLAB isn't seeing all 8 cores. Set it manually. Parallel menu -> Manage Configurations. Right-click on the "local" line. In the scheduler tab, set the "Number of workers available to scheduler" to 8.


Original answer was a question getting more detail:

Are you trying to use MDCS on EC2 (and MATLAB's user interface on your PC), or are you trying to run MATLAB's user interface and PCT on EC2 (via ssh or vnc or the like)?

DaveWalend
I am remoting into the EC2 instance - as if it was any machine - I am running everything on that instance: matlab interface and parallel computing toolbox. I don't need MDCS as I want to use thei 8 processors on that same machine. It really makes no difference that it is an ec2 instance or any other machine. I am capable of using the 2 cores on my laptop (running locally) but matlab doesn't detect the 8 processors on the ec2 instance (again locally on the instance).
JohnIdol
For some reason, MATLAB isn't seeing all 8 cores. Maybe you can set it manually. (Haven't tried it on EC2, but it works on my four-core box.)No promises, but try the Parallel menu -> Manage Configurations. Right-click on the "local" line. In the scheduler tab, set the "Number of workers available to scheduler" to 8.Please post results back here.
DaveWalend
Thanks - I will try that and report back - I think the issue is that it is not a single processor with 8 cores, it's 8 different processors each of which has 1 core (in computer properties it says "8 processors"). On my laptop I have 2 cores on the same processor and they are detected successfully.
JohnIdol
It worked - tnx a lot, I've got now 8 CPUs blasting off at 100%! If you update in your answer I'll mark as accepted :)
JohnIdol

related questions