FreeNOS
Data Structures | Typedefs
libmpi

MPI (Message Passing Interface) is a standard communication interface for parallel programming. More...

Data Structures

class  MpiBackend
 Represents a Message Passing Interface (MPI) implementation backend. More...
 
class  MpiHost
 Implements a MPI backend for the host OS which communicates with mpiproxy servers. More...
 
struct  MPIMessage
 
class  MpiTarget
 Implements a Message Passing Interface (MPI) for communication between local cores. More...
 

Typedefs

typedef struct MPIMessage MPIMessage
 

Defined Constants

enum  MPI_Datatype {
  MPI_CHAR = 0 , MPI_SHORT , MPI_LONG , MPI_INT ,
  MPI_UNSIGNED_CHAR , MPI_UNSIGNED_SHORT , MPI_UNSIGNED , MPI_UNSIGNED_LONG
}
 Named Predefined Datatypes. More...
 
enum  { MPI_COMM_WORLD = 0 , MPI_COMM_SELF }
 Reserved communicators. More...
 
enum  {
  MPI_SUCCESS = 0 , MPI_ERR_BUFFER , MPI_ERR_COUNT , MPI_ERR_TYPE ,
  MPI_ERR_TAG , MPI_ERR_COMM , MPI_ERR_RANK , MPI_ERR_REQUEST ,
  MPI_ERR_ROOT , MPI_ERR_GROUP , MPI_ERR_OP , MPI_ERR_TOPOLOGY ,
  MPI_ERR_DIMS , MPI_ERR_ARG , MPI_ERR_UNKNOWN , MPI_ERR_TRUNCATE ,
  MPI_ERR_OTHER , MPI_ERR_INTERN , MPI_ERR_PENDING , MPI_ERR_IN_STATUS ,
  MPI_ERR_ACCESS , MPI_ERR_AMODE , MPI_ERR_ASSERT , MPI_ERR_BAD_FILE ,
  MPI_ERR_BASE , MPI_ERR_CONVERSION , MPI_ERR_DISP , MPI_ERR_DUP_DATAREP ,
  MPI_ERR_FILE_EXISTS , MPI_ERR_FILE_IN_USE , MPI_ERR_FILE , MPI_ERR_INFO_KEY ,
  MPI_ERR_INFO_NOKEY , MPI_ERR_INFO_VALUE , MPI_ERR_INFO , MPI_ERR_IO ,
  MPI_ERR_KEYVAL , MPI_ERR_LOCKTYPE , MPI_ERR_NAME , MPI_ERR_NO_MEM ,
  MPI_ERR_NOT_SAME , MPI_ERR_NO_SPACE , MPI_ERR_NO_SUCH_FILE , MPI_ERR_PORT ,
  MPI_ERR_QUOTA , MPI_ERR_READ_ONLY , MPI_ERR_RMA_ATTACH , MPI_ERR_RMA_CONFLICT ,
  MPI_ERR_RMA_RANGE , MPI_ERR_RMA_SHARED , MPI_ERR_RMA_SYNC , MPI_ERR_RMA_FLAVOR ,
  MPI_ERR_SERVICE , MPI_ERR_SIZE , MPI_ERR_SPAWN , MPI_ERR_UNSUPPORTED_DATAREP ,
  MPI_ERR_UNSUPPORTED_OPERATION , MPI_ERR_WIN , MPI_T_ERR_CANNOT_INIT , MPI_T_ERR_NOT_INITIALIZED ,
  MPI_T_ERR_MEMORY , MPI_T_ERR_INVALID , MPI_T_ERR_INVALID_INDEX , MPI_T_ERR_INVALID_ITEM ,
  MPI_T_ERR_INVALID_SESSION , MPI_T_ERR_INVALID_HANDLE , MPI_T_ERR_INVALID_NAME , MPI_T_ERR_OUT_OF_HANDLES ,
  MPI_T_ERR_OUT_OF_SESSIONS , MPI_T_ERR_CVAR_SET_NOT_NOW , MPI_T_ERR_CVAR_SET_NEVER , MPI_T_ERR_PVAR_NO_WRITE ,
  MPI_T_ERR_PVAR_NO_STARTSTOP , MPI_T_ERR_PVAR_NO_ATOMIC , MPI_ERR_LASTCODE
}
 MPI Error Codes. More...
 
typedef uint MPI_Comm
 Communicator identifier.
 
typedef uint MPI_Status
 Status holder.
 

Environmental Management

C int MPI_Init (int *argc, char ***argv)
 
C int MPI_Finalize (void)
 

Communicator Contexts

C int MPI_Comm_rank (MPI_Comm comm, int *rank)
 
C int MPI_Comm_size (MPI_Comm comm, int *size)
 

Point-to-Point Communication

Todo:
MPI_Scatter, MPI_Gather not yet supported.
C int MPI_Send (const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm)
 
C int MPI_Recv (void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status *status)
 

Detailed Description

MPI (Message Passing Interface) is a standard communication interface for parallel programming.

Typedef Documentation

◆ MPI_Comm

typedef uint MPI_Comm

Communicator identifier.

Definition at line 38 of file mpi.h.

◆ MPI_Status

typedef uint MPI_Status

Status holder.

Definition at line 41 of file mpi.h.

◆ MPIMessage

typedef struct MPIMessage MPIMessage

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Reserved communicators.

Enumerator
MPI_COMM_WORLD 
MPI_COMM_SELF 

Definition at line 62 of file mpi.h.

◆ anonymous enum

anonymous enum

MPI Error Codes.

Enumerator
MPI_SUCCESS 
MPI_ERR_BUFFER 
MPI_ERR_COUNT 
MPI_ERR_TYPE 
MPI_ERR_TAG 
MPI_ERR_COMM 
MPI_ERR_RANK 
MPI_ERR_REQUEST 
MPI_ERR_ROOT 
MPI_ERR_GROUP 
MPI_ERR_OP 
MPI_ERR_TOPOLOGY 
MPI_ERR_DIMS 
MPI_ERR_ARG 
MPI_ERR_UNKNOWN 
MPI_ERR_TRUNCATE 
MPI_ERR_OTHER 
MPI_ERR_INTERN 
MPI_ERR_PENDING 
MPI_ERR_IN_STATUS 
MPI_ERR_ACCESS 
MPI_ERR_AMODE 
MPI_ERR_ASSERT 
MPI_ERR_BAD_FILE 
MPI_ERR_BASE 
MPI_ERR_CONVERSION 
MPI_ERR_DISP 
MPI_ERR_DUP_DATAREP 
MPI_ERR_FILE_EXISTS 
MPI_ERR_FILE_IN_USE 
MPI_ERR_FILE 
MPI_ERR_INFO_KEY 
MPI_ERR_INFO_NOKEY 
MPI_ERR_INFO_VALUE 
MPI_ERR_INFO 
MPI_ERR_IO 
MPI_ERR_KEYVAL 
MPI_ERR_LOCKTYPE 
MPI_ERR_NAME 
MPI_ERR_NO_MEM 
MPI_ERR_NOT_SAME 
MPI_ERR_NO_SPACE 
MPI_ERR_NO_SUCH_FILE 
MPI_ERR_PORT 
MPI_ERR_QUOTA 
MPI_ERR_READ_ONLY 
MPI_ERR_RMA_ATTACH 
MPI_ERR_RMA_CONFLICT 
MPI_ERR_RMA_RANGE 
MPI_ERR_RMA_SHARED 
MPI_ERR_RMA_SYNC 
MPI_ERR_RMA_FLAVOR 
MPI_ERR_SERVICE 
MPI_ERR_SIZE 
MPI_ERR_SPAWN 
MPI_ERR_UNSUPPORTED_DATAREP 
MPI_ERR_UNSUPPORTED_OPERATION 
MPI_ERR_WIN 
MPI_T_ERR_CANNOT_INIT 
MPI_T_ERR_NOT_INITIALIZED 
MPI_T_ERR_MEMORY 
MPI_T_ERR_INVALID 
MPI_T_ERR_INVALID_INDEX 
MPI_T_ERR_INVALID_ITEM 
MPI_T_ERR_INVALID_SESSION 
MPI_T_ERR_INVALID_HANDLE 
MPI_T_ERR_INVALID_NAME 
MPI_T_ERR_OUT_OF_HANDLES 
MPI_T_ERR_OUT_OF_SESSIONS 
MPI_T_ERR_CVAR_SET_NOT_NOW 
MPI_T_ERR_CVAR_SET_NEVER 
MPI_T_ERR_PVAR_NO_WRITE 
MPI_T_ERR_PVAR_NO_STARTSTOP 
MPI_T_ERR_PVAR_NO_ATOMIC 
MPI_ERR_LASTCODE 

Definition at line 71 of file mpi.h.

◆ MPI_Datatype

Named Predefined Datatypes.

Enumerator
MPI_CHAR 
MPI_SHORT 
MPI_LONG 
MPI_INT 
MPI_UNSIGNED_CHAR 
MPI_UNSIGNED_SHORT 
MPI_UNSIGNED 
MPI_UNSIGNED_LONG 

Definition at line 46 of file mpi.h.

Function Documentation

◆ MPI_Comm_rank()

C int MPI_Comm_rank ( MPI_Comm  comm,
int *  rank 
)
extern

Definition at line 59 of file mpi.cpp.

References assert, MpiBackend::getCommRank(), mpiBackend, and ZERO.

Referenced by MpiPing::initialize(), and MpiPrime::initialize().

◆ MPI_Comm_size()

C int MPI_Comm_size ( MPI_Comm  comm,
int *  size 
)
extern

Definition at line 66 of file mpi.cpp.

References assert, MpiBackend::getCommSize(), mpiBackend, and ZERO.

Referenced by MpiPing::exec(), and MpiPrime::initialize().

◆ MPI_Finalize()

C int MPI_Finalize ( void  )
extern

Definition at line 30 of file mpi.cpp.

References assert, mpiBackend, MpiBackend::terminate(), and ZERO.

Referenced by MpiPing::exec(), and MpiPrime::exec().

◆ MPI_Init()

C int MPI_Init ( int *  argc,
char ***  argv 
)
extern

Definition at line 24 of file mpi.cpp.

References assert, MpiBackend::initialize(), mpiBackend, and ZERO.

◆ MPI_Recv()

C int MPI_Recv ( void *  buf,
int  count,
MPI_Datatype  datatype,
int  source,
int  tag,
MPI_Comm  comm,
MPI_Status status 
)
extern

Definition at line 47 of file mpi.cpp.

References assert, mpiBackend, MpiBackend::receive(), and ZERO.

Referenced by MpiPrime::collect(), and MpiPing::receiveNumber().

◆ MPI_Send()

C int MPI_Send ( const void *  buf,
int  count,
MPI_Datatype  datatype,
int  dest,
int  tag,
MPI_Comm  comm 
)
extern

Definition at line 36 of file mpi.cpp.

References assert, mpiBackend, MpiBackend::send(), and ZERO.

Referenced by MpiPrime::collect(), and MpiPing::sendNumber().