Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MEG - Add support for parallel execution in slurm #9

Open
allermat opened this issue Apr 25, 2024 · 0 comments
Open

MEG - Add support for parallel execution in slurm #9

allermat opened this issue Apr 25, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@allermat
Copy link
Collaborator

          Hi @RikHenson, @olafhauk, @dcdace 

I thought about this, specifically the parallel execution. Below is an example data structure from this mne-bids tutorial:

|MNE-sample-data-bids\
|--- README
|--- dataset_description.json
|--- participants.json
|--- participants.tsv
|--- sub-01\
|------ ses-01\
|--------- sub-01_ses-01_scans.tsv
|--------- meg\
|------------ sub-01_ses-01_acq-calibration_meg.dat
|------------ sub-01_ses-01_acq-crosstalk_meg.fif
|------------ sub-01_ses-01_coordsystem.json
|------------ sub-01_ses-01_task-audiovisual_run-1_channels.tsv
|------------ sub-01_ses-01_task-audiovisual_run-1_events.json
|------------ sub-01_ses-01_task-audiovisual_run-1_events.tsv
|------------ sub-01_ses-01_task-audiovisual_run-1_meg.fif
|------------ sub-01_ses-01_task-audiovisual_run-1_meg.json
|--- sub-emptyroom\
|------ ses-20021206\
|--------- sub-emptyroom_ses-20021206_scans.tsv
|--------- meg\
|------------ sub-emptyroom_ses-20021206_task-noise_channels.tsv
|------------ sub-emptyroom_ses-20021206_task-noise_meg.fif
|------------ sub-emptyroom_ses-20021206_task-noise_meg.json

When we call mne_bids.write_raw_bids it writes the current fif file into the BIDS folder, but also updates several other files, (e.g. the participants.json, participants.tsv, and the *_scans.tsv file). If we execute the code in parallel, then there is a chance that two processes attempt to write the same file at the same time, which would lead to an error. If we parallelize across subjects then these would be the participants.json and .tsv files.

I'm sure there's a way of implementing this so that it works in parallel, the mne-bids-pipeline has even more complicated dependencies between files and it works fine in parallel. But looking at their implementation of parallelization I feel I'm out of my depht there.

Do you have any thoughts on this?

Thanks,
Máté

Originally posted by @allermat in #4 (comment)

@allermat allermat self-assigned this Apr 25, 2024
@allermat allermat added the enhancement New feature or request label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant