Documentation ¶
Overview ¶
package mpi wraps the Message Passing Interface for parallel computations
Index ¶
- func Abort()
- func AllReduceMax(x, w []float64)
- func AllReduceMin(x, w []float64)
- func AllReduceSum(x, w []float64)
- func AllReduceSumAdd(y, x, w []float64)
- func Barrier()
- func BcastFromRoot(x []float64)
- func DblRecv(vals []float64, from_proc int)
- func DblSend(vals []float64, to_proc int)
- func IntAllReduceMax(x, w []int)
- func IntRecv(vals []int, from_proc int)
- func IntSend(vals []int, to_proc int)
- func IsOn() bool
- func Rank() int
- func SingleIntRecv(from_proc int) (val int)
- func SingleIntSend(val, to_proc int)
- func Size() int
- func Start(debug bool)
- func Stop(debug bool)
- func SumToRoot(dest, orig []float64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllReduceMax ¶
func AllReduceMax(x, w []float64)
AllReduceMax combines all values in 'x' from all processors. When corresponding components (at the same position) exist in a number of processors, the maximum value is selected. 'w' is a workspace with length = len(x). The operations are:
w := join_all_selecting_max(x) x := w
func AllReduceMin ¶
func AllReduceMin(x, w []float64)
AllReduceMin combines all values in 'x' from all processors. When corresponding components (at the same position) exist in a number of processors, the minimum value is selected. 'w' is a workspace with length = len(x). The operations are:
w := join_all_selecting_min(x) x := w
func AllReduceSum ¶
func AllReduceSum(x, w []float64)
AllReduceSum combines all values in 'x' from all processors. Corresponding components in slice 'x' are added together. 'w' is a workspace with length = len(x). The operations are:
w := join_all_with_sum(x) x := w
func AllReduceSumAdd ¶
func AllReduceSumAdd(y, x, w []float64)
AllReduceSumAdd combines all values in 'x' from all processors and adds the result to another slice 'y'. Corresponding components in slice 'x' are added together. 'w' is a workspace with length = len(x). The operations are:
w := join_all_with_sum(x) y += w
func BcastFromRoot ¶
func BcastFromRoot(x []float64)
BcastFromRoot broadcasts 'x' slice from root (Rank == 0) to all other processors
func DblRecv ¶
DblRecv receives a slice of floats from processor 'from_proc'
NOTE: 'vals' must be pre-allocated with the right number of values that will be sent by 'from_proc'
func IntAllReduceMax ¶
func IntAllReduceMax(x, w []int)
IntAllReduceMax combines all (int) values in 'x' from all processors. When corresponding components (at the same position) exist in a number of processors, the maximum value is selected. 'w' is a workspace with length = len(x). The operations are:
w := join_all_selecting_max(x) x := w
func IntRecv ¶
IntRecv receives a slice of integers from processor 'from_proc'
NOTE: 'vals' must be pre-allocated with the right number of values that will be sent by 'from_proc'
func IsOn ¶
func IsOn() bool
InOn tells whether MPI is on or not
NOTE: this returns true even after Stop
func SingleIntRecv ¶
SingleIntRecv receives a single integer 'val' from processor 'to_proc'
func SingleIntSend ¶
func SingleIntSend(val, to_proc int)
SingleIntSend sends a single integer 'val' to processor 'to_proc'
Types ¶
This section is empty.