libsc  2.8.7
The SC library provides support for parallel scientific applications.
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Macros | Typedefs | Enumerations
sc3_mpi_types.h File Reference

We provide MPI replacement data types for configuring without MPI. More...

#include <sc_config.h>
Include dependency graph for sc3_mpi_types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SC3_MPI_ERRORS_RETURN   NULL
 Wrap the parameter to return on MPI errors.
 
#define SC3_MPI_MAX_ERROR_STRING   BUFSIZ
 Create a wrapped version of the maximum error string length.
 
#define SC3_MPI_COMM_NULL   ((sc3_MPI_Comm_t) NULL)
 Wrapped invalid MPI communicator.
 
#define SC3_MPI_COMM_WORLD   ((sc3_MPI_Comm_t) 0x40)
 Without –enable-mpi, a communicator of size 1 and rank 0.
 
#define SC3_MPI_COMM_SELF   ((sc3_MPI_Comm_t) 0x80)
 Without –enable-mpi, a communicator of size 1 and rank 0.
 
#define SC3_MPI_INFO_NULL   ((sc3_MPI_Info_t) NULL)
 Wrapped invalid MPI info object.
 
#define SC3_MPI_WIN_NULL   ((sc3_MPI_Win_t) NULL)
 Invalid MPI 3 window object.
 

Typedefs

typedef struct sc3_MPI_Errhandler * sc3_MPI_Errhandler_t
 Wrapped MPI error handler object.
 
typedef struct sc3_MPI_Comm * sc3_MPI_Comm_t
 Wrapped MPI communicator. More...
 
typedef struct sc3_MPI_Info * sc3_MPI_Info_t
 Wrapped MPI info object. More...
 
typedef enum sc3_MPI_Datatype sc3_MPI_Datatype_t
 We wrap the MPI datatypes we use.
 
typedef enum sc3_MPI_Op sc3_MPI_Op_t
 We wrap the MPI operation types we use.
 
typedef enum sc3_MPI_Errorcode sc3_MPI_Errorcode_t
 We wrap some MPI error codes and the I/O error classes.
 
typedef enum sc3_MPI_Enum sc3_MPI_Enum_t
 We need several parameters to MPI functions.
 
typedef enum sc3_MPI_Comm_type sc3_MPI_Comm_type_t
 We wrap MPI 3 shared memory communicators. More...
 
typedef struct sc3_MPI_Win * sc3_MPI_Win_t
 We wrap the MPI 3 window object. More...
 
typedef long sc3_MPI_Aint_t
 We wrap the MPI address integer type.
 
typedef enum sc3_MPI_Win_mode sc3_MPI_Win_mode_t
 Wrap MPI 3 window lock modes.
 

Enumerations

enum  sc3_MPI_Datatype {
  SC3_MPI_DATATYPE_NULL = 0 ,
  SC3_MPI_BYTE ,
  SC3_MPI_INT ,
  SC3_MPI_2INT ,
  SC3_MPI_UNSIGNED ,
  SC3_MPI_LONG ,
  SC3_MPI_LONG_LONG ,
  SC3_MPI_FLOAT ,
  SC3_MPI_DOUBLE ,
  SC3_MPI_DOUBLE_INT
}
 We wrap the MPI datatypes we use. More...
 
enum  sc3_MPI_Op {
  SC3_MPI_OP_NULL = 0 ,
  SC3_MPI_MIN ,
  SC3_MPI_MAX ,
  SC3_MPI_MINLOC ,
  SC3_MPI_MAXLOC ,
  SC3_MPI_LOR ,
  SC3_MPI_LAND ,
  SC3_MPI_LXOR ,
  SC3_MPI_BOR ,
  SC3_MPI_BAND ,
  SC3_MPI_BXOR ,
  SC3_MPI_REPLACE ,
  SC3_MPI_SUM ,
  SC3_MPI_PROD
}
 We wrap the MPI operation types we use. More...
 
enum  sc3_MPI_Errorcode {
  SC3_MPI_SUCCESS = 0 ,
  SC3_MPI_ERR_ARG = 14000 ,
  SC3_MPI_ERR_COUNT ,
  SC3_MPI_ERR_UNKNOWN ,
  SC3_MPI_ERR_OTHER ,
  SC3_MPI_ERR_NO_MEM ,
  SC3_MPI_ERR_FILE ,
  SC3_MPI_ERR_NOT_SAME ,
  SC3_MPI_ERR_AMODE ,
  SC3_MPI_ERR_UNSUPPORTED_DATAREP ,
  SC3_MPI_ERR_UNSUPPORTED_OPERATION ,
  SC3_MPI_ERR_NO_SUCH_FILE ,
  SC3_MPI_ERR_FILE_EXISTS ,
  SC3_MPI_ERR_BAD_FILE ,
  SC3_MPI_ERR_ACCESS ,
  SC3_MPI_ERR_NO_SPACE ,
  SC3_MPI_ERR_QUOTA ,
  SC3_MPI_ERR_READ_ONLY ,
  SC3_MPI_ERR_FILE_IN_USE ,
  SC3_MPI_ERR_DUP_DATAREP ,
  SC3_MPI_ERR_CONVERSION ,
  SC3_MPI_ERR_IO ,
  SC3_MPI_ERR_LASTCODE
}
 We wrap some MPI error codes and the I/O error classes. More...
 
enum  sc3_MPI_Enum { SC3_MPI_UNDEFINED = 0x11 }
 We need several parameters to MPI functions. More...
 
enum  sc3_MPI_Comm_type { SC3_MPI_COMM_TYPE_SHARED = 0x12 }
 We wrap MPI 3 shared memory communicators. More...
 
enum  sc3_MPI_Win_mode {
  SC3_MPI_LOCK_SHARED = 0x13 ,
  SC3_MPI_LOCK_EXCLUSIVE = 0x14 ,
  SC3_MPI_MODE_NOCHECK = 0x15
}
 Wrap MPI 3 window lock modes. More...
 

Detailed Description

We provide MPI replacement data types for configuring without MPI.

Included from both sc_mpi.h and the future sc3_mpi.h.

This header file provides definitions of MPI data types for the case that no MPI implementation is available or MPI is not configured.

Typedef Documentation

◆ sc3_MPI_Comm_t

typedef struct sc3_MPI_Comm* sc3_MPI_Comm_t

Wrapped MPI communicator.

Without –enable-mpi, it reports size 1 and rank 0.

◆ sc3_MPI_Comm_type_t

We wrap MPI 3 shared memory communicators.

Without –enable-mpi, they have size 1 and rank 0.

◆ sc3_MPI_Info_t

typedef struct sc3_MPI_Info* sc3_MPI_Info_t

Wrapped MPI info object.

Without –enable-mpi, the set and get methods do nothing.

◆ sc3_MPI_Win_t

typedef struct sc3_MPI_Win* sc3_MPI_Win_t

We wrap the MPI 3 window object.

With MPI 3 windows available, the functionality is unchanged. Without MPI 3 available, it is primitive but allows basic use.

When created with a communicator size of one, or when configure does not define SC_ENABLE_MPIWINSHARED, we use the wrapper and do not go through MPI. When shared windows are not supported and the communicator has size > 1, the wrapper cannot query or lock and unlock the window of remote ranks. Any such attempt will result in a fatal error returned.

Enumeration Type Documentation

◆ sc3_MPI_Comm_type

We wrap MPI 3 shared memory communicators.

Without –enable-mpi, they have size 1 and rank 0.

Enumerator
SC3_MPI_COMM_TYPE_SHARED 

MPI 3 shared window communicator.

◆ sc3_MPI_Datatype

We wrap the MPI datatypes we use.

Enumerator
SC3_MPI_DATATYPE_NULL 

The invalid data type.

SC3_MPI_BYTE 

Same as in original MPI.

1 byte. It is preferred over MPI_CHAR since the latter may amount to multiple bytes for wide chars.

SC3_MPI_INT 

Same as in original MPI.

System int type.

SC3_MPI_2INT 

Same as in original MPI.

Two system ints.

SC3_MPI_UNSIGNED 

Same as in original MPI.

System unsigned.

SC3_MPI_LONG 

Same as in original MPI.

System long type.

SC3_MPI_LONG_LONG 

Same as in original MPI.

System long long.

SC3_MPI_FLOAT 

Same as in original MPI.

SC3_MPI_DOUBLE 

Same as in original MPI.

SC3_MPI_DOUBLE_INT 

Same as in original MPI.

Double and int.

◆ sc3_MPI_Enum

We need several parameters to MPI functions.

Enumerator
SC3_MPI_UNDEFINED 

An input parameter with undefined value.

◆ sc3_MPI_Errorcode

We wrap some MPI error codes and the I/O error classes.

Enumerator
SC3_MPI_SUCCESS 

An MPI function has exited successfully.

SC3_MPI_ERR_ARG 

An MPI function encountered invalid arguments.

SC3_MPI_ERR_COUNT 

An MPI function encountered an invalid count argument.

SC3_MPI_ERR_UNKNOWN 

An MPI function has produced an unknown error.

SC3_MPI_ERR_OTHER 

An MPI function has produced some known error.

SC3_MPI_ERR_NO_MEM 

An MPI function ran out of memory.

◆ sc3_MPI_Op

enum sc3_MPI_Op

We wrap the MPI operation types we use.

Enumerator
SC3_MPI_OP_NULL 

The invalid operation.

SC3_MPI_MIN 

The usual minimum reduction operation.

SC3_MPI_MAX 

The usual maximum reduction operation.

SC3_MPI_MINLOC 

Find minimum value and its rank.

SC3_MPI_MAXLOC 

Find maximum value and its rank.

SC3_MPI_LOR 

Logical OR.

SC3_MPI_LAND 

Logical AND.

SC3_MPI_LXOR 

Logical XOR.

SC3_MPI_BOR 

Bitwise OR.

SC3_MPI_BAND 

Bitwise AND.

SC3_MPI_BXOR 

Bitwise XOR.

SC3_MPI_REPLACE 

The MPI replace operation.

SC3_MPI_SUM 

The usual sum reduction operation.

SC3_MPI_PROD 

The usual product reduction operation.

◆ sc3_MPI_Win_mode

Wrap MPI 3 window lock modes.

Enumerator
SC3_MPI_LOCK_SHARED 

Shared (multiple readers) lock.

SC3_MPI_LOCK_EXCLUSIVE 

Exclusive (usually reader) lock.

SC3_MPI_MODE_NOCHECK 

Option to MPI_Win_lock.