Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: JuliaParallel/DistributedArrays.jl
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.6.5
Choose a base ref
...
head repository: JuliaParallel/DistributedArrays.jl
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.6.6
Choose a head ref
  • 16 commits
  • 8 files changed
  • 5 contributors

Commits on Jun 1, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b38175b View commit details
  2. Version-guard Statistics._mean's extension

    Without this, the change in #218 was a performance regression on Julia 1.0-1.2.
    mbauman authored Jun 1, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    fec43af View commit details

Commits on Oct 5, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    dcae31f View commit details

Commits on Oct 20, 2020

  1. Update index.md

    - Changed "the the" to "the"
    - Changed "which is not probably what we want" to "which is probably not what we want"
    severinson authored Oct 20, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    2bd0a69 View commit details
  2. Merge pull request #226 from severinson/patch-1

    Update index.md
    vchuravy authored Oct 20, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b98875d View commit details

Commits on Aug 16, 2021

  1. Update CompatHelper.yml

    andreasnoack authored Aug 16, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    fd670d7 View commit details
  2. Update TagBot.yml

    andreasnoack authored Aug 16, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ee096b6 View commit details
  3. Update CompatHelper.yml

    Comment out the documenter token
    andreasnoack authored Aug 16, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    50e4983 View commit details
  4. Copy the full SHA
    bfbe775 View commit details
  5. Create CI.yml

    andreasnoack authored Aug 16, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f6adb4e View commit details
  6. Merge pull request #232 from JuliaParallel/compathelper/new_version/2…

    …021-08-16-18-49-09-257-01559320850
    
    CompatHelper: bump compat for Primes to 0.5, (keep existing compat)
    andreasnoack authored Aug 16, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    9821bcb View commit details
  7. Add missing if

    andreasnoack authored Aug 16, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1f68852 View commit details
  8. Merge pull request #220 from mbauman/patch-1

    Fix internal uses of reindex for Julia 1.5 support
    andreasnoack authored Aug 16, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    9eca537 View commit details
  9. Merge pull request #221 from mbauman/patch-2

    Version-guard Statistics._mean's extension
    andreasnoack authored Aug 16, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0168ac9 View commit details
  10. Delete .travis.yml

    andreasnoack authored Aug 16, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    9c7ad5c View commit details
  11. Release 0.6.6

    andreasnoack authored Aug 16, 2021
    2

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    58235e9 View commit details
Showing with 124 additions and 53 deletions.
  1. +69 −0 .github/workflows/CI.yml
  2. +32 −0 .github/workflows/CompatHelper.yml
  3. +6 −2 .github/workflows/TagBot.yml
  4. +0 −45 .travis.yml
  5. +2 −2 Project.toml
  6. +2 −2 docs/src/index.md
  7. +8 −1 src/darray.jl
  8. +5 −1 src/mapreduce.jl
69 changes: 69 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: CI
on:
pull_request:
branches:
- master
push:
branches:
- master
tags: '*'
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.0'
- '1.6'
- '1'
- 'nightly'
os:
- ubuntu-latest
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
file: lcov.info
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- run: |
julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
- run: |
julia --project=docs -e '
using Documenter: doctest
using DistributedArrays
doctest(DistributedArrays)'
- run: julia --project=docs docs/make.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
32 changes: 32 additions & 0 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CompatHelper
on:
schedule:
- cron: 0 0 * * *
workflow_dispatch:
jobs:
CompatHelper:
runs-on: ubuntu-latest
steps:
- name: "Add the General registry via Git"
run: |
import Pkg
ENV["JULIA_PKG_SERVER"] = ""
Pkg.Registry.add("General")
shell: julia --color=yes {0}
- name: "Install CompatHelper"
run: |
import Pkg
name = "CompatHelper"
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
version = "3"
Pkg.add(; name, uuid, version)
shell: julia --color=yes {0}
- name: "Run CompatHelper"
run: |
import CompatHelper
CompatHelper.main()
shell: julia --color=yes {0}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}
8 changes: 6 additions & 2 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
name: TagBot
on:
schedule:
- cron: 0 * * * *
issue_comment:
types:
- created
workflow_dispatch:
jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ssh: ${{ secrets.DOCUMENTER_KEY }}
45 changes: 0 additions & 45 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "DistributedArrays"
uuid = "aaf54ef3-cdf8-58ed-94cc-d582ad619b94"
version = "0.6.5"
version = "0.6.6"

[deps]
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
@@ -12,8 +12,8 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
Primes = "0.4, 0.5"
julia = "1"
Primes = "0.4"

[extras]
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
4 changes: 2 additions & 2 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -405,7 +405,7 @@ on the node that created it.

Nested `spmd` calls
-------------------
As `spmd` executes the the specified function on all participating nodes, we need to be careful with nesting `spmd` calls.
As `spmd` executes the specified function on all participating nodes, we need to be careful with nesting `spmd` calls.

An example of an unsafe(wrong) way:
```julia
@@ -451,6 +451,6 @@ function foo(d::DArray)
end
spmd(foo,....)
```
Without the `myid()` check, the `spmd` call to `foo` would execute `map!` from all nodes, which is not what we probably want.
Without the `myid()` check, the `spmd` call to `foo` would execute `map!` from all nodes, which is probably not what we want.

Similarly `@everywhere` from within a SPMD run should also be driven from the master node only.
9 changes: 8 additions & 1 deletion src/darray.jl
Original file line number Diff line number Diff line change
@@ -597,10 +597,17 @@ function Base.copyto!(a::Array, s::SubDArray)
return a
end

if VERSION < v"1.2"
# This is an internal API that has changed
reindex(A, I, J) = Base.reindex(A, I, J)
else
reindex(A, I, J) = Base.reindex(I, J)
end

function DArray(SD::SubArray{T,N}) where {T,N}
D = SD.parent
DArray(size(SD), procs(D)) do I
lindices = Base.reindex(SD, SD.indices, I)
lindices = reindex(SD, SD.indices, I)
convert(Array, D[lindices...])
end
end
6 changes: 5 additions & 1 deletion src/mapreduce.jl
Original file line number Diff line number Diff line change
@@ -136,7 +136,11 @@ function Base.extrema(d::DArray)
return reduce((t,s) -> (min(t[1], s[1]), max(t[2], s[2])), r)
end

Statistics._mean(f, A::DArray, region) = sum(f, A, dims = region) ./ prod((size(A, i) for i in region))
if VERSION < v"1.3"
Statistics._mean(A::DArray, region) = sum(A, dims = region) ./ prod((size(A, i) for i in region))
else
Statistics._mean(f, A::DArray, region) = sum(f, A, dims = region) ./ prod((size(A, i) for i in region))
end

# Unary vector functions
(-)(D::DArray) = map(-, D)