Utility
MCIntegration.MCUtility
— ModuleUtility data structures and functions
MCIntegration.MCUtility.StopWatch
— TypeStopWatch(start, interval, callback)
Initialize a stopwatch.
Arguments
start::Float64
: initial time (in seconds)interval::Float64
: interval to click (in seconds)callback
: callback function after each click (interval seconds)
MCIntegration.MCUtility.MPIbcast!
— Methodfunction MPIbcast!(data::AbstractArray)
Broadcast data from MPI root to other nodes. data
is an array.
MCIntegration.MCUtility.MPIbcast
— Methodfunction MPIbcast(data)
Broadcast data from MPI root to other nodes. data
can be an array or a scalar. The root node its own data, and other nodes return the broadcasted data from the root.
MCIntegration.MCUtility.MPIreduce
— Functionfunction MPIreduce(data, op = MPI.SUM)
Reduce data from MPI workers to root with the operation op
. data
can be an array or a scalar. The root node returns the reduced data with the operation op
, and other nodes return their own data.
MCIntegration.MCUtility.MPIreduce!
— Functionfunction MPIreduce!(data::AbstractArray, op = MPI.SUM)
Reduce data from MPI workers to root with the operation op
. data
should be an array.
MCIntegration.MCUtility.check
— Methodcheck(stopwatch, parameter...)
Check stopwatch. If it clicks, call the callback function with the unpacked parameter
MCIntegration.MCUtility.disable_threading
— MethodConvenience function to disable all threading and assert that Julia threading is off as well.
MCIntegration.MCUtility.mpi_nprocs
— FunctionNumber of processors used in MPI. Can be called without ensuring initialization.