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

Parallel version of coordinates to maps #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RaphaelMeudec
Copy link
Member

Closes #17

@jeromedockes
Copy link
Member

the failure is due to the memmap keeping the file open; and there doesn't seem to be a great way to close it -- we can use memmap._mmap.close but it relies on the private _mmap attribute, or on the memmap's finalizer by adding del memmap but that relies on the fact that cpython uses reference counting for gc, and it assumes no exception is raised. all in all if we plan to store all maps in memory anyway the option you posted here is probably a better tradeoff between speed and complexity? sorry for the back and forth

@jeromedockes
Copy link
Member

otherwise what is done in #19 should work

@jeromedockes
Copy link
Member

jeromedockes commented Apr 27, 2022

@RaphaelMeudec I opened a PR on your branch that fixes the windows issue and also allows the user to provide a file path for the output, making it possible to use the function without loading all the brain maps in memory:
RaphaelMeudec#1

if it looks OK to you, you can merge it and then I will merge your PR into the main branch. Or if you don't have time to look at this now, I can merge it directly into main (your commit will still appear in the git log of course)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parallel version of coordinates_to_maps
2 participants