MATLAB: Matlab 2014b error while running the mapreduce

internal error in mapreduce frameworkmapreduceParallel Computing Toolbox

Hi,
I have recently switched to Matlab 2014b. I am trying to run the mapreduce example (given in the 2014b documentation) to find Maximum Value of a single variable in a data set using mapreduce on local cluster. I am getting the following error while executing the script.
ds = datastore('airlinesmall.csv', 'TreatAsMissing', 'NA');
ds.SelectedVariableNames = 'ArrDelay';
type maxArrivalDelayMapper.m
type maxArrivalDelayReducer.m
maxDelay = mapreduce(ds, @maxArrivalDelayMapper, @maxArrivalDelayReducer);
Starting parallel pool (parpool) using the 'local' profile … connected to 4 workers.
Parallel mapreduce execution on the local cluster:
******************************
  • MAPREDUCE PROGRESS *
******************************
Map 0% Reduce 0%
Analyzing and transferring files to the workers …done.
Error using mapreduce (line 100)
Internal error in the mapreduce framework detected during execution of mapreduce.
Caused by:
An error occurred interpreting function call.
I have been getting the same error while trying to run the other examples from the documentation. What am I missing here?
Thanks in advance, Rajesh

Best Answer

Guess I got the answer. All I needed to do was to define execution environment for mapreduce. So I simply ran
mapreducer(0)
This sets the global execution environment for mapreduce to be the local MATLAB session. And all done.