MATLAB: What does happen for a global variable when running in the parallel mode? 
What does happen for a global variable when running in the parallel mode? 

I have a global variable, "to_be_optimized_parameterIndexSet", which is a vector of indexes that should be optimized using gamultiobj and I have set its value only in the main script(nowhere else). 

My code works properly in serial mode but when I switch to parallel mode (using "matlabpool open" and setting proper values for 'gaoptimset' ) the mentioned global variable becomes empty (=[]) in the fitness function. I have checked all the code to make sure I've not changed this global variable everywhere else. 

I have a quad-core processor.

Where is the bug? any suggestion?

MATLAB: What does happen for a global variable when running in the parallel mode? 
===

What does happen for a global variable when running in the parallel mode? 

I have a global variable, "to_be_optimized_parameterIndexSet", which is a vector of indexes that should be optimized using gamultiobj and I have set its value only in the main script(nowhere else). 

My code works properly in serial mode but when I switch to parallel mode (using "matlabpool open" and setting proper values for 'gaoptimset' ) the mentioned global variable becomes empty (=[]) in the fitness function. I have checked all the code to make sure I've not changed this global variable everywhere else. 

I have a quad-core processor.

Where is the bug? any suggestion?
