MATLAB: Trying to get executable to use other computer’s multiple cores with matlabpool, but getting error

compiler parallel computing toolbox matlabpool parforMATLABMATLAB CompilerParallel Computing Toolbox

Using Matlab 2011a on a winXP 32 bit machine with 2 cores, I have a program I turned into an executable using Matlab Compiler that I want to run on another windows7, 64 bit, quad core computer. Here's the simplified version…
clear all
close all
matlabpool open 2
currdir = cd;
imDir = [cd '\0625_15\'];
parfor ii = 1:8
%%process code %%
end
y = toc;
matlabpool close
I've installed the MRC on the new machine and have also tried, with success, using 1 processor in the code (ie. not using matlabpool). Using 1 core in the executable runs fine on the new machine.
When the executable runs on the newer machine with "matlabpool open 2", I get an error saying…
Starting matlabpool using the 'localconfig-hyperthread' configuration … connected to 2 labs
??? The class "distcomp.remoteparfor" is undefined
How can I get the code to run and take advantage of the multiple cores of the newer machine? Do I need to include the local scheduler configuration file? If so, how do I do this exactly?

Best Answer

Solved the problem. Turns out I needed to make my code a function before compiling it into an executable. I simply added
function testcode
at the top of my code.
This got rid of the
Error in ==> parallel_function at 430
Hope this helps out.