Cluster Query Utilities
These are a collection of helper functions that are used in ParallelUtilities, but may be used independently as well to obtain information about the cluster on which codes are being run.
To use these functions run
julia> using ParallelUtilities.ClusterQueryUtilsThe functions defined in this module are:
ParallelUtilities.ClusterQueryUtils.hostnames — Functionhostnames([procs = workers()])Return the hostname of each worker in procs. This is obtained by evaluating Libc.gethostname() on each worker asynchronously.
ParallelUtilities.ClusterQueryUtils.nodenames — Functionnodenames([procs = workers()])Return the unique hostnames that the workers in procs lie on. On an HPC system these are usually the hostnames of the nodes involved.
ParallelUtilities.ClusterQueryUtils.nprocs_node — Functionnprocs_node([procs = workers()])Return the number of workers on each host. On an HPC system this would return the number of workers on each node.
ParallelUtilities.ClusterQueryUtils.oneworkerpernode — Functiononeworkerpernode([workers::AbstractVector{<:Integer} = workers()])Return a subsample of workers such that each pid in the returned vector is located on one machine/node of the cluster.
ParallelUtilities.ClusterQueryUtils.procs_node — Functionprocs_node([procs = workers()])Return the worker ids on each host of the cluster. On an HPC system this would return the workers on each node.
ParallelUtilities.ClusterQueryUtils.workerpool_nodes — Methodworkerpool_nodes([pool::AbstractWorkerPool = WorkerPool(workers())])Return a WorkerPool with one worker per machine/node of the cluster.
ParallelUtilities.ClusterQueryUtils.workers_myhost — Functionworkers_myhost([workers::AbstractVector{<:Integer} = workers()])Return a list of all workers that are on the local machine/node of the cluster.