Skip to content

Commit

Permalink
Fixed EEG preprocessing code
Browse files Browse the repository at this point in the history
fzakirov committed Sep 19, 2024
1 parent ea9adc2 commit a6c84ab
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions code/preprocessing-eeg/MADE_pipeline.m
Original file line number Diff line number Diff line change
@@ -10,9 +10,18 @@
cluster = parcluster('local');

% start matlabpool with max workers set in the slurm file
%parpool(cluster, str2num(getenv('SLURM_CPUS_PER_TASK'))) % this should be same as --cpus-per-task
workersAvailable = maxNumCompThreads;
parpool(cluster, workersAvailable)
parpool(cluster, str2num(getenv('SLURM_CPUS_PER_TASK'))) % this should be same as --cpus-per-task
%workersAvailable = maxNumCompThreads;
%parpool(cluster, workersAvailable)

%temp test code; remove
pool = gcp('nocreate'); % Get the current parallel pool without creating a new one
if isempty(pool)
disp('No parallel pool is currently running.');
else
disp(['Parallel pool with ', num2str(pool.NumWorkers), ' workers is running.']);
end


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This script was initially edited by George Buzzell for the NDC Lab EEG
@@ -320,7 +329,7 @@
end
else
[subj, task, sess, ext] = filename_re{1}{:};
desc = '';
output_report_path = [output_location filesep 'MADE_preprocessing_report_' task '_' sess];
end

%% Initialize EEG structure, output variables, and report table

0 comments on commit a6c84ab

Please sign in to comment.