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

thread safety? #259

Closed
bjarthur opened this issue Sep 11, 2015 · 2 comments
Closed

thread safety? #259

bjarthur opened this issue Sep 11, 2015 · 2 comments

Comments

@bjarthur
Copy link
Member

could someone please elaborate on @timholy 's concern about thread safety here: #132

i ask, because i've been having a problem writing .mat files from julia inside a pmap. julia's added procs are processes, not threads, correct? and if each process writes to a separate .mat file, shouldn't all be okay? yet doing so, what was eventually getting stored to disk was on occasion not what i wrote to it. strings were getting truncated or pre-pended to. numbers were changing values. all in a non-deterministic way. only single-threading matwrite by passing the data back to the main thread solved the problem.

@eschnett
Copy link
Contributor

Yes, Julia uses processes for pmap. If you see a problem while accessing different files from different processes, then this can also be a problem with the file server -- I've seen systems where even reading (!) 100 files in parallel would return wrong results. That's obviously a system problem, I assume the NFS server was at fault.

From your description it sounds as if HDF5 is not at fault.

@simonbyrne
Copy link
Collaborator

Fixed by #1021.

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

No branches or pull requests

3 participants