DistributedEnvironments.cluster_status!
— Methodcluster_status!(cluster)
Run a status check on each machine in the list and remove any machines not reachable.
DistributedEnvironments.cluster_status
— Methodcluster_status()
Run a status check on each machine in the running cluster.
Prints current users, current cpu utilization and current julia version.
DistributedEnvironments.preprocess_args
— MethodAllows for kwargs with macro, looks for additional args and splits them on =
DistributedEnvironments.@eachmachine
— Macro@eachmachine expr
Similar to @everywhere
, but only runs on one worker per machine. Can be used for things like precompiling, downloading datasets or similar.
DistributedEnvironments.@initcluster
— Macro@initcluster ips [worker_procs=:auto] [sync=true] [status=false]
Takes a list of ip-strings and sets up the current environment on these machines. The machines should be reachable using ssh from the machine running the command. The setup will copy the local project and manifest files as well as copying all packages that are added to the env using dev
to corresponding location on the remote machines.
Additional arguments:
worker_procs
- Integer or :auto (default), how many workers are added on each machine.sync
- Whether or not to sync the local environment (default istrue
) before adding the workers.status
- Whether or not to show a short status (current users, cpu utilization, julia version) for each machine and remove any machine that does not connect. Default isfalse
.
Needs to be called from top level since the macro includes imports.
Example
```julia using DistributedEnvironments
ips = ["10.0.0.1", "10.0.0.2"] @initcluster ips
@everywhere using SomePackage ...