mpi

package
v2.0.0-dev0.0.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2024 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package mpi wraps the Message Passing Interface for distributed memory data sharing across a collection of processors (procs).

The wrapping code was initially copied from https://github.com/cpmech/gosl/mpi and significantly modified.

All standard Go types are supported using the apache arrow tmpl generation tool. Int is assumed to be 64bit and is defined as a []int because that is typically more convenient.

Index

Constants

View Source
const (
	// Root is the rank 0 node -- it is more semantic to use this
	Root int = 0
)

Variables

View Source
var LogErrors = true

set LogErrors to control whether MPI errors are automatically logged or not

View Source
var PrintAllProcs = false

PrintAllProcs causes mpi.Printf to print on all processors -- otherwise just 0

Functions

func AllPrintf

func AllPrintf(fs string, pars ...any)

AllPrintf does fmt.Printf on all nodes, with node rank printed first This is best for debugging MPI itself.

func AllPrintln

func AllPrintln(fs ...any)

AllPrintln does fmt.Println on all nodes, with node rank printed first This is best for debugging MPI itself.

func Finalize

func Finalize()

Finalize finalises MPI (frees resources, shuts it down)

func Init

func Init()

Init initialises MPI

func InitThreadSafe

func InitThreadSafe() error

InitThreadSafe initialises MPI thread safe

func IsOn

func IsOn() bool

IsOn tells whether MPI is on or not

NOTE: this returns true even after Stop

func Printf

func Printf(fs string, pars ...any)

Printf does fmt.Printf only on the 0 rank node (see also AllPrintf to do all) and PrintAllProcs var to override for debugging, and print all

func Println

func Println(fs ...any)

Println does fmt.Println only on the 0 rank node (see also AllPrintln to do all) and PrintAllProcs var to override for debugging, and print all

func WorldRank

func WorldRank() (rank int)

WorldRank returns this proc's rank/ID within the World communicator. Returns 0 if not yet initialized, so it is always safe to call.

func WorldSize

func WorldSize() (size int)

WorldSize returns the number of procs in the World communicator. Returns 1 if not yet initialized, so it is always safe to call.

Types

type Comm

type Comm struct {
}

Comm is the MPI communicator -- all MPI communication operates as methods on this struct. It holds the MPI_Comm communicator and MPI_Group for sub-World group communication.

func NewComm

func NewComm(ranks []int) (*Comm, error)

NewComm creates a new communicator. if ranks is nil, communicator is for World (all active procs). otherwise, defined a group-level commuicator for given ranks.

func (*Comm) Abort

func (cm *Comm) Abort() error

Abort aborts MPI

func (*Comm) AllGatherC128

func (cm *Comm) AllGatherC128(dest, orig []complex128) error

AllGatherC128 gathers values from all procs into all procs, tiled by proc into dest of size np * len(orig). IMPORTANT: orig and dest must be different slices

func (*Comm) AllGatherC64

func (cm *Comm) AllGatherC64(dest, orig []complex64) error

AllGatherC64 gathers values from all procs into all procs, tiled by proc into dest of size np * len(orig). IMPORTANT: orig and dest must be different slices

func (*Comm) AllGatherF32

func (cm *Comm) AllGatherF32(dest, orig []float32) error

AllGatherF32 gathers values from all procs into all procs, tiled by proc into dest of size np * len(orig). IMPORTANT: orig and dest must be different slices

func (*Comm) AllGatherF64

func (cm *Comm) AllGatherF64(dest, orig []float64) error

AllGatherF64 gathers values from all procs into all procs, tiled by proc into dest of size np * len(orig). IMPORTANT: orig and dest must be different slices

func (*Comm) AllGatherI16

func (cm *Comm) AllGatherI16(dest, orig []int16) error

AllGatherI16 gathers values from all procs into all procs, tiled by proc into dest of size np * len(orig). IMPORTANT: orig and dest must be different slices

func (*Comm) AllGatherI32

func (cm *Comm) AllGatherI32(dest, orig []int32) error

AllGatherI32 gathers values from all procs into all procs, tiled by proc into dest of size np * len(orig). IMPORTANT: orig and dest must be different slices

func (*Comm) AllGatherI64

func (cm *Comm) AllGatherI64(dest, orig []int64) error

AllGatherI64 gathers values from all procs into all procs, tiled by proc into dest of size np * len(orig). IMPORTANT: orig and dest must be different slices

func (*Comm) AllGatherI8

func (cm *Comm) AllGatherI8(dest, orig []int8) error

AllGatherI8 gathers values from all procs into all procs, tiled by proc into dest of size np * len(orig). IMPORTANT: orig and dest must be different slices

func (*Comm) AllGatherInt

func (cm *Comm) AllGatherInt(dest, orig []int) error

AllGatherInt gathers values from all procs into all procs, tiled by proc into dest of size np * len(orig). IMPORTANT: orig and dest must be different slices

func (*Comm) AllGatherU16

func (cm *Comm) AllGatherU16(dest, orig []uint16) error

AllGatherU16 gathers values from all procs into all procs, tiled by proc into dest of size np * len(orig). IMPORTANT: orig and dest must be different slices

func (*Comm) AllGatherU32

func (cm *Comm) AllGatherU32(dest, orig []uint32) error

AllGatherU32 gathers values from all procs into all procs, tiled by proc into dest of size np * len(orig). IMPORTANT: orig and dest must be different slices

func (*Comm) AllGatherU64

func (cm *Comm) AllGatherU64(dest, orig []uint64) error

AllGatherU64 gathers values from all procs into all procs, tiled by proc into dest of size np * len(orig). IMPORTANT: orig and dest must be different slices

func (*Comm) AllGatherU8

func (cm *Comm) AllGatherU8(dest, orig []uint8) error

AllGatherU8 gathers values from all procs into all procs, tiled by proc into dest of size np * len(orig). IMPORTANT: orig and dest must be different slices

func (*Comm) AllReduceC128

func (cm *Comm) AllReduceC128(op Op, dest, orig []complex128) error

AllReduceC128 reduces all values across procs to all procs from orig into dest using given operation. IMPORTANT: orig and dest must be different slices

func (*Comm) AllReduceC64

func (cm *Comm) AllReduceC64(op Op, dest, orig []complex64) error

AllReduceC64 reduces all values across procs to all procs from orig into dest using given operation. IMPORTANT: orig and dest must be different slices

func (*Comm) AllReduceF32

func (cm *Comm) AllReduceF32(op Op, dest, orig []float32) error

AllReduceF32 reduces all values across procs to all procs from orig into dest using given operation. IMPORTANT: orig and dest must be different slices

func (*Comm) AllReduceF64

func (cm *Comm) AllReduceF64(op Op, dest, orig []float64) error

AllReduceF64 reduces all values across procs to all procs from orig into dest using given operation. IMPORTANT: orig and dest must be different slices

func (*Comm) AllReduceI16

func (cm *Comm) AllReduceI16(op Op, dest, orig []int16) error

AllReduceI16 reduces all values across procs to all procs from orig into dest using given operation. IMPORTANT: orig and dest must be different slices

func (*Comm) AllReduceI32

func (cm *Comm) AllReduceI32(op Op, dest, orig []int32) error

AllReduceI32 reduces all values across procs to all procs from orig into dest using given operation. IMPORTANT: orig and dest must be different slices

func (*Comm) AllReduceI64

func (cm *Comm) AllReduceI64(op Op, dest, orig []int64) error

AllReduceI64 reduces all values across procs to all procs from orig into dest using given operation. IMPORTANT: orig and dest must be different slices

func (*Comm) AllReduceI8

func (cm *Comm) AllReduceI8(op Op, dest, orig []int8) error

AllReduceI8 reduces all values across procs to all procs from orig into dest using given operation. IMPORTANT: orig and dest must be different slices

func (*Comm) AllReduceInt

func (cm *Comm) AllReduceInt(op Op, dest, orig []int) error

AllReduceInt reduces all values across procs to all procs from orig into dest using given operation. IMPORTANT: orig and dest must be different slices

func (*Comm) AllReduceU16

func (cm *Comm) AllReduceU16(op Op, dest, orig []uint16) error

AllReduceU16 reduces all values across procs to all procs from orig into dest using given operation. IMPORTANT: orig and dest must be different slices

func (*Comm) AllReduceU32

func (cm *Comm) AllReduceU32(op Op, dest, orig []uint32) error

AllReduceU32 reduces all values across procs to all procs from orig into dest using given operation. IMPORTANT: orig and dest must be different slices

func (*Comm) AllReduceU64

func (cm *Comm) AllReduceU64(op Op, dest, orig []uint64) error

AllReduceU64 reduces all values across procs to all procs from orig into dest using given operation. IMPORTANT: orig and dest must be different slices

func (*Comm) AllReduceU8

func (cm *Comm) AllReduceU8(op Op, dest, orig []uint8) error

AllReduceU8 reduces all values across procs to all procs from orig into dest using given operation. IMPORTANT: orig and dest must be different slices

func (*Comm) Barrier

func (cm *Comm) Barrier() error

Barrier forces synchronisation

func (*Comm) BcastC128

func (cm *Comm) BcastC128(fmProc int, vals []complex128) error

BcastC128 broadcasts slice from fmProc to all other procs. All nodes have the same vals after this call, copied from fmProc.

func (*Comm) BcastC64

func (cm *Comm) BcastC64(fmProc int, vals []complex64) error

BcastC64 broadcasts slice from fmProc to all other procs. All nodes have the same vals after this call, copied from fmProc.

func (*Comm) BcastF32

func (cm *Comm) BcastF32(fmProc int, vals []float32) error

BcastF32 broadcasts slice from fmProc to all other procs. All nodes have the same vals after this call, copied from fmProc.

func (*Comm) BcastF64

func (cm *Comm) BcastF64(fmProc int, vals []float64) error

BcastF64 broadcasts slice from fmProc to all other procs. All nodes have the same vals after this call, copied from fmProc.

func (*Comm) BcastI16

func (cm *Comm) BcastI16(fmProc int, vals []int16) error

BcastI16 broadcasts slice from fmProc to all other procs. All nodes have the same vals after this call, copied from fmProc.

func (*Comm) BcastI32

func (cm *Comm) BcastI32(fmProc int, vals []int32) error

BcastI32 broadcasts slice from fmProc to all other procs. All nodes have the same vals after this call, copied from fmProc.

func (*Comm) BcastI64

func (cm *Comm) BcastI64(fmProc int, vals []int64) error

BcastI64 broadcasts slice from fmProc to all other procs. All nodes have the same vals after this call, copied from fmProc.

func (*Comm) BcastI8

func (cm *Comm) BcastI8(fmProc int, vals []int8) error

BcastI8 broadcasts slice from fmProc to all other procs. All nodes have the same vals after this call, copied from fmProc.

func (*Comm) BcastInt

func (cm *Comm) BcastInt(fmProc int, vals []int) error

BcastInt broadcasts slice from fmProc to all other procs. All nodes have the same vals after this call, copied from fmProc.

func (*Comm) BcastU16

func (cm *Comm) BcastU16(fmProc int, vals []uint16) error

BcastU16 broadcasts slice from fmProc to all other procs. All nodes have the same vals after this call, copied from fmProc.

func (*Comm) BcastU32

func (cm *Comm) BcastU32(fmProc int, vals []uint32) error

BcastU32 broadcasts slice from fmProc to all other procs. All nodes have the same vals after this call, copied from fmProc.

func (*Comm) BcastU64

func (cm *Comm) BcastU64(fmProc int, vals []uint64) error

BcastU64 broadcasts slice from fmProc to all other procs. All nodes have the same vals after this call, copied from fmProc.

func (*Comm) BcastU8

func (cm *Comm) BcastU8(fmProc int, vals []uint8) error

BcastU8 broadcasts slice from fmProc to all other procs. All nodes have the same vals after this call, copied from fmProc.

func (*Comm) GatherC128

func (cm *Comm) GatherC128(toProc int, dest, orig []complex128) error

GatherC128 gathers values from all procs into toProc proc, tiled into dest of size np * len(orig). This is inverse of Scatter. IMPORTANT: orig and dest must be different slices.

func (*Comm) GatherC64

func (cm *Comm) GatherC64(toProc int, dest, orig []complex64) error

GatherC64 gathers values from all procs into toProc proc, tiled into dest of size np * len(orig). This is inverse of Scatter. IMPORTANT: orig and dest must be different slices.

func (*Comm) GatherF32

func (cm *Comm) GatherF32(toProc int, dest, orig []float32) error

GatherF32 gathers values from all procs into toProc proc, tiled into dest of size np * len(orig). This is inverse of Scatter. IMPORTANT: orig and dest must be different slices.

func (*Comm) GatherF64

func (cm *Comm) GatherF64(toProc int, dest, orig []float64) error

GatherF64 gathers values from all procs into toProc proc, tiled into dest of size np * len(orig). This is inverse of Scatter. IMPORTANT: orig and dest must be different slices.

func (*Comm) GatherI16

func (cm *Comm) GatherI16(toProc int, dest, orig []int16) error

GatherI16 gathers values from all procs into toProc proc, tiled into dest of size np * len(orig). This is inverse of Scatter. IMPORTANT: orig and dest must be different slices.

func (*Comm) GatherI32

func (cm *Comm) GatherI32(toProc int, dest, orig []int32) error

GatherI32 gathers values from all procs into toProc proc, tiled into dest of size np * len(orig). This is inverse of Scatter. IMPORTANT: orig and dest must be different slices.

func (*Comm) GatherI64

func (cm *Comm) GatherI64(toProc int, dest, orig []int64) error

GatherI64 gathers values from all procs into toProc proc, tiled into dest of size np * len(orig). This is inverse of Scatter. IMPORTANT: orig and dest must be different slices.

func (*Comm) GatherI8

func (cm *Comm) GatherI8(toProc int, dest, orig []int8) error

GatherI8 gathers values from all procs into toProc proc, tiled into dest of size np * len(orig). This is inverse of Scatter. IMPORTANT: orig and dest must be different slices.

func (*Comm) GatherInt

func (cm *Comm) GatherInt(toProc int, dest, orig []int) error

GatherInt gathers values from all procs into toProc proc, tiled into dest of size np * len(orig). This is inverse of Scatter. IMPORTANT: orig and dest must be different slices.

func (*Comm) GatherU16

func (cm *Comm) GatherU16(toProc int, dest, orig []uint16) error

GatherU16 gathers values from all procs into toProc proc, tiled into dest of size np * len(orig). This is inverse of Scatter. IMPORTANT: orig and dest must be different slices.

func (*Comm) GatherU32

func (cm *Comm) GatherU32(toProc int, dest, orig []uint32) error

GatherU32 gathers values from all procs into toProc proc, tiled into dest of size np * len(orig). This is inverse of Scatter. IMPORTANT: orig and dest must be different slices.

func (*Comm) GatherU64

func (cm *Comm) GatherU64(toProc int, dest, orig []uint64) error

GatherU64 gathers values from all procs into toProc proc, tiled into dest of size np * len(orig). This is inverse of Scatter. IMPORTANT: orig and dest must be different slices.

func (*Comm) GatherU8

func (cm *Comm) GatherU8(toProc int, dest, orig []uint8) error

GatherU8 gathers values from all procs into toProc proc, tiled into dest of size np * len(orig). This is inverse of Scatter. IMPORTANT: orig and dest must be different slices.

func (*Comm) Rank

func (cm *Comm) Rank() (rank int)

Rank returns the rank/ID for this proc

func (*Comm) RecvC128

func (cm *Comm) RecvC128(fmProc int, tag int, vals []complex128) error

Recv64C128 receives values from proc fmProc, using given unique tag identifier This is Blocking. Must have a corresponding Send call with same tag on fmProc, to this proc

func (*Comm) RecvC64

func (cm *Comm) RecvC64(fmProc int, tag int, vals []complex64) error

Recv64C64 receives values from proc fmProc, using given unique tag identifier This is Blocking. Must have a corresponding Send call with same tag on fmProc, to this proc

func (*Comm) RecvF32

func (cm *Comm) RecvF32(fmProc int, tag int, vals []float32) error

Recv64F32 receives values from proc fmProc, using given unique tag identifier This is Blocking. Must have a corresponding Send call with same tag on fmProc, to this proc

func (*Comm) RecvF64

func (cm *Comm) RecvF64(fmProc int, tag int, vals []float64) error

Recv64F64 receives values from proc fmProc, using given unique tag identifier This is Blocking. Must have a corresponding Send call with same tag on fmProc, to this proc

func (*Comm) RecvI16

func (cm *Comm) RecvI16(fmProc int, tag int, vals []int16) error

Recv64I16 receives values from proc fmProc, using given unique tag identifier This is Blocking. Must have a corresponding Send call with same tag on fmProc, to this proc

func (*Comm) RecvI32

func (cm *Comm) RecvI32(fmProc int, tag int, vals []int32) error

Recv64I32 receives values from proc fmProc, using given unique tag identifier This is Blocking. Must have a corresponding Send call with same tag on fmProc, to this proc

func (*Comm) RecvI64

func (cm *Comm) RecvI64(fmProc int, tag int, vals []int64) error

Recv64I64 receives values from proc fmProc, using given unique tag identifier This is Blocking. Must have a corresponding Send call with same tag on fmProc, to this proc

func (*Comm) RecvI8

func (cm *Comm) RecvI8(fmProc int, tag int, vals []int8) error

Recv64I8 receives values from proc fmProc, using given unique tag identifier This is Blocking. Must have a corresponding Send call with same tag on fmProc, to this proc

func (*Comm) RecvInt

func (cm *Comm) RecvInt(fmProc int, tag int, vals []int) error

Recv64Int receives values from proc fmProc, using given unique tag identifier This is Blocking. Must have a corresponding Send call with same tag on fmProc, to this proc

func (*Comm) RecvU16

func (cm *Comm) RecvU16(fmProc int, tag int, vals []uint16) error

Recv64U16 receives values from proc fmProc, using given unique tag identifier This is Blocking. Must have a corresponding Send call with same tag on fmProc, to this proc

func (*Comm) RecvU32

func (cm *Comm) RecvU32(fmProc int, tag int, vals []uint32) error

Recv64U32 receives values from proc fmProc, using given unique tag identifier This is Blocking. Must have a corresponding Send call with same tag on fmProc, to this proc

func (*Comm) RecvU64

func (cm *Comm) RecvU64(fmProc int, tag int, vals []uint64) error

Recv64U64 receives values from proc fmProc, using given unique tag identifier This is Blocking. Must have a corresponding Send call with same tag on fmProc, to this proc

func (*Comm) RecvU8

func (cm *Comm) RecvU8(fmProc int, tag int, vals []uint8) error

Recv64U8 receives values from proc fmProc, using given unique tag identifier This is Blocking. Must have a corresponding Send call with same tag on fmProc, to this proc

func (*Comm) ReduceC128

func (cm *Comm) ReduceC128(toProc int, op Op, dest, orig []complex128) error

ReduceC128 reduces all values across procs to toProc in orig to dest using given operation. IMPORTANT: orig and dest must be different slices

func (*Comm) ReduceC64

func (cm *Comm) ReduceC64(toProc int, op Op, dest, orig []complex64) error

ReduceC64 reduces all values across procs to toProc in orig to dest using given operation. IMPORTANT: orig and dest must be different slices

func (*Comm) ReduceF32

func (cm *Comm) ReduceF32(toProc int, op Op, dest, orig []float32) error

ReduceF32 reduces all values across procs to toProc in orig to dest using given operation. IMPORTANT: orig and dest must be different slices

func (*Comm) ReduceF64

func (cm *Comm) ReduceF64(toProc int, op Op, dest, orig []float64) error

ReduceF64 reduces all values across procs to toProc in orig to dest using given operation. IMPORTANT: orig and dest must be different slices

func (*Comm) ReduceI16

func (cm *Comm) ReduceI16(toProc int, op Op, dest, orig []int16) error

ReduceI16 reduces all values across procs to toProc in orig to dest using given operation. IMPORTANT: orig and dest must be different slices

func (*Comm) ReduceI32

func (cm *Comm) ReduceI32(toProc int, op Op, dest, orig []int32) error

ReduceI32 reduces all values across procs to toProc in orig to dest using given operation. IMPORTANT: orig and dest must be different slices

func (*Comm) ReduceI64

func (cm *Comm) ReduceI64(toProc int, op Op, dest, orig []int64) error

ReduceI64 reduces all values across procs to toProc in orig to dest using given operation. IMPORTANT: orig and dest must be different slices

func (*Comm) ReduceI8

func (cm *Comm) ReduceI8(toProc int, op Op, dest, orig []int8) error

ReduceI8 reduces all values across procs to toProc in orig to dest using given operation. IMPORTANT: orig and dest must be different slices

func (*Comm) ReduceInt

func (cm *Comm) ReduceInt(toProc int, op Op, dest, orig []int) error

ReduceInt reduces all values across procs to toProc in orig to dest using given operation. IMPORTANT: orig and dest must be different slices

func (*Comm) ReduceU16

func (cm *Comm) ReduceU16(toProc int, op Op, dest, orig []uint16) error

ReduceU16 reduces all values across procs to toProc in orig to dest using given operation. IMPORTANT: orig and dest must be different slices

func (*Comm) ReduceU32

func (cm *Comm) ReduceU32(toProc int, op Op, dest, orig []uint32) error

ReduceU32 reduces all values across procs to toProc in orig to dest using given operation. IMPORTANT: orig and dest must be different slices

func (*Comm) ReduceU64

func (cm *Comm) ReduceU64(toProc int, op Op, dest, orig []uint64) error

ReduceU64 reduces all values across procs to toProc in orig to dest using given operation. IMPORTANT: orig and dest must be different slices

func (*Comm) ReduceU8

func (cm *Comm) ReduceU8(toProc int, op Op, dest, orig []uint8) error

ReduceU8 reduces all values across procs to toProc in orig to dest using given operation. IMPORTANT: orig and dest must be different slices

func (*Comm) ScatterC128

func (cm *Comm) ScatterC128(fmProc int, dest, orig []complex128) error

ScatterC128 scatters values from fmProc to all procs, distributing len(dest) size chunks to each proc from orig slice, which must be of size np * len(dest). This is inverse of Gather. IMPORTANT: orig and dest must be different slices

func (*Comm) ScatterC64

func (cm *Comm) ScatterC64(fmProc int, dest, orig []complex64) error

ScatterC64 scatters values from fmProc to all procs, distributing len(dest) size chunks to each proc from orig slice, which must be of size np * len(dest). This is inverse of Gather. IMPORTANT: orig and dest must be different slices

func (*Comm) ScatterF32

func (cm *Comm) ScatterF32(fmProc int, dest, orig []float32) error

ScatterF32 scatters values from fmProc to all procs, distributing len(dest) size chunks to each proc from orig slice, which must be of size np * len(dest). This is inverse of Gather. IMPORTANT: orig and dest must be different slices

func (*Comm) ScatterF64

func (cm *Comm) ScatterF64(fmProc int, dest, orig []float64) error

ScatterF64 scatters values from fmProc to all procs, distributing len(dest) size chunks to each proc from orig slice, which must be of size np * len(dest). This is inverse of Gather. IMPORTANT: orig and dest must be different slices

func (*Comm) ScatterI16

func (cm *Comm) ScatterI16(fmProc int, dest, orig []int16) error

ScatterI16 scatters values from fmProc to all procs, distributing len(dest) size chunks to each proc from orig slice, which must be of size np * len(dest). This is inverse of Gather. IMPORTANT: orig and dest must be different slices

func (*Comm) ScatterI32

func (cm *Comm) ScatterI32(fmProc int, dest, orig []int32) error

ScatterI32 scatters values from fmProc to all procs, distributing len(dest) size chunks to each proc from orig slice, which must be of size np * len(dest). This is inverse of Gather. IMPORTANT: orig and dest must be different slices

func (*Comm) ScatterI64

func (cm *Comm) ScatterI64(fmProc int, dest, orig []int64) error

ScatterI64 scatters values from fmProc to all procs, distributing len(dest) size chunks to each proc from orig slice, which must be of size np * len(dest). This is inverse of Gather. IMPORTANT: orig and dest must be different slices

func (*Comm) ScatterI8

func (cm *Comm) ScatterI8(fmProc int, dest, orig []int8) error

ScatterI8 scatters values from fmProc to all procs, distributing len(dest) size chunks to each proc from orig slice, which must be of size np * len(dest). This is inverse of Gather. IMPORTANT: orig and dest must be different slices

func (*Comm) ScatterInt

func (cm *Comm) ScatterInt(fmProc int, dest, orig []int) error

ScatterInt scatters values from fmProc to all procs, distributing len(dest) size chunks to each proc from orig slice, which must be of size np * len(dest). This is inverse of Gather. IMPORTANT: orig and dest must be different slices

func (*Comm) ScatterU16

func (cm *Comm) ScatterU16(fmProc int, dest, orig []uint16) error

ScatterU16 scatters values from fmProc to all procs, distributing len(dest) size chunks to each proc from orig slice, which must be of size np * len(dest). This is inverse of Gather. IMPORTANT: orig and dest must be different slices

func (*Comm) ScatterU32

func (cm *Comm) ScatterU32(fmProc int, dest, orig []uint32) error

ScatterU32 scatters values from fmProc to all procs, distributing len(dest) size chunks to each proc from orig slice, which must be of size np * len(dest). This is inverse of Gather. IMPORTANT: orig and dest must be different slices

func (*Comm) ScatterU64

func (cm *Comm) ScatterU64(fmProc int, dest, orig []uint64) error

ScatterU64 scatters values from fmProc to all procs, distributing len(dest) size chunks to each proc from orig slice, which must be of size np * len(dest). This is inverse of Gather. IMPORTANT: orig and dest must be different slices

func (*Comm) ScatterU8

func (cm *Comm) ScatterU8(fmProc int, dest, orig []uint8) error

ScatterU8 scatters values from fmProc to all procs, distributing len(dest) size chunks to each proc from orig slice, which must be of size np * len(dest). This is inverse of Gather. IMPORTANT: orig and dest must be different slices

func (*Comm) SendC128

func (cm *Comm) SendC128(toProc int, tag int, vals []complex128) error

SendC128 sends values to toProc, using given unique tag identifier. This is Blocking. Must have a corresponding Recv call with same tag on toProc, from this proc

func (*Comm) SendC64

func (cm *Comm) SendC64(toProc int, tag int, vals []complex64) error

SendC64 sends values to toProc, using given unique tag identifier. This is Blocking. Must have a corresponding Recv call with same tag on toProc, from this proc

func (*Comm) SendF32

func (cm *Comm) SendF32(toProc int, tag int, vals []float32) error

SendF32 sends values to toProc, using given unique tag identifier. This is Blocking. Must have a corresponding Recv call with same tag on toProc, from this proc

func (*Comm) SendF64

func (cm *Comm) SendF64(toProc int, tag int, vals []float64) error

SendF64 sends values to toProc, using given unique tag identifier. This is Blocking. Must have a corresponding Recv call with same tag on toProc, from this proc

func (*Comm) SendI16

func (cm *Comm) SendI16(toProc int, tag int, vals []int16) error

SendI16 sends values to toProc, using given unique tag identifier. This is Blocking. Must have a corresponding Recv call with same tag on toProc, from this proc

func (*Comm) SendI32

func (cm *Comm) SendI32(toProc int, tag int, vals []int32) error

SendI32 sends values to toProc, using given unique tag identifier. This is Blocking. Must have a corresponding Recv call with same tag on toProc, from this proc

func (*Comm) SendI64

func (cm *Comm) SendI64(toProc int, tag int, vals []int64) error

SendI64 sends values to toProc, using given unique tag identifier. This is Blocking. Must have a corresponding Recv call with same tag on toProc, from this proc

func (*Comm) SendI8

func (cm *Comm) SendI8(toProc int, tag int, vals []int8) error

SendI8 sends values to toProc, using given unique tag identifier. This is Blocking. Must have a corresponding Recv call with same tag on toProc, from this proc

func (*Comm) SendInt

func (cm *Comm) SendInt(toProc int, tag int, vals []int) error

SendInt sends values to toProc, using given unique tag identifier. This is Blocking. Must have a corresponding Recv call with same tag on toProc, from this proc

func (*Comm) SendU16

func (cm *Comm) SendU16(toProc int, tag int, vals []uint16) error

SendU16 sends values to toProc, using given unique tag identifier. This is Blocking. Must have a corresponding Recv call with same tag on toProc, from this proc

func (*Comm) SendU32

func (cm *Comm) SendU32(toProc int, tag int, vals []uint32) error

SendU32 sends values to toProc, using given unique tag identifier. This is Blocking. Must have a corresponding Recv call with same tag on toProc, from this proc

func (*Comm) SendU64

func (cm *Comm) SendU64(toProc int, tag int, vals []uint64) error

SendU64 sends values to toProc, using given unique tag identifier. This is Blocking. Must have a corresponding Recv call with same tag on toProc, from this proc

func (*Comm) SendU8

func (cm *Comm) SendU8(toProc int, tag int, vals []uint8) error

SendU8 sends values to toProc, using given unique tag identifier. This is Blocking. Must have a corresponding Recv call with same tag on toProc, from this proc

func (*Comm) Size

func (cm *Comm) Size() (size int)

Size returns the number of procs in this communicator

type Op

type Op int

Op is an aggregation operation: Sum, Min, Max, etc

const (
	OpSum Op = iota
	OpMax
	OpMin
	OpProd
	OpLAND // logical AND
	OpLOR  // logical OR
	OpBAND // bitwise AND
	OpBOR  // bitwise OR
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL