mpi

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: BSD-3-Clause Imports: 3 Imported by: 0

README

Gosl. mpi. Message Passing Interface for parallel computing

go.dev reference

More information is available in the documentation of this package.

The mpi package is a light wrapper to the OpenMPI C++ library designed to develop algorithms for parallel computing.

This package allows parallel computations over the network.

Documentation

Overview

Package mpi wraps the Message Passing Interface for parallel computations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsOn

func IsOn() bool

IsOn tells whether MPI is on or not

NOTE: this returns true even after Stop

func Start

func Start()

Start initialises MPI

func StartThreadSafe added in v1.1.2

func StartThreadSafe() error

StartThreadSafe initialises MPI thread safe

func Stop

func Stop()

Stop finalises MPI

func WorldRank added in v1.0.1

func WorldRank() (rank int)

WorldRank returns the processor rank/ID within the World communicator

func WorldSize added in v1.0.1

func WorldSize() (size int)

WorldSize returns the number of processors in the World communicator

Types

type Communicator added in v1.0.1

type Communicator struct {
	// contains filtered or unexported fields
}

Communicator holds the World communicator or a subset communicator

func NewCommunicator added in v1.0.1

func NewCommunicator(ranks []int) (o *Communicator)

NewCommunicator creates a new communicator or returns the World communicator

ranks -- World indices of processors in this Communicator.
         use nil or empty to get the World Communicator

func (*Communicator) Abort added in v1.0.1

func (o *Communicator) Abort()

Abort aborts MPI

func (*Communicator) AllReduceMax added in v1.0.1

func (o *Communicator) AllReduceMax(dest, orig []float64)

AllReduceMax combines all values from orig into dest picking minimum values

NOTE (important): orig and dest must be different slices

func (*Communicator) AllReduceMaxI added in v1.0.1

func (o *Communicator) AllReduceMaxI(dest, orig []int)

AllReduceMaxI combines all values from orig into dest picking minimum values (integer version)

NOTE (important): orig and dest must be different slices

func (*Communicator) AllReduceMin added in v1.0.1

func (o *Communicator) AllReduceMin(dest, orig []float64)

AllReduceMin combines all values from orig into dest picking minimum values

NOTE (important): orig and dest must be different slices

func (*Communicator) AllReduceMinI added in v1.0.1

func (o *Communicator) AllReduceMinI(dest, orig []int)

AllReduceMinI combines all values from orig into dest picking minimum values (integer version)

NOTE (important): orig and dest must be different slices

func (*Communicator) AllReduceSum added in v1.0.1

func (o *Communicator) AllReduceSum(dest, orig []float64)

AllReduceSum combines all values from orig into dest summing values

NOTE (important): orig and dest must be different slices

func (*Communicator) AllReduceSumC added in v1.0.1

func (o *Communicator) AllReduceSumC(dest, orig []complex128)

AllReduceSumC combines all values from orig into dest summing values (complex version)

NOTE (important): orig and dest must be different slices

func (*Communicator) Barrier added in v1.0.1

func (o *Communicator) Barrier()

Barrier forces synchronisation

func (*Communicator) BcastFromRoot added in v1.0.1

func (o *Communicator) BcastFromRoot(x []float64)

BcastFromRoot broadcasts slice from root (Rank == 0) to all other processors

func (*Communicator) BcastFromRootC added in v1.0.1

func (o *Communicator) BcastFromRootC(x []complex128)

BcastFromRootC broadcasts slice from root (Rank == 0) to all other processors (complex version)

func (*Communicator) Rank added in v1.0.1

func (o *Communicator) Rank() (rank int)

Rank returns the processor rank/ID

func (*Communicator) Recv added in v1.0.1

func (o *Communicator) Recv(vals []float64, fromID int)

Recv receives values from processor fromId

func (*Communicator) RecvC added in v1.0.1

func (o *Communicator) RecvC(vals []complex128, fromID int)

RecvC receives values from processor fromId (complex version)

func (*Communicator) RecvI added in v1.0.1

func (o *Communicator) RecvI(vals []int, fromID int)

RecvI receives values from processor fromId (integer version)

func (*Communicator) RecvOne added in v1.0.1

func (o *Communicator) RecvOne(fromID int) (val float64)

RecvOne receives one value from processor fromId

func (*Communicator) RecvOneI added in v1.0.1

func (o *Communicator) RecvOneI(fromID int) (val int)

RecvOneI receives one value from processor fromId (integer version)

func (*Communicator) ReduceSum added in v1.0.1

func (o *Communicator) ReduceSum(dest, orig []float64)

ReduceSum sums all values in 'orig' to 'dest' in root (Rank == 0) processor

NOTE (important): orig and dest must be different slices

func (*Communicator) ReduceSumC added in v1.0.1

func (o *Communicator) ReduceSumC(dest, orig []complex128)

ReduceSumC sums all values in 'orig' to 'dest' in root (Rank == 0) processor (complex version)

NOTE (important): orig and dest must be different slices

func (*Communicator) Send added in v1.0.1

func (o *Communicator) Send(vals []float64, toID int)

Send sends values to processor toID

func (*Communicator) SendC added in v1.0.1

func (o *Communicator) SendC(vals []complex128, toID int)

SendC sends values to processor toID (complex version)

func (*Communicator) SendI added in v1.0.1

func (o *Communicator) SendI(vals []int, toID int)

SendI sends values to processor toID (integer version)

func (*Communicator) SendOne added in v1.0.1

func (o *Communicator) SendOne(val float64, toID int)

SendOne sends one value to processor toID

func (*Communicator) SendOneI added in v1.0.1

func (o *Communicator) SendOneI(val int, toID int)

SendOneI sends one value to processor toID (integer version)

func (*Communicator) Size added in v1.0.1

func (o *Communicator) Size() (size int)

Size returns the number of processors

Jump to

Keyboard shortcuts

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