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

Update for julia-0.7 #156

Merged
merged 18 commits into from
Jul 28, 2018
Merged

Update for julia-0.7 #156

merged 18 commits into from
Jul 28, 2018

Conversation

traktofon
Copy link
Contributor

This change makes DistributedArrays work on julia 0.7, but compatibility with 0.6 is lost. All tests pass without deprecation warnings.

There are many minor syntax/library changes, and the following major changes:

  1. The broadcast implementation has been rewritten. The basic strategy is to rewrite the Broadcasted object into its equivalent for the localparts. This will probably only work if all involved arrays are distributed in a "compatible" way. More work is needed to make it fully general.
  2. localindexes renamed to localindices, reflecting the current convention in Julia.
  3. deepcopy(::DArray) added.
  4. importall Base was removed.

Note that there seems to be an obscure issue in Julia which one currently has to work around by calling using DistributedArrays on the master process before calling @everywhere using DistributedArrays.

Calls to reduce and mapreduce with the dims keyword (which replace the reducedim and mapreducedim functions) are currently slow and I guess some part is falling back to methods for AbstractArray. There is related code in src/darray.jl which is still getting called, but I haven't managed to figure out the call path from the Base method.

@andreasnoack
Copy link
Member

Thanks. I might try to continue from here. CuArrays has a switch to turn off scalar indexing which is very useful for testing to make sure that we don't hit the generic fallbacks and I plan to add something similar here. It should make it easier to fix the mapreduce code.

andreasnoack and others added 16 commits July 20, 2018 16:00
This caught some additional deprecations.
This fixes (works around?) `localpart` getting dispatched wrongly
on the workers. No idea why.
It has been dropped from Base.
Note: (map)reducedim probably currently falls back to the
method for AbstractArray.
This fixes extreme slowness of convert(Array, ::DArray) which
was falling back to the generic constructor from AbstractArray.
There was a leftover get from the Nullable times. This should cause
an exception, but resulted in a deadlock. Julia bug?
All tests pass without deprecation warnings now.
- update compatibility status
- update example code

Also, remove superfluous method for mapreduce.
`deepcopy(::DArray)` calls `similar` and deepcopies the localparts.
Tests to ensure that `copy` makes a shadllow copy and `deepcopy`
makes a deep copy.
Document change linearindexes -> linearindices.
Clean up comments and unused code.
@andreasnoack
Copy link
Member

I think I've now managed to fix all the cases that hit the slow fallbacks and are covered by tests. The tests now set DistributedArrays.allowscalar(false) except for a few places and will therefore error if a generic fallback is used.

@andreasnoack andreasnoack merged commit 1241687 into JuliaParallel:master Jul 28, 2018
@andreasnoack andreasnoack mentioned this pull request Jul 30, 2018
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.

None yet

2 participants