Class MPI
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final Opstatic final Datatypestatic final Opstatic final intstatic final Opstatic final Datatypestatic final intstatic final Datatypestatic final Intracommstatic final Intracommstatic final intstatic final Datatypestatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final Datatypestatic final Datatypestatic final DatatypeStruct which must be used withdoubleInt.static final DoubleIntStruct object forDOUBLE_INTdatatype.static final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final Errhandlerstatic final Errhandlerstatic final Datatypestatic final Datatypestatic final DatatypeStruct which must be used withfloatInt.static final FloatIntStruct object forFLOAT_INTdatatype.static final intstatic final Groupstatic final intstatic final intstatic final Infostatic final Infostatic final Datatypestatic final Int2Struct object forINT2datatype.static final DatatypeStruct which must be used withint2.static final intstatic final intstatic final Opstatic final intstatic final intstatic final intstatic final Datatypestatic final DatatypeStruct which must be used withlongInt.static final LongIntStruct object forLONG_INTdatatype.static final Opstatic final Opstatic final Opstatic final intstatic final intstatic final intstatic final intstatic final intstatic final OpGlobal maximum operator.static final Opstatic final OpGlobal minimum operator.static final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final Opstatic final intstatic final intstatic final Datatypestatic final intstatic final Opstatic final Opstatic final Requeststatic final intstatic final intstatic final intstatic final intstatic final Datatypestatic final DatatypeStruct which must be used withshortInt.static final ShortIntStruct object forSHORT_INTdatatype.static final intstatic final intstatic final intstatic final Opstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidassertDirectBuffer(Buffer buf) Asserts that a buffer is direct.protected static voidassertDirectBuffer(Buffer sendbuf, Buffer recvbuf) Asserts that buffers are direct.static voidattachBuffer(byte[] buffer) Attaches a user-provided buffer for sending.protected static ObjectattrGet(byte[] value) protected static byte[]protected static voidcheck()Check if MPI has been initialized and hasn't been finalized.static byte[]Removes an existing buffer (for use in sending).static voidFinalize()Finalize MPI.static StringReturns the version of the MPI Librarystatic StringReturns the name of the processor on which it is called.static VersionReturns a version object representing the version of MPI being used.static String[]Initialize MPI.static intInitThread(String[] args, int required) Initialize MPI with threads.protected static booleanisDirectBuffer(Object obj) Checks if an object is a direct buffer.static booleanTest if MPI has been finalized.protected static booleanisHeapBuffer(Object obj) Checks if an object is a heap buffer.static booleanTest if MPI has been initialized.static booleanJava binding of the MPI operationMPI_IS_THREAD_MAIN.static ByteBuffernewByteBuffer(int capacity) Allocates a new direct byte buffer.static CharBuffernewCharBuffer(int capacity) Allocates a new direct char buffer.static DoubleBuffernewDoubleBuffer(int capacity) Allocates a new direct double buffer.static FloatBuffernewFloatBuffer(int capacity) Allocates a new direct float buffer.static IntBuffernewIntBuffer(int capacity) Allocates a new direct int buffer.static LongBuffernewLongBuffer(int capacity) Allocates a new direct long buffer.static ShortBuffernewShortBuffer(int capacity) Allocates a new direct short buffer.static voidControls profiling.static intJava binding of the MPI operationMPI_QUERY_THREAD.static ByteBufferslice(byte[] buf, int offset) Creates a new buffer whose content is a shared subsequence of a buffer.static CharBufferslice(char[] buf, int offset) Creates a new buffer whose content is a shared subsequence of a buffer.static DoubleBufferslice(double[] buf, int offset) Creates a new buffer whose content is a shared subsequence of a buffer.static FloatBufferslice(float[] buf, int offset) Creates a new buffer whose content is a shared subsequence of a buffer.static IntBufferslice(int[] buf, int offset) Creates a new buffer whose content is a shared subsequence of a buffer.static LongBufferslice(long[] buf, int offset) Creates a new buffer whose content is a shared subsequence of a buffer.static ShortBufferslice(short[] buf, int offset) Creates a new buffer whose content is a shared subsequence of a buffer.static ByteBufferslice(ByteBuffer buf, int offset) Creates a new buffer whose content is a shared subsequence of a buffer.static CharBufferslice(CharBuffer buf, int offset) Creates a new buffer whose content is a shared subsequence of a buffer.static DoubleBufferslice(DoubleBuffer buf, int offset) Creates a new buffer whose content is a shared subsequence of a buffer.static FloatBufferslice(FloatBuffer buf, int offset) Creates a new buffer whose content is a shared subsequence of a buffer.static IntBufferCreates a new buffer whose content is a shared subsequence of a buffer.static LongBufferslice(LongBuffer buf, int offset) Creates a new buffer whose content is a shared subsequence of a buffer.static ShortBufferslice(ShortBuffer buf, int offset) Creates a new buffer whose content is a shared subsequence of a buffer.static doublewtick()Returns resolution of timer.static doublewtime()Returns an elapsed time on the calling processor.
-
Field Details
-
COMM_WORLD
-
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
-
MIN
-
SUM
-
PROD
-
LAND
-
BAND
-
LOR
-
BOR
-
LXOR
-
BXOR
-
REPLACE
-
NO_OP
-
MINLOC
-
MAXLOC
Global maximum operator. SeeMINLOC. -
DATATYPE_NULL
-
BYTE
-
CHAR
-
SHORT
-
BOOLEAN
-
INT
-
LONG
-
FLOAT
-
DOUBLE
-
PACKED
-
FLOAT_COMPLEX
-
DOUBLE_COMPLEX
-
INT2
Struct which must be used withint2. -
SHORT_INT
Struct which must be used withshortInt. -
LONG_INT
Struct which must be used withlongInt. -
FLOAT_INT
Struct which must be used withfloatInt. -
DOUBLE_INT
Struct which must be used withdoubleInt. -
int2
Struct object forINT2datatype. -
shortInt
Struct object forSHORT_INTdatatype. -
longInt
Struct object forLONG_INTdatatype. -
floatInt
Struct object forFLOAT_INTdatatype. -
doubleInt
Struct object forDOUBLE_INTdatatype. -
REQUEST_NULL
-
GROUP_EMPTY
-
INFO_ENV
-
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
-
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
Initialize MPI.Java binding of the MPI operation
MPI_INIT.- Parameters:
args- arguments to themainmethod.- Returns:
- arguments
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
InitThread
Initialize MPI with threads.Java binding of the MPI operation
MPI_INIT_THREAD.- Parameters:
args- arguments to themainmethod.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
Java binding of the MPI operationMPI_QUERY_THREAD.- Returns:
- provided level of thread support
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
isThreadMain
Java binding of the MPI operationMPI_IS_THREAD_MAIN.- Returns:
- true if it is the main thread
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
Finalize
Finalize MPI.Java binding of the MPI operation
MPI_FINALIZE.- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
wtime
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
Returns resolution of timer.Java binding of the MPI operation
MPI_WTICK.- Returns:
- resolution of
wtimein seconds. - Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
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
Returns the version of the MPI LibraryJava binding of the MPI operation
MPI_GET_LIBRARY_VERSION.- Returns:
- A string representation of the MPI Library
-
getProcessorName
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
Test if MPI has been initialized.Java binding of the MPI operation
MPI_INITIALIZED.- Returns:
trueifInithas been called,falseotherwise.- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
isFinalized
Test if MPI has been finalized.Java binding of the MPI operation
MPI_FINALIZED.- Returns:
trueifFinalizehas been called,falseotherwise.- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
attachBuffer
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
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
Controls profiling.This method is not implemented.
Java binding of the MPI operation
MPI_PCONTROL.- Parameters:
level- Profiling level.obj- Profiling information.
-
check
Check if MPI has been initialized and hasn't been finalized.- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
attrSet
- Throws:
MPIException
-
attrGet
- Throws:
MPIException
-
newByteBuffer
Allocates a new direct byte buffer.- Parameters:
capacity- The new buffer's capacity, in bytes- Returns:
- The new byte buffer
-
newCharBuffer
Allocates a new direct char buffer.- Parameters:
capacity- The new buffer's capacity, in chars- Returns:
- The new char buffer
-
newShortBuffer
Allocates a new direct short buffer.- Parameters:
capacity- The new buffer's capacity, in shorts- Returns:
- The new short buffer
-
newIntBuffer
Allocates a new direct int buffer.- Parameters:
capacity- The new buffer's capacity, in ints- Returns:
- The new int buffer
-
newLongBuffer
Allocates a new direct long buffer.- Parameters:
capacity- The new buffer's capacity, in longs- Returns:
- The new long buffer
-
newFloatBuffer
Allocates a new direct float buffer.- Parameters:
capacity- The new buffer's capacity, in floats- Returns:
- The new float buffer
-
newDoubleBuffer
Allocates a new direct double buffer.- Parameters:
capacity- The new buffer's capacity, in doubles- Returns:
- The new double buffer
-
assertDirectBuffer
Asserts that a buffer is direct.- Parameters:
buf- buffer
-
assertDirectBuffer
Asserts that buffers are direct.- Parameters:
sendbuf- The send bufferrecvbuf- The receive buffer
-
isDirectBuffer
Checks if an object is a direct buffer.- Parameters:
obj- object- Returns:
- true if the object is a direct buffer
-
isHeapBuffer
Checks if an object is a heap buffer.- Parameters:
obj- object- Returns:
- true if the object is a heap buffer
-
slice
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- bufferoffset- offset- Returns:
- the new buffer.
-
slice
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- bufferoffset- offset- Returns:
- the new buffer.
-
slice
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- bufferoffset- offset- Returns:
- the new buffer.
-
slice
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- bufferoffset- offset- Returns:
- the new buffer.
-
slice
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- bufferoffset- offset- Returns:
- the new buffer.
-
slice
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- bufferoffset- offset- Returns:
- the new buffer.
-
slice
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- bufferoffset- offset- Returns:
- the new buffer.
-
slice
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- bufferoffset- offset- Returns:
- the new buffer.
-
slice
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- bufferoffset- offset- Returns:
- the new buffer.
-
slice
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- bufferoffset- offset- Returns:
- the new buffer.
-
slice
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- bufferoffset- offset- Returns:
- the new buffer.
-
slice
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- bufferoffset- offset- Returns:
- the new buffer.
-
slice
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- bufferoffset- offset- Returns:
- the new buffer.
-
slice
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- bufferoffset- offset- Returns:
- the new buffer.
-