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

[BUG] Not all preprocessing figures are printed when multiple task and parfor and terminal #1208

Open
4 of 9 tasks
marcobarilari opened this issue Feb 21, 2024 · 7 comments
Open
4 of 9 tasks
Labels
bug 🐛 Something isn't working preproc

Comments

@marcobarilari
Copy link
Collaborator

Is there an existing issue for this?

  • I have searched the existing issues

Operating system

  • Linux
  • Mac
  • Windows

Operating system version

  • Mac OS Version 12 "monterey"

SPM 12 version

  • 7771
  • 7487
  • 7219

Platform

  • MATLAB
  • Octave

Platform version

  • MATLAB 2017b

bidspm version

v3.1.0

bidspm branch / commit number

No response

Expected Behavior

No response

BIDS stats model

No response

Current Behavior & Error message

Quick and dirty report, I can expand later

Running preproc in the terminal one task after the other with parfor but only 1 subject at the time. The second task run does not have realign figures printed, first task all in order.

Anything else?

No response

@marcobarilari marcobarilari added the bug 🐛 Something isn't working label Feb 21, 2024
@marcobarilari marcobarilari changed the title [BUG] Not all preprocessing figure are printed when multiple task and parfo [BUG] Not all preprocessing figure are printed when multiple task and parfor and terminal Feb 21, 2024
Copy link

Thank you for your issue. Give us a little time to review it.

PS. You might want to check the FAQ if you haven't done so already.

This is an automated reply, generated by FAQtory

@marcobarilari marcobarilari changed the title [BUG] Not all preprocessing figure are printed when multiple task and parfor and terminal [BUG] Not all preprocessing figures are printed when multiple task and parfor and terminal Feb 21, 2024
@Remi-Gau
Copy link
Contributor

do you have code snippet of this one?

your parfor loop iterates over tasks?

also what do you mean from the terminal? you use the bidspm python based CLI or just call matlab from the terminal to run your script?

@Remi-Gau
Copy link
Contributor

also not sure how easy it will to debug this one: parfor leads to a whole world of problems I am not sure I feel like I want to get into

@marcobarilari
Copy link
Collaborator Author

marcobarilari commented Feb 22, 2024

Hey thanks for you answer, I do not have snippet right now and you are right I was not clear.

Parfor is across subject.

My idea is that the figure is first printed in the wd with som name (which has no specific name) and then moved to subject specific figure folder. In this step might be over written. Actually some times, the figures have the wrong name (eg on is rename realing while it displays the coreg results).

By "from the terminal" I mean I run matlab from the terminal.

Yes parfor is the devil, so no worries. There is no rush atm. I open issues as report and most of the time I find solutions and workaround my self. If I am really stuck I ping on discord ;) Let me know though if you need more info or help to debug.

@marcobarilari
Copy link
Collaborator Author

marcobarilari commented Apr 19, 2024

Hi there, getting back to this issue. The problem perists also while running two instances of matlab and running preproc over two task into two different matlab sessions.

I believe the problem is that spm saves figure in a folder (in my case is the code folder) with a name like eg spm_date_001 and after that bidspm just picks and renames "blindly". So in the case I am running preproc at the same time onto two different subj there is some conflicts (spm or bidsp delete picture or skip renaming or rename wrongly etc.)

A work around could be that these figs with spm like name are saved in specific subj folder or renamed right after.

WDYT?

@Remi-Gau
Copy link
Contributor

maybe adding a step in the batch to move the figures?

@marcobarilari
Copy link
Collaborator Author

Yes it could be a solution, LMK if you need more info/help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working preproc
Projects
None yet
Development

No branches or pull requests

2 participants