This enhancement has been incorporated in Release 2012b (R2012b). For previous product releases, read below for any possible workarounds:
This error is caused by a limitation imposed by either the underlying operating system or the MPI implementation used by MATLAB.
The limit imposed by MPI is 8192 characters for the total length of the environment variables passed on to workers.
There are also Operating System limits which vary from the operating system to operating system:
To work around this issue consider one of the two alternatives:
1) Set the large environment variable in the system before launching MATLAB
2) If you must modify a large environment variable inside of MATLAB, then open the MATLABPOOL prior to modifying the environment and the execute one of the following:
pctRunOnAll('setenv('many_a', repmat('a', 1,8192))')
setenv('many_a', repmat('a', 1,8192));