From 46fb0650d41e8b78b4d9ac00919ec4d1d825631b Mon Sep 17 00:00:00 2001 From: spaette Date: Sun, 28 Jul 2024 15:08:15 -0500 Subject: [PATCH] typos --- docs/src/index.md | 4 ++-- src/broadcast.jl | 2 +- src/darray.jl | 2 +- src/mapreduce.jl | 2 +- src/serialize.jl | 2 +- test/darray.jl | 8 ++++---- test/spmd.jl | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/src/index.md b/docs/src/index.md index 267abdf..70b8b32 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -59,7 +59,7 @@ equal the number of processes. * `localpart(d::DArray)` obtains the locally-stored portion of a `DArray`. -* Localparts can be retrived and set via the indexing syntax too. +* Localparts can be retrieved and set via the indexing syntax too. Indexing via symbols is used for this, specifically symbols `:L`,`:LP`,`:l`,`:lp` which are all equivalent. For example, `d[:L]` returns the localpart of `d` while `d[:L]=v` sets `v` as the localpart of `d`. @@ -314,7 +314,7 @@ The following primitives can be used in SPMD mode. - `recvfrom_any(; tag=nothing)` - receives data from any `pid` -- `barrier(;pids=procs(), tag=nothing)` - all tasks wait and then proceeed +- `barrier(;pids=procs(), tag=nothing)` - all tasks wait and then proceed - `bcast(data, pid; tag=nothing, pids=procs())` - broadcasts the same data over `pids` from `pid` diff --git a/src/broadcast.jl b/src/broadcast.jl index cdd4a14..4026a54 100644 --- a/src/broadcast.jl +++ b/src/broadcast.jl @@ -56,7 +56,7 @@ end # We purposefully only specialise `copyto!`, # Broadcast implementation that defers to the underlying BroadcastStyle. We can't # assume that `getindex` is fast, furthermore we can't assume that the distribution of -# DArray accross workers is equal or that the underlying array type is consistent. +# DArray across workers is equal or that the underlying array type is consistent. # # Implementation: # - first distribute all arguments diff --git a/src/darray.jl b/src/darray.jl index 7633be7..b55ccbc 100644 --- a/src/darray.jl +++ b/src/darray.jl @@ -814,7 +814,7 @@ import Base: checkbounds_indices # from all other arrays, wherein we simply iterate over the source array’s # elements. You need to *both* know which elements in `J` were skipped # (`indexin_mask`) and which dimensions should match up (`restrict_indices`) -# 4. If `K` doesn’t correspond to an entire chunk, reinterpret `K` in terms of +# 4. If `K` doesn't correspond to an entire chunk, reinterpret `K` in terms of # the local portion of the source array function Base.setindex!(a::Array, s::SubDArray, I::Union{UnitRange{Int},Colon,Vector{Int},StepRange{Int,Int}}...) diff --git a/src/mapreduce.jl b/src/mapreduce.jl index f8fcb9e..9403652 100644 --- a/src/mapreduce.jl +++ b/src/mapreduce.jl @@ -63,7 +63,7 @@ function mapreducedim_within(f, op, A::DArray, region) tuple(arraysize...), procs(A), indx, cuts) end -# Compute mapreducedim accros the processes. This should be done after mapreducedim +# Compute mapreducedim across the processes. This should be done after mapreducedim # has been run on each localpart with mapreducedim_within. Eventually, we might # want to write mapreducedim_between! as a binary reduction. function mapreducedim_between!(f, op, R::DArray, A::DArray, region) diff --git a/src/serialize.jl b/src/serialize.jl index 385a89f..6eac7fc 100644 --- a/src/serialize.jl +++ b/src/serialize.jl @@ -52,7 +52,7 @@ end DestinationSerializer(f::Function, pids::Array) = DestinationSerializer(f, pids, nothing) -# contructs a DestinationSerializer after verifying that the shape of pids. +# constructs a DestinationSerializer after verifying that the shape of pids. function verified_destination_serializer(f::Function, pids::Array, verify_size) @assert size(pids) == verify_size return DestinationSerializer(f, pids) diff --git a/test/darray.jl b/test/darray.jl index 4a8d3df..3030e85 100644 --- a/test/darray.jl +++ b/test/darray.jl @@ -28,7 +28,7 @@ using Random close(DA) end - @testset "Create darray with unconventional distribution and distibute like it" begin + @testset "Create darray with unconventional distribution and distribute like it" begin block = 10 Y = nworkers() * block X = nworkers() * block @@ -66,7 +66,7 @@ using Random @test DistributedArrays.defaultdist(50,4) == [1,14,27,39,51] end - @testset "Inhomogenous typeof(localpart)" begin + @testset "Inhomogeneous typeof(localpart)" begin block = 10 Y = nworkers() * block X = nworkers() * block @@ -531,7 +531,7 @@ check_leaks() close(A) end - @testset "2D dzeros default element type, Dims constuctor" begin + @testset "2D dzeros default element type, Dims constructor" begin A = dzeros((10,10)) @test A == zeros((10,10)) @test eltype(A) == Float64 @@ -582,7 +582,7 @@ check_leaks() close(A) end - @testset "2D dones default element type, Dims constuctor" begin + @testset "2D dones default element type, Dims constructor" begin A = dones((10,10)) @test A == ones((10,10)) @test eltype(A) == Float64 diff --git a/test/spmd.jl b/test/spmd.jl index 0bd289e..b14918f 100644 --- a/test/spmd.jl +++ b/test/spmd.jl @@ -104,7 +104,7 @@ spmd(spmd_test1) d_out[:L] = localsum end -# run foo_spmd on all workers, many of them, all concurrently using implictly different contexts. +# run foo_spmd on all workers, many of them, all concurrently using implicitly different contexts. in_arrays = map(x->DArray(I->fill(myid(), (map(length,I)...,)), (nworkers(), 2), workers(), [nworkers(),1]), 1:8) out_arrays = map(x->ddata(), 1:8) @@ -117,7 +117,7 @@ end println("SPMD: Passed testing of spmd function run concurrently") -# run concurrently with explictly different contexts +# run concurrently with explicitly different contexts # define the function everywhere @everywhere function foo_spmd2(d_in, d_out, n)