LIMO-EEG-Toolbox / limo_tools

Hierarchical Linear Modelling for MEEG data
https://limo-eeg-toolbox.github.io/limo_meeg/
Other
58 stars 28 forks source link

Error using limo_random_robust [Question] #192

Closed Satoshi-Young closed 2 months ago

Satoshi-Young commented 3 months ago

when I run a clustering correction with 1000 bootstraps in v4.0, an error occurs:

Error using limo_random_robust (line 1275) The source code (D:\software\toolbox\eeglab2024.0\plugins\LIMO4.0\limo_random_robust.m) for the parfor-loop that is trying to execute on the worker could not be found.

Error in limo_results>check_boot_and_tfce (line 333) limo_random_robust(6,fullfile(filepath,'Yr.mat'),handles.LIMO.data.Cat, ...

Error in limo_results>Image_results_Callback (line 91) handles = check_boot_and_tfce(handles,fullfile(PathName,FileName));

Error in gui_mainfcn (line 95) feval(varargin{:});

Error in limo_results (line 35) gui_mainfcn(gui_State, varargin{:});

Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)limo_results('Image_results_Callback',hObject,eventdata,guidata(hObject))

Caused by: Unrecognized function or variable 'centered_dataa'. Error using remoteParallelFunction (line 84) Worker unable to find file. Unrecognized function or variable 'centered_dataa'.

Error while evaluating UIControl Callback.

When I opened the function limo_random_robust(), I noticed that the variable 'centered_dataa' on line 1292 had not been defined. I made a modification and changed it to 'centered_data'. Additionally, I replaced 'parfor' on line 1275 with 'for'. With these changes, the program was able to run the clustering correction successfully. However, I am not sure whether the results are accurate or not, and running 1000 bootstraps is time-consuming because 'parfor' is not functioning properly. Are there any alternative solutions? This issue seems to persist in version 3.4 as well. I'm unsure if this is a bug.

CPernet commented 3 months ago

yes this would fix it -- I pushed the change into https://github.com/LIMO-EEG-Toolbox/limo_tools/tree/master which I recommend you use rather than the plugin download as tat version is too bugy

for parfor might be fixed as well -- as to do with how which handle the parallel tool (let me know)

thx