-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
setindex! not defined? #155
Comments
The |
Aha, that makes sense indeed. I was thinking about implementing a parallel array type over MPI (using locked windows) and that would have the same problem (lock/unlock being expensive). I wonder if it would be possible to somehow queue all remote updates in a code block and send the data in one go when the block is closed. Possibly some kind of do-block method could be used to avoid forgetting to close. Some pseudo-code to make it a bit clearer: darr = dzeros(...)
w = darraywriter(darr)
for i in some_global_index_collection
w[i] = my_complicated_calculation(i, ...)
end
close(w) # this actually does the communication |
We'd probably have to do something like that to make it efficient. If you are considering an MPI based array type then you might want to take a look at https://github.com/kpamnany/Gasp.jl which we used for the big Celeste runs last year. |
Hi,
Is it possible
setindex!
is not defined? I tried the following:But got
I could set a value using this workaround (assuming the above was on 4 processes):
So it seems a general
setindex!
would not be that difficult to implement (presumably using the same mechanism to get local indices as used ingetindex
), or am I missing something here?The text was updated successfully, but these errors were encountered: