Skip to content

Commit 2a8df42

Browse files
cummulative commits until 2025-Jan-30
1 parent 0c450de commit 2a8df42

17 files changed

+406
-167
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,28 @@ concurrency:
1414
# Cancel intermediate builds: only pull request builds
1515
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release-') || github.run_number }}
1616
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
17+
1718
jobs:
1819
test:
19-
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
20+
name: julia -t${{ matrix.threads}} - ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
2021
runs-on: ${{ matrix.os }}
22+
timeout-minutes: 30
2123
strategy:
2224
fail-fast: false
2325
matrix:
24-
version:
25-
- 'nightly'
26-
os:
27-
- ubuntu-latest
28-
- macOS-latest
29-
- windows-latest
30-
arch:
31-
- x64
32-
- x86
26+
threads:
27+
# - '1'
28+
- '4,4'
29+
version: [nightly]
30+
os: [ubuntu-latest, windows-latest, macOS-latest]
31+
arch: [x64, x86, aarch64]
3332
exclude:
33+
- os: ubuntu-latest
34+
arch: aarch64
35+
- os: windows-latest
36+
arch: aarch64
37+
- os: macOS-latest
38+
arch: x64
3439
- os: macOS-latest
3540
arch: x86
3641
steps:
@@ -39,25 +44,17 @@ jobs:
3944
with:
4045
version: ${{ matrix.version }}
4146
arch: ${{ matrix.arch }}
42-
- uses: actions/cache@v4
43-
env:
44-
cache-name: cache-artifacts
45-
with:
46-
path: ~/.julia/artifacts
47-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
48-
restore-keys: |
49-
${{ runner.os }}-test-${{ env.cache-name }}-
50-
${{ runner.os }}-test-${{ matrix.os }}
51-
${{ runner.os }}-
52-
- uses: julia-actions/julia-buildpkg@v1
47+
- uses: julia-actions/cache@v2
5348
- uses: julia-actions/julia-runtest@v1
5449
env:
5550
JULIA_DISTRIBUTED_TESTING_STANDALONE: 1
51+
JULIA_NUM_THREADS: '${{ matrix.threads}}'
5652
- uses: julia-actions/julia-processcoverage@v1
57-
- uses: codecov/codecov-action@v4
53+
- uses: codecov/codecov-action@v5
5854
with:
59-
file: lcov.info
55+
files: lcov.info
6056
token: ${{ secrets.CODECOV_TOKEN }}
57+
6158
docs:
6259
runs-on: ubuntu-latest
6360
steps:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Manifest.toml
2+
*.swp

Project.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,18 @@ Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
88
Sockets = "6462fe0b-24de-5631-8697-dd941f90decc"
99

1010
[extras]
11+
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
1112
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1213
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1314

1415
[targets]
15-
test = ["LinearAlgebra", "Test"]
16+
test = ["Aqua", "LinearAlgebra", "Test"]
17+
18+
[compat]
19+
Aqua = "0.8.10"
20+
LinearAlgebra = "1"
21+
Random = "1"
22+
Serialization = "1"
23+
Sockets = "1"
24+
Test = "1"
25+
julia = "1"

README.md

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
# Distributed (with a multiscale parallelism extension)
22

3-
The `Distributed` package provides functionality for creating and controlling multiple Julia processes remotely, and for performing distributed and parallel computing. It uses network sockets or other supported interfaces to communicate between Julia processes, and relies on Julia's `Serialization` stdlib package to transform Julia objects into a format that can be transferred between processes efficiently. It provides a full set of utilities to create and destroy new Julia processes and add them to a "cluster" (a collection of Julia processes connected together), as well as functions to perform Remote Procedure Calls (RPC) between the processes within a cluster. See the `API` section for details.
4-
3+
The `Distributed` package provides functionality for creating and controlling
4+
multiple Julia processes remotely, and for performing distributed and parallel
5+
computing. It uses network sockets or other supported interfaces to communicate
6+
between Julia processes, and relies on Julia's `Serialization` stdlib package to
7+
transform Julia objects into a format that can be transferred between processes
8+
efficiently. It provides a full set of utilities to create and destroy new Julia
9+
processes and add them to a "cluster" (a collection of Julia processes connected
10+
together), as well as functions to perform Remote Procedure Calls (RPC) between
11+
the processes within a cluster. See the `API` section for details.
512
This package ships as part of the Julia stdlib.
613

714
> [!NOTE]
@@ -23,17 +30,38 @@ To use a newer version of this package, you need to build Julia from scratch. Th
2330

2431
It's also possible to load a development version of the package using [the trick used in the Section named "Using the development version of Pkg.jl" in the `Pkg.jl` repo](https://github.com/JuliaLang/Pkg.jl#using-the-development-version-of-pkgjl), but the capabilities are limited as all other packages will depend on the stdlib version of the package and will not work with the modified package.
2532

33+
### On Julia 1.11+
34+
In Julia 1.11 Distributed was excised from the default system image and became
35+
more of an independent package. As such, to use a different version it's enough
36+
to just `dev` it explicitly:
37+
```julia-repl
38+
pkg> dev https://github.com/JuliaLang/Distributed.jl.git
39+
```
40+
### On older Julia versions
41+
To use a newer version of this package on older Julia versions, you need to build
42+
Julia from scratch. The build process is the same as any other build except that
43+
you need to change the commit used in `stdlib/Distributed.version`.
44+
It's also possible to load a development version of the package using [the trick
45+
used in the Section named "Using the development version of Pkg.jl" in the
46+
`Pkg.jl`
47+
repo](https://github.com/JuliaLang/Pkg.jl#using-the-development-version-of-pkgjl),
48+
but the capabilities are limited as all other packages will depend on the stdlib
49+
version of the package and will not work with the modified package.
50+
2651
## API
2752

28-
The public API of `Distributed` consists of a variety of functions for various tasks; for creating and destroying processes within a cluster:
53+
The public API of `Distributed` consists of a variety of functions for various
54+
tasks; for creating and destroying processes within a cluster:
2955

3056
- `addprocs` - create one or more Julia processes and connect them to the cluster
3157
- `rmprocs` - shutdown and remove one or more Julia processes from the cluster
3258

3359
For controlling other processes via RPC:
3460

3561
- `remotecall` - call a function on another process and return a `Future` referencing the result of that call
36-
- `Future` - an object that references the result of a `remotecall` that hasn't yet completed - use `fetch` to return the call's result, or `wait` to just wait for the remote call to finish
62+
- `Future` - an object that references the result of a `remotecall` that hasn't
63+
yet completed - use `fetch` to return the call's result, or `wait` to just
64+
wait for the remote call to finish.
3765
- `remotecall_fetch` - the same as `fetch(remotecall(...))`
3866
- `remotecall_wait` - the same as `wait(remotecall(...))`
3967
- `remote_do` - like `remotecall`, but does not provide a way to access the result of the call
@@ -62,6 +90,15 @@ For controlling multiple processes at once:
6290

6391
### Process Identifiers
6492

65-
Julia processes connected with `Distributed` are all assigned a cluster-unique `Int` identifier, starting from `1`. The first Julia process within a cluster is given ID `1`, while other processes added via `addprocs` get incrementing IDs (`2`, `3`, etc.). Functions and macros which communicate from one process to another usually take one or more identifiers to determine which process they target - for example, `remotecall_fetch(myid, 2)` calls `myid()` on process 2.
66-
67-
**Note:** Only process 1 (often called the "head", "primary", or "master") may add or remove processes, and manages the rest of the cluster. Other processes (called "workers" or "worker processes") may still call functions on each other and send and receive data, but `addprocs`/`rmprocs` on worker processes will fail with an error.
93+
Julia processes connected with `Distributed` are all assigned a cluster-unique
94+
`Int` identifier, starting from `1`. The first Julia process within a cluster is
95+
given ID `1`, while other processes added via `addprocs` get incrementing IDs
96+
(`2`, `3`, etc.). Functions and macros which communicate from one process to
97+
another usually take one or more identifiers to determine which process they
98+
target - for example, `remotecall_fetch(myid, 2)` calls `myid()` on process 2.
99+
100+
**Note:** Only process 1 (often called the "head", "primary", or "master") may
101+
add or remove processes, and manages the rest of the cluster. Other processes
102+
(called "workers" or "worker processes") may still call functions on each other
103+
and send and receive data, but `addprocs`/`rmprocs` on worker processes will
104+
fail with an error.

src/Distributed.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export
4949
procs,
5050
remote,
5151
remotecall,
52+
remotecall_eval,
5253
remotecall_fetch,
5354
remotecall_wait,
5455
remote_do,

0 commit comments

Comments
 (0)