Package mpi

# Class MPI

java.lang.Object
mpi.MPI

public final class MPI extends Object
MPI environment.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`ANY_SOURCE`
`static final int`
`ANY_TAG`
`static final int`
`APPNUM`
`static final Op`
`BAND`
`static final Datatype`
`BOOLEAN`
`static final Op`
`BOR`
`static final int`
`BSEND_OVERHEAD`
`static final Op`
`BXOR`
`static final Datatype`
`BYTE`
`static final int`
`CART`
`static final Datatype`
`CHAR`
`static final Intracomm`
`COMM_SELF`
`static final Intracomm`
`COMM_WORLD`
`static final int`
`CONGRUENT`
`static final Datatype`
`DATATYPE_NULL`
`static final int`
`DISPLACEMENT_CURRENT`
`static final int`
`DIST_GRAPH`
`static final int`
`DISTRIBUTE_BLOCK`
`static final int`
`DISTRIBUTE_CYCLIC`
`static final int`
`DISTRIBUTE_DFLT_DARG`
`static final int`
`DISTRIBUTE_NONE`
`static final Datatype`
`DOUBLE`
`static final Datatype`
`DOUBLE_COMPLEX`
`static final Datatype`
`DOUBLE_INT`
Struct which must be used with `doubleInt`.
`static final DoubleInt`
`doubleInt`
Struct object for `DOUBLE_INT` datatype.
`static final int`
`ERR_ACCESS`
`static final int`
`ERR_AMODE`
`static final int`
`ERR_ARG`
`static final int`
`ERR_ASSERT`
`static final int`
`ERR_BAD_FILE`
`static final int`
`ERR_BASE`
`static final int`
`ERR_BUFFER`
`static final int`
`ERR_COMM`
`static final int`
`ERR_CONVERSION`
`static final int`
`ERR_COUNT`
`static final int`
`ERR_DIMS`
`static final int`
`ERR_DISP`
`static final int`
`ERR_DUP_DATAREP`
`static final int`
`ERR_FILE`
`static final int`
`ERR_FILE_EXISTS`
`static final int`
`ERR_FILE_IN_USE`
`static final int`
`ERR_GROUP`
`static final int`
`ERR_IN_STATUS`
`static final int`
`ERR_INFO`
`static final int`
`ERR_INFO_KEY`
`static final int`
`ERR_INFO_NOKEY`
`static final int`
`ERR_INFO_VALUE`
`static final int`
`ERR_INTERN`
`static final int`
`ERR_IO`
`static final int`
`ERR_KEYVAL`
`static final int`
`ERR_LASTCODE`
`static final int`
`ERR_LOCKTYPE`
`static final int`
`ERR_NAME`
`static final int`
`ERR_NO_MEM`
`static final int`
`ERR_NO_SPACE`
`static final int`
`ERR_NO_SUCH_FILE`
`static final int`
`ERR_NOT_SAME`
`static final int`
`ERR_OP`
`static final int`
`ERR_OTHER`
`static final int`
`ERR_PENDING`
`static final int`
`ERR_PORT`
`static final int`
`ERR_QUOTA`
`static final int`
`ERR_RANK`
`static final int`
`ERR_READ_ONLY`
`static final int`
`ERR_REQUEST`
`static final int`
`ERR_RMA_CONFLICT`
`static final int`
`ERR_RMA_SYNC`
`static final int`
`ERR_ROOT`
`static final int`
`ERR_SERVICE`
`static final int`
`ERR_SIZE`
`static final int`
`ERR_SPAWN`
`static final int`
`ERR_SYSRESOURCE`
`static final int`
`ERR_TAG`
`static final int`
`ERR_TOPOLOGY`
`static final int`
`ERR_TRUNCATE`
`static final int`
`ERR_TYPE`
`static final int`
`ERR_UNKNOWN`
`static final int`
`ERR_UNSUPPORTED_DATAREP`
`static final int`
`ERR_UNSUPPORTED_OPERATION`
`static final int`
`ERR_WIN`
`static final Errhandler`
`ERRORS_ARE_FATAL`
`static final Errhandler`
`ERRORS_RETURN`
`static final Datatype`
`FLOAT`
`static final Datatype`
`FLOAT_COMPLEX`
`static final Datatype`
`FLOAT_INT`
Struct which must be used with `floatInt`.
`static final FloatInt`
`floatInt`
Struct object for `FLOAT_INT` datatype.
`static final int`
`GRAPH`
`static final Group`
`GROUP_EMPTY`
`static final int`
`HOST`
`static final int`
`IDENT`
`static final Info`
`INFO_ENV`
`static final Info`
`INFO_NULL`
`static final Datatype`
`INT`
`static final Int2`
`int2`
Struct object for `INT2` datatype.
`static final Datatype`
`INT2`
Struct which must be used with `int2`.
`static final int`
`IO`
`static final int`
`KEYVAL_INVALID`
`static final Op`
`LAND`
`static final int`
`LASTUSEDCODE`
`static final int`
`LOCK_EXCLUSIVE`
`static final int`
`LOCK_SHARED`
`static final Datatype`
`LONG`
`static final Datatype`
`LONG_INT`
Struct which must be used with `longInt`.
`static final LongInt`
`longInt`
Struct object for `LONG_INT` datatype.
`static final Op`
`LOR`
`static final Op`
`LXOR`
`static final Op`
`MAX`
`static final int`
`MAX_DATAREP_STRING`
`static final int`
`MAX_INFO_KEY`
`static final int`
`MAX_INFO_VAL`
`static final int`
`MAX_OBJECT_NAME`
`static final int`
`MAX_PORT_NAME`
`static final Op`
`MAXLOC`
Global maximum operator.
`static final Op`
`MIN`
`static final Op`
`MINLOC`
Global minimum operator.
`static final int`
`MODE_APPEND`
`static final int`
`MODE_CREATE`
`static final int`
`MODE_DELETE_ON_CLOSE`
`static final int`
`MODE_EXCL`
`static final int`
`MODE_NOCHECK`
`static final int`
`MODE_NOPRECEDE`
`static final int`
`MODE_NOPUT`
`static final int`
`MODE_NOSTORE`
`static final int`
`MODE_NOSUCCEED`
`static final int`
`MODE_RDONLY`
`static final int`
`MODE_RDWR`
`static final int`
`MODE_SEQUENTIAL`
`static final int`
`MODE_UNIQUE_OPEN`
`static final int`
`MODE_WRONLY`
`static final Op`
`NO_OP`
`static final int`
`ORDER_C`
`static final int`
`ORDER_FORTRAN`
`static final Datatype`
`PACKED`
`static final int`
`PROC_NULL`
`static final Op`
`PROD`
`static final Op`
`REPLACE`
`static final Request`
`REQUEST_NULL`
`static final int`
`ROOT`
`static final int`
`SEEK_CUR`
`static final int`
`SEEK_END`
`static final int`
`SEEK_SET`
`static final Datatype`
`SHORT`
`static final Datatype`
`SHORT_INT`
Struct which must be used with `shortInt`.
`static final ShortInt`
`shortInt`
Struct object for `SHORT_INT` datatype.
`static final int`
`SIMILAR`
`static final int`
`SUBVERSION`
`static final int`
`SUCCESS`
`static final Op`
`SUM`
`static final int`
`TAG_UB`
`static final int`
`THREAD_FUNNELED`
`static final int`
`THREAD_MULTIPLE`
`static final int`
`THREAD_SERIALIZED`
`static final int`
`THREAD_SINGLE`
`static final int`
`UNDEFINED`
`static final int`
`UNEQUAL`
`static final int`
`UNIVERSE_SIZE`
`static final int`
`VERSION`
`static final int`
`WIN_BASE`
`static final int`
`WIN_DISP_UNIT`
`static final int`
`WIN_SIZE`
`static final int`
`WTIME_IS_GLOBAL`

## Constructor Summary

Constructors
Constructor
Description
`MPI()`

## Method Summary

Modifier and Type
Method
Description
`protected static void`
`assertDirectBuffer(Buffer buf)`
Asserts that a buffer is direct.
`protected static void`
`assertDirectBuffer(Buffer sendbuf, Buffer recvbuf)`
Asserts that buffers are direct.
`static void`
`attachBuffer(byte[] buffer)`
Attaches a user-provided buffer for sending.
`protected static Object`
`attrGet(byte[] value)`
`protected static byte[]`
`attrSet(Object value)`
`protected static void`
`check()`
Check if MPI has been initialized and hasn't been finalized.
`static byte[]`
`detachBuffer()`
Removes an existing buffer (for use in sending).
`static void`
`Finalize()`
Finalize MPI.
`static String`
`getLibVersion()`
Returns the version of the MPI Library
`static String`
`getProcessorName()`
Returns the name of the processor on which it is called.
`static Version`
`getVersion()`
Returns a version object representing the version of MPI being used.
`static String[]`
`Init(String[] args)`
Initialize MPI.
`static int`
`InitThread(String[] args, int required)`
Initialize MPI with threads.
`protected static boolean`
`isDirectBuffer(Object obj)`
Checks if an object is a direct buffer.
`static boolean`
`isFinalized()`
Test if MPI has been finalized.
`protected static boolean`
`isHeapBuffer(Object obj)`
Checks if an object is a heap buffer.
`static boolean`
`isInitialized()`
Test if MPI has been initialized.
`static boolean`
`isThreadMain()`
Java binding of the MPI operation `MPI_IS_THREAD_MAIN`.
`static ByteBuffer`
`newByteBuffer(int capacity)`
Allocates a new direct byte buffer.
`static CharBuffer`
`newCharBuffer(int capacity)`
Allocates a new direct char buffer.
`static DoubleBuffer`
`newDoubleBuffer(int capacity)`
Allocates a new direct double buffer.
`static FloatBuffer`
`newFloatBuffer(int capacity)`
Allocates a new direct float buffer.
`static IntBuffer`
`newIntBuffer(int capacity)`
Allocates a new direct int buffer.
`static LongBuffer`
`newLongBuffer(int capacity)`
Allocates a new direct long buffer.
`static ShortBuffer`
`newShortBuffer(int capacity)`
Allocates a new direct short buffer.
`static void`
`pControl(int level, Object obj)`
Controls profiling.
`static int`
`queryThread()`
Java binding of the MPI operation `MPI_QUERY_THREAD`.
`static ByteBuffer`
`slice(byte[] buf, int offset)`
Creates a new buffer whose content is a shared subsequence of a buffer.
`static CharBuffer`
`slice(char[] buf, int offset)`
Creates a new buffer whose content is a shared subsequence of a buffer.
`static DoubleBuffer`
`slice(double[] buf, int offset)`
Creates a new buffer whose content is a shared subsequence of a buffer.
`static FloatBuffer`
`slice(float[] buf, int offset)`
Creates a new buffer whose content is a shared subsequence of a buffer.
`static IntBuffer`
`slice(int[] buf, int offset)`
Creates a new buffer whose content is a shared subsequence of a buffer.
`static LongBuffer`
`slice(long[] buf, int offset)`
Creates a new buffer whose content is a shared subsequence of a buffer.
`static ShortBuffer`
`slice(short[] buf, int offset)`
Creates a new buffer whose content is a shared subsequence of a buffer.
`static ByteBuffer`
`slice(ByteBuffer buf, int offset)`
Creates a new buffer whose content is a shared subsequence of a buffer.
`static CharBuffer`
`slice(CharBuffer buf, int offset)`
Creates a new buffer whose content is a shared subsequence of a buffer.
`static DoubleBuffer`
`slice(DoubleBuffer buf, int offset)`
Creates a new buffer whose content is a shared subsequence of a buffer.
`static FloatBuffer`
`slice(FloatBuffer buf, int offset)`
Creates a new buffer whose content is a shared subsequence of a buffer.
`static IntBuffer`
`slice(IntBuffer buf, int offset)`
Creates a new buffer whose content is a shared subsequence of a buffer.
`static LongBuffer`
`slice(LongBuffer buf, int offset)`
Creates a new buffer whose content is a shared subsequence of a buffer.
`static ShortBuffer`
`slice(ShortBuffer buf, int offset)`
Creates a new buffer whose content is a shared subsequence of a buffer.
`static double`
`wtick()`
Returns resolution of timer.
`static double`
`wtime()`
Returns an elapsed time on the calling processor.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### COMM_WORLD

public static final Intracomm COMM_WORLD

### COMM_SELF

public static final Intracomm COMM_SELF

### THREAD_SINGLE

public static final int THREAD_SINGLE

### THREAD_FUNNELED

public static final int THREAD_FUNNELED

### THREAD_SERIALIZED

public static final int THREAD_SERIALIZED

### THREAD_MULTIPLE

public static final int THREAD_MULTIPLE

### GRAPH

public static final int GRAPH

### DIST_GRAPH

public static final int DIST_GRAPH

### CART

public static final int CART

### ANY_SOURCE

public static final int ANY_SOURCE

### ANY_TAG

public static final int ANY_TAG

### MAX

public static final Op MAX

### MIN

public static final Op MIN

### SUM

public static final Op SUM

### PROD

public static final Op PROD

### LAND

public static final Op LAND

### BAND

public static final Op BAND

### LOR

public static final Op LOR

### BOR

public static final Op BOR

### LXOR

public static final Op LXOR

### BXOR

public static final Op BXOR

### REPLACE

public static final Op REPLACE

### NO_OP

public static final Op NO_OP

### MINLOC

public static final Op MINLOC
Global minimum operator.

`MINLOC` and `MAXLOC` can be used with each of the following datatypes: `INT2`, `SHORT_INT`, `LONG_INT`, `FLOAT_INT` and `DOUBLE_INT`.

### MAXLOC

public static final Op MAXLOC
Global maximum operator. See `MINLOC`.

### DATATYPE_NULL

public static final Datatype DATATYPE_NULL

### BYTE

public static final Datatype BYTE

### CHAR

public static final Datatype CHAR

### SHORT

public static final Datatype SHORT

### BOOLEAN

public static final Datatype BOOLEAN

### INT

public static final Datatype INT

### LONG

public static final Datatype LONG

### FLOAT

public static final Datatype FLOAT

### DOUBLE

public static final Datatype DOUBLE

### PACKED

public static final Datatype PACKED

### FLOAT_COMPLEX

public static final Datatype FLOAT_COMPLEX

### DOUBLE_COMPLEX

public static final Datatype DOUBLE_COMPLEX

### INT2

public static final Datatype INT2
Struct which must be used with `int2`.

### SHORT_INT

public static final Datatype SHORT_INT
Struct which must be used with `shortInt`.

### LONG_INT

public static final Datatype LONG_INT
Struct which must be used with `longInt`.

### FLOAT_INT

public static final Datatype FLOAT_INT
Struct which must be used with `floatInt`.

### DOUBLE_INT

public static final Datatype DOUBLE_INT
Struct which must be used with `doubleInt`.

### int2

public static final Int2 int2
Struct object for `INT2` datatype.

### shortInt

public static final ShortInt shortInt
Struct object for `SHORT_INT` datatype.

### longInt

public static final LongInt longInt
Struct object for `LONG_INT` datatype.

### floatInt

public static final FloatInt floatInt
Struct object for `FLOAT_INT` datatype.

### doubleInt

public static final DoubleInt doubleInt
Struct object for `DOUBLE_INT` datatype.

### REQUEST_NULL

public static final Request REQUEST_NULL

### GROUP_EMPTY

public static final Group GROUP_EMPTY

### INFO_ENV

public static final Info INFO_ENV

### INFO_NULL

public static final Info INFO_NULL

### PROC_NULL

public static final int PROC_NULL

### UNDEFINED

public static final int UNDEFINED

### IDENT

public static final int IDENT

### CONGRUENT

public static final int CONGRUENT

### SIMILAR

public static final int SIMILAR

### UNEQUAL

public static final int UNEQUAL

### TAG_UB

public static final int TAG_UB

### HOST

public static final int HOST

### IO

public static final int IO

### WTIME_IS_GLOBAL

public static final int WTIME_IS_GLOBAL

### APPNUM

public static final int APPNUM

### LASTUSEDCODE

public static final int LASTUSEDCODE

### UNIVERSE_SIZE

public static final int UNIVERSE_SIZE

### WIN_BASE

public static final int WIN_BASE

### WIN_SIZE

public static final int WIN_SIZE

### WIN_DISP_UNIT

public static final int WIN_DISP_UNIT

### VERSION

public static final int VERSION

### SUBVERSION

public static final int SUBVERSION

### ROOT

public static final int ROOT

### KEYVAL_INVALID

public static final int KEYVAL_INVALID

### BSEND_OVERHEAD

public static final int BSEND_OVERHEAD

### MAX_OBJECT_NAME

public static final int MAX_OBJECT_NAME

### MAX_PORT_NAME

public static final int MAX_PORT_NAME

### MAX_DATAREP_STRING

public static final int MAX_DATAREP_STRING

### MAX_INFO_KEY

public static final int MAX_INFO_KEY

### MAX_INFO_VAL

public static final int MAX_INFO_VAL

### ORDER_C

public static final int ORDER_C

### ORDER_FORTRAN

public static final int ORDER_FORTRAN

### DISTRIBUTE_BLOCK

public static final int DISTRIBUTE_BLOCK

### DISTRIBUTE_CYCLIC

public static final int DISTRIBUTE_CYCLIC

### DISTRIBUTE_NONE

public static final int DISTRIBUTE_NONE

### DISTRIBUTE_DFLT_DARG

public static final int DISTRIBUTE_DFLT_DARG

### MODE_CREATE

public static final int MODE_CREATE

### MODE_RDONLY

public static final int MODE_RDONLY

### MODE_WRONLY

public static final int MODE_WRONLY

### MODE_RDWR

public static final int MODE_RDWR

### MODE_DELETE_ON_CLOSE

public static final int MODE_DELETE_ON_CLOSE

### MODE_UNIQUE_OPEN

public static final int MODE_UNIQUE_OPEN

### MODE_EXCL

public static final int MODE_EXCL

### MODE_APPEND

public static final int MODE_APPEND

### MODE_SEQUENTIAL

public static final int MODE_SEQUENTIAL

### DISPLACEMENT_CURRENT

public static final int DISPLACEMENT_CURRENT

### SEEK_SET

public static final int SEEK_SET

### SEEK_CUR

public static final int SEEK_CUR

### SEEK_END

public static final int SEEK_END

### MODE_NOCHECK

public static final int MODE_NOCHECK

### MODE_NOPRECEDE

public static final int MODE_NOPRECEDE

### MODE_NOPUT

public static final int MODE_NOPUT

### MODE_NOSTORE

public static final int MODE_NOSTORE

### MODE_NOSUCCEED

public static final int MODE_NOSUCCEED

### LOCK_EXCLUSIVE

public static final int LOCK_EXCLUSIVE

### LOCK_SHARED

public static final int LOCK_SHARED

### ERRORS_ARE_FATAL

public static final Errhandler ERRORS_ARE_FATAL

### ERRORS_RETURN

public static final Errhandler ERRORS_RETURN

### SUCCESS

public static final int SUCCESS

### ERR_BUFFER

public static final int ERR_BUFFER

### ERR_COUNT

public static final int ERR_COUNT

### ERR_TYPE

public static final int ERR_TYPE

### ERR_TAG

public static final int ERR_TAG

### ERR_COMM

public static final int ERR_COMM

### ERR_RANK

public static final int ERR_RANK

### ERR_REQUEST

public static final int ERR_REQUEST

### ERR_ROOT

public static final int ERR_ROOT

### ERR_GROUP

public static final int ERR_GROUP

### ERR_OP

public static final int ERR_OP

### ERR_TOPOLOGY

public static final int ERR_TOPOLOGY

### ERR_DIMS

public static final int ERR_DIMS

### ERR_ARG

public static final int ERR_ARG

### ERR_UNKNOWN

public static final int ERR_UNKNOWN

### ERR_TRUNCATE

public static final int ERR_TRUNCATE

### ERR_OTHER

public static final int ERR_OTHER

### ERR_INTERN

public static final int ERR_INTERN

### ERR_IN_STATUS

public static final int ERR_IN_STATUS

### ERR_PENDING

public static final int ERR_PENDING

### ERR_ACCESS

public static final int ERR_ACCESS

### ERR_AMODE

public static final int ERR_AMODE

### ERR_ASSERT

public static final int ERR_ASSERT

### ERR_BAD_FILE

public static final int ERR_BAD_FILE

### ERR_BASE

public static final int ERR_BASE

### ERR_CONVERSION

public static final int ERR_CONVERSION

### ERR_DISP

public static final int ERR_DISP

### ERR_DUP_DATAREP

public static final int ERR_DUP_DATAREP

### ERR_FILE_EXISTS

public static final int ERR_FILE_EXISTS

### ERR_FILE_IN_USE

public static final int ERR_FILE_IN_USE

### ERR_FILE

public static final int ERR_FILE

### ERR_INFO_KEY

public static final int ERR_INFO_KEY

### ERR_INFO_NOKEY

public static final int ERR_INFO_NOKEY

### ERR_INFO_VALUE

public static final int ERR_INFO_VALUE

### ERR_INFO

public static final int ERR_INFO

### ERR_IO

public static final int ERR_IO

### ERR_KEYVAL

public static final int ERR_KEYVAL

### ERR_LOCKTYPE

public static final int ERR_LOCKTYPE

### ERR_NAME

public static final int ERR_NAME

### ERR_NO_MEM

public static final int ERR_NO_MEM

### ERR_NOT_SAME

public static final int ERR_NOT_SAME

### ERR_NO_SPACE

public static final int ERR_NO_SPACE

### ERR_NO_SUCH_FILE

public static final int ERR_NO_SUCH_FILE

### ERR_PORT

public static final int ERR_PORT

### ERR_QUOTA

public static final int ERR_QUOTA

### ERR_READ_ONLY

public static final int ERR_READ_ONLY

### ERR_RMA_CONFLICT

public static final int ERR_RMA_CONFLICT

### ERR_RMA_SYNC

public static final int ERR_RMA_SYNC

### ERR_SERVICE

public static final int ERR_SERVICE

### ERR_SIZE

public static final int ERR_SIZE

### ERR_SPAWN

public static final int ERR_SPAWN

### ERR_UNSUPPORTED_DATAREP

public static final int ERR_UNSUPPORTED_DATAREP

### ERR_UNSUPPORTED_OPERATION

public static final int ERR_UNSUPPORTED_OPERATION

### ERR_WIN

public static final int ERR_WIN

### ERR_LASTCODE

public static final int ERR_LASTCODE

### ERR_SYSRESOURCE

public static final int ERR_SYSRESOURCE

## Constructor Details

### MPI

public MPI()

## Method Details

### Init

public static String[] Init(String[] args) throws MPIException
Initialize MPI.

Java binding of the MPI operation `MPI_INIT`.

Parameters:
  `args` - arguments to the `main` method.
Returns:
  arguments
Throws:
  `MPIException` - Signals that an MPI exception of some sort has occurred.

### InitThread

public static int InitThread(String[] args, int required) throws MPIException
Initialize MPI with threads.

Java binding of the MPI operation `MPI_INIT_THREAD`.

Parameters:
  `args` - arguments to the `main` method.
  `required` - desired level of thread support
Returns:
  provided level of thread support
Throws:
  `MPIException` - Signals that an MPI exception of some sort has occurred.

### queryThread

public static int queryThread() throws MPIException
Java binding of the MPI operation `MPI_QUERY_THREAD`.

Returns:
  provided level of thread support
Throws:
  `MPIException` - Signals that an MPI exception of some sort has occurred.

### isThreadMain

public static boolean isThreadMain() throws MPIException
Java binding of the MPI operation `MPI_IS_THREAD_MAIN`.

Returns:
  true if it is the main thread
Throws:
  `MPIException` - Signals that an MPI exception of some sort has occurred.

### Finalize

public static void Finalize() throws MPIException
Finalize MPI.

Java binding of the MPI operation `MPI_FINALIZE`.

Throws:
  `MPIException` - Signals that an MPI exception of some sort has occurred.

### wtime

public static double wtime() throws MPIException
Returns an elapsed time on the calling processor.

Java binding of the MPI operation `MPI_WTIME`.

Returns:
  time in seconds since an arbitrary time in the past.
Throws:
  `MPIException` - Signals that an MPI exception of some sort has occurred.

### wtick

public static double wtick() throws MPIException
Returns resolution of timer.

Java binding of the MPI operation `MPI_WTICK`.

Returns:
  resolution of `wtime` in seconds.
Throws:
  `MPIException` - Signals that an MPI exception of some sort has occurred.

### getVersion

public static Version getVersion()
Returns a version object representing the version of MPI being used.

Java binding of the MPI operation `MPI_GET_VERSION`.

Returns:
  A version object representing the version and subversion of MPI being used.

### getLibVersion

public static String getLibVersion()
Returns the version of the MPI Library

Java binding of the MPI operation `MPI_GET_LIBRARY_VERSION`.

Returns:
  A string representation of the MPI Library

### getProcessorName

public static String getProcessorName() throws MPIException
Returns the name of the processor on which it is called.

Java binding of the MPI operation `MPI_GET_PROCESSOR_NAME`.

Returns:
  A unique specifier for the actual node.
Throws:
  `MPIException` - Signals that an MPI exception of some sort has occurred.

### isInitialized

public static boolean isInitialized() throws MPIException
Test if MPI has been initialized.

Java binding of the MPI operation `MPI_INITIALIZED`.

Returns:
  `true` if `Init` has been called, `false` otherwise.
Throws:
  `MPIException` - Signals that an MPI exception of some sort has occurred.

### isFinalized

public static boolean isFinalized() throws MPIException
Test if MPI has been finalized.

Java binding of the MPI operation `MPI_FINALIZED`.

Returns:
  `true` if `Finalize` has been called, `false` otherwise.
Throws:
  `MPIException` - Signals that an MPI exception of some sort has occurred.

### attachBuffer

public static void attachBuffer(byte[] buffer) throws MPIException
Attaches a user-provided buffer for sending.

Java binding of the MPI operation `MPI_BUFFER_ATTACH`.

Parameters:
  `buffer` - initial buffer
Throws:
  `MPIException` - Signals that an MPI exception of some sort has occurred.

### detachBuffer

public static byte[] detachBuffer() throws MPIException
Removes an existing buffer (for use in sending).

Java binding of the MPI operation `MPI_BUFFER_DETACH`.

Returns:
  initial buffer
Throws:
  `MPIException` - Signals that an MPI exception of some sort has occurred.

### pControl

public static void pControl(int level, Object obj)
Controls profiling.

This method is not implemented.

Java binding of the MPI operation `MPI_PCONTROL`.

Parameters:
  `level` - Profiling level.
  `obj` - Profiling information.

### check

protected static void check() throws MPIException
Check if MPI has been initialized and hasn't been finalized.

Throws:
  `MPIException` - Signals that an MPI exception of some sort has occurred.

### attrSet

protected static byte[] attrSet(Object value) throws MPIException

Throws:
  `MPIException`

### attrGet

protected static Object attrGet(byte[] value) throws MPIException

Throws:
  `MPIException`

### newByteBuffer

public static ByteBuffer newByteBuffer(int capacity)
Allocates a new direct byte buffer.

Parameters:
  `capacity` - The new buffer's capacity, in bytes
Returns:
  The new byte buffer

### newCharBuffer

public static CharBuffer newCharBuffer(int capacity)
Allocates a new direct char buffer.

Parameters:
  `capacity` - The new buffer's capacity, in chars
Returns:
  The new char buffer

### newShortBuffer

public static ShortBuffer newShortBuffer(int capacity)
Allocates a new direct short buffer.

Parameters:
  `capacity` - The new buffer's capacity, in shorts
Returns:
  The new short buffer

### newIntBuffer

public static IntBuffer newIntBuffer(int capacity)
Allocates a new direct int buffer.

Parameters:
  `capacity` - The new buffer's capacity, in ints
Returns:
  The new int buffer

### newLongBuffer

public static LongBuffer newLongBuffer(int capacity)
Allocates a new direct long buffer.

Parameters:
  `capacity` - The new buffer's capacity, in longs
Returns:
  The new long buffer

### newFloatBuffer

public static FloatBuffer newFloatBuffer(int capacity)
Allocates a new direct float buffer.

Parameters:
  `capacity` - The new buffer's capacity, in floats
Returns:
  The new float buffer

### newDoubleBuffer

public static DoubleBuffer newDoubleBuffer(int capacity)
Allocates a new direct double buffer.

Parameters:
  `capacity` - The new buffer's capacity, in doubles
Returns:
  The new double buffer

### assertDirectBuffer

protected static void assertDirectBuffer(Buffer buf)
Asserts that a buffer is direct.

Parameters:
  `buf` - buffer

### assertDirectBuffer

protected static void assertDirectBuffer(Buffer sendbuf, Buffer recvbuf)
Asserts that buffers are direct.

Parameters:
  `sendbuf` - The send buffer
  `recvbuf` - The receive buffer

### isDirectBuffer

protected static boolean isDirectBuffer(Object obj)
Checks if an object is a direct buffer.

Parameters:
  `obj` - object
Returns:
  true if the object is a direct buffer

### isHeapBuffer

protected static boolean isHeapBuffer(Object obj)
Checks if an object is a heap buffer.

Parameters:
  `obj` - object
Returns:
  true if the object is a heap buffer

### slice

public static ByteBuffer slice(ByteBuffer buf, int offset)
Creates a new buffer whose content is a shared subsequence of a buffer.

The content of the new buffer will start at the specified offset.

Parameters:
  `buf` - buffer
  `offset` - offset
Returns:
  the new buffer.

### slice

public static CharBuffer slice(CharBuffer buf, int offset)
Creates a new buffer whose content is a shared subsequence of a buffer.

The content of the new buffer will start at the specified offset.

Parameters:
  `buf` - buffer
  `offset` - offset
Returns:
  the new buffer.

### slice

public static ShortBuffer slice(ShortBuffer buf, int offset)
Creates a new buffer whose content is a shared subsequence of a buffer.

The content of the new buffer will start at the specified offset.

Parameters:
  `buf` - buffer
  `offset` - offset
Returns:
  the new buffer.

### slice

public static IntBuffer slice(IntBuffer buf, int offset)
Creates a new buffer whose content is a shared subsequence of a buffer.

The content of the new buffer will start at the specified offset.

Parameters:
  `buf` - buffer
  `offset` - offset
Returns:
  the new buffer.

### slice

public static LongBuffer slice(LongBuffer buf, int offset)
Creates a new buffer whose content is a shared subsequence of a buffer.

The content of the new buffer will start at the specified offset.

Parameters:
  `buf` - buffer
  `offset` - offset
Returns:
  the new buffer.

### slice

public static FloatBuffer slice(FloatBuffer buf, int offset)
Creates a new buffer whose content is a shared subsequence of a buffer.

The content of the new buffer will start at the specified offset.

Parameters:
  `buf` - buffer
  `offset` - offset
Returns:
  the new buffer.

### slice

public static DoubleBuffer slice(DoubleBuffer buf, int offset)
Creates a new buffer whose content is a shared subsequence of a buffer.

The content of the new buffer will start at the specified offset.

Parameters:
  `buf` - buffer
  `offset` - offset
Returns:
  the new buffer.

### slice

public static ByteBuffer slice(byte[] buf, int offset)
Creates a new buffer whose content is a shared subsequence of a buffer.

The content of the new buffer will start at the specified offset.

Parameters:
  `buf` - buffer
  `offset` - offset
Returns:
  the new buffer.

### slice

public static CharBuffer slice(char[] buf, int offset)
Creates a new buffer whose content is a shared subsequence of a buffer.

The content of the new buffer will start at the specified offset.

Parameters:
  `buf` - buffer
  `offset` - offset
Returns:
  the new buffer.

### slice

public static ShortBuffer slice(short[] buf, int offset)
Creates a new buffer whose content is a shared subsequence of a buffer.

The content of the new buffer will start at the specified offset.

Parameters:
  `buf` - buffer
  `offset` - offset
Returns:
  the new buffer.

### slice

public static IntBuffer slice(int[] buf, int offset)
Creates a new buffer whose content is a shared subsequence of a buffer.

The content of the new buffer will start at the specified offset.

Parameters:
  `buf` - buffer
  `offset` - offset
Returns:
  the new buffer.

### slice

public static LongBuffer slice(long[] buf, int offset)
Creates a new buffer whose content is a shared subsequence of a buffer.

The content of the new buffer will start at the specified offset.

Parameters:
  `buf` - buffer
  `offset` - offset
Returns:
  the new buffer.

### slice

public static FloatBuffer slice(float[] buf, int offset)
Creates a new buffer whose content is a shared subsequence of a buffer.

The content of the new buffer will start at the specified offset.

Parameters:
  `buf` - buffer
  `offset` - offset
Returns:
  the new buffer.

### slice

public static DoubleBuffer slice(double[] buf, int offset)
Creates a new buffer whose content is a shared subsequence of a buffer.

The content of the new buffer will start at the specified offset.

Parameters:
  `buf` - buffer
  `offset` - offset
Returns:
  the new buffer.