mpi

package
v0.0.0-...-885514b Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SelfRank              uint64
	MasterToSlaveTCPConn  []*net.Conn
	SlaveToMasterTCPConn  *net.Conn
	MasterToSlaveListener []*net.Listener
	SlaveOutputs          []bytes.Buffer
	SlaveOutputsErr       []bytes.Buffer
	BytesSent             uint64
	BytesReceived         uint64
	WorldSize             uint64
)

Functions

func Close

func Close()

func GetHash

func GetHash(str string)

func GetLocalIP

func GetLocalIP() ([]string, error)

func ParseConfig

func ParseConfig(ConfigFilePath string) config

func ReceiveBytes

func ReceiveBytes(size uint64, rank uint64) ([]byte, error)

If Master calls this function, rank is required, it will receive from rank-th slave If Slave calls this function, rank is not required, it will receive from Master

func SendBytes

func SendBytes(buf []byte, rank uint64) error

func SerializeWorld

func SerializeWorld(world *MPIWorld) []byte

func SetIPPool

func SetIPPool(filePath string, world *MPIWorld) error

Types

type MPIWorld

type MPIWorld struct {
	IPPool []string
	Port   []uint64
	// contains filtered or unexported fields
}

func DeserializeWorld

func DeserializeWorld(buf []byte) *MPIWorld

func WorldInit

func WorldInit(HostFilePath string, ConfigFilePath string) *MPIWorld

Jump to

Keyboard shortcuts

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