public final class MPI
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
ANY_SOURCE |
static int |
ANY_TAG |
static int |
APPNUM |
static Op |
BAND |
static Datatype |
BOOLEAN |
static Op |
BOR |
static int |
BSEND_OVERHEAD |
static Op |
BXOR |
static Datatype |
BYTE |
static int |
CART |
static Datatype |
CHAR |
static Intracomm |
COMM_SELF |
static Intracomm |
COMM_WORLD |
static int |
CONGRUENT |
static Datatype |
DATATYPE_NULL |
static int |
DISPLACEMENT_CURRENT |
static int |
DIST_GRAPH |
static int |
DISTRIBUTE_BLOCK |
static int |
DISTRIBUTE_CYCLIC |
static int |
DISTRIBUTE_DFLT_DARG |
static int |
DISTRIBUTE_NONE |
static Datatype |
DOUBLE |
static Datatype |
DOUBLE_COMPLEX |
static Datatype |
DOUBLE_INT
Struct which must be used with
doubleInt . |
static DoubleInt |
doubleInt
Struct object for
DOUBLE_INT datatype. |
static int |
ERR_ACCESS |
static int |
ERR_AMODE |
static int |
ERR_ARG |
static int |
ERR_ASSERT |
static int |
ERR_BAD_FILE |
static int |
ERR_BASE |
static int |
ERR_BUFFER |
static int |
ERR_COMM |
static int |
ERR_CONVERSION |
static int |
ERR_COUNT |
static int |
ERR_DIMS |
static int |
ERR_DISP |
static int |
ERR_DUP_DATAREP |
static int |
ERR_FILE |
static int |
ERR_FILE_EXISTS |
static int |
ERR_FILE_IN_USE |
static int |
ERR_GROUP |
static int |
ERR_IN_STATUS |
static int |
ERR_INFO |
static int |
ERR_INFO_KEY |
static int |
ERR_INFO_NOKEY |
static int |
ERR_INFO_VALUE |
static int |
ERR_INTERN |
static int |
ERR_IO |
static int |
ERR_KEYVAL |
static int |
ERR_LASTCODE |
static int |
ERR_LOCKTYPE |
static int |
ERR_NAME |
static int |
ERR_NO_MEM |
static int |
ERR_NO_SPACE |
static int |
ERR_NO_SUCH_FILE |
static int |
ERR_NOT_SAME |
static int |
ERR_OP |
static int |
ERR_OTHER |
static int |
ERR_PENDING |
static int |
ERR_PORT |
static int |
ERR_PROC_ABORTED |
static int |
ERR_QUOTA |
static int |
ERR_RANK |
static int |
ERR_READ_ONLY |
static int |
ERR_REQUEST |
static int |
ERR_RMA_CONFLICT |
static int |
ERR_RMA_SYNC |
static int |
ERR_ROOT |
static int |
ERR_SERVICE |
static int |
ERR_SIZE |
static int |
ERR_SPAWN |
static int |
ERR_SYSRESOURCE |
static int |
ERR_TAG |
static int |
ERR_TOPOLOGY |
static int |
ERR_TRUNCATE |
static int |
ERR_TYPE |
static int |
ERR_UNKNOWN |
static int |
ERR_UNSUPPORTED_DATAREP |
static int |
ERR_UNSUPPORTED_OPERATION |
static int |
ERR_WIN |
static Errhandler |
ERRORS_ABORT |
static Errhandler |
ERRORS_ARE_FATAL |
static Errhandler |
ERRORS_RETURN |
static Datatype |
FLOAT |
static Datatype |
FLOAT_COMPLEX |
static Datatype |
FLOAT_INT
Struct which must be used with
floatInt . |
static FloatInt |
floatInt
Struct object for
FLOAT_INT datatype. |
static int |
GRAPH |
static Group |
GROUP_EMPTY |
static int |
HOST |
static int |
IDENT |
static Info |
INFO_ENV |
static Info |
INFO_NULL |
static Datatype |
INT |
static Int2 |
int2
Struct object for
INT2 datatype. |
static Datatype |
INT2
Struct which must be used with
int2 . |
static int |
IO |
static int |
KEYVAL_INVALID |
static Op |
LAND |
static int |
LASTUSEDCODE |
static int |
LOCK_EXCLUSIVE |
static int |
LOCK_SHARED |
static Datatype |
LONG |
static Datatype |
LONG_INT
Struct which must be used with
longInt . |
static LongInt |
longInt
Struct object for
LONG_INT datatype. |
static Op |
LOR |
static Op |
LXOR |
static Op |
MAX |
static int |
MAX_DATAREP_STRING |
static int |
MAX_INFO_KEY |
static int |
MAX_INFO_VAL |
static int |
MAX_OBJECT_NAME |
static int |
MAX_PORT_NAME |
static Op |
MAXLOC
Global maximum operator.
|
static Op |
MIN |
static Op |
MINLOC
Global minimum operator.
|
static int |
MODE_APPEND |
static int |
MODE_CREATE |
static int |
MODE_DELETE_ON_CLOSE |
static int |
MODE_EXCL |
static int |
MODE_NOCHECK |
static int |
MODE_NOPRECEDE |
static int |
MODE_NOPUT |
static int |
MODE_NOSTORE |
static int |
MODE_NOSUCCEED |
static int |
MODE_RDONLY |
static int |
MODE_RDWR |
static int |
MODE_SEQUENTIAL |
static int |
MODE_UNIQUE_OPEN |
static int |
MODE_WRONLY |
static Op |
NO_OP |
static int |
ORDER_C |
static int |
ORDER_FORTRAN |
static Datatype |
PACKED |
static int |
PROC_NULL |
static Op |
PROD |
static Op |
REPLACE |
static Request |
REQUEST_NULL |
static int |
ROOT |
static int |
SEEK_CUR |
static int |
SEEK_END |
static int |
SEEK_SET |
static Datatype |
SHORT |
static Datatype |
SHORT_INT
Struct which must be used with
shortInt . |
static ShortInt |
shortInt
Struct object for
SHORT_INT datatype. |
static int |
SIMILAR |
static int |
SUBVERSION |
static int |
SUCCESS |
static Op |
SUM |
static int |
TAG_UB |
static int |
THREAD_FUNNELED |
static int |
THREAD_MULTIPLE |
static int |
THREAD_SERIALIZED |
static int |
THREAD_SINGLE |
static int |
UNDEFINED |
static int |
UNEQUAL |
static int |
UNIVERSE_SIZE |
static int |
VERSION |
static int |
WIN_BASE |
static int |
WIN_DISP_UNIT |
static int |
WIN_SIZE |
static int |
WTIME_IS_GLOBAL |
Constructor and Description |
---|
MPI() |
Modifier and Type | Method and Description |
---|---|
protected static void |
assertDirectBuffer(java.nio.Buffer buf)
Asserts that a buffer is direct.
|
protected static void |
assertDirectBuffer(java.nio.Buffer sendbuf,
java.nio.Buffer recvbuf)
Asserts that buffers are direct.
|
static void |
attachBuffer(byte[] buffer)
Attaches a user-provided buffer for sending.
|
protected static java.lang.Object |
attrGet(byte[] value) |
protected static byte[] |
attrSet(java.lang.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 java.lang.String |
getLibVersion()
Returns the version of the MPI Library
|
static java.lang.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 java.lang.String[] |
Init(java.lang.String[] args)
Initialize MPI.
|
static int |
InitThread(java.lang.String[] args,
int required)
Initialize MPI with threads.
|
protected static boolean |
isDirectBuffer(java.lang.Object obj)
Checks if an object is a direct buffer.
|
static boolean |
isFinalized()
Test if MPI has been finalized.
|
protected static boolean |
isHeapBuffer(java.lang.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 java.nio.ByteBuffer |
newByteBuffer(int capacity)
Allocates a new direct byte buffer.
|
static java.nio.CharBuffer |
newCharBuffer(int capacity)
Allocates a new direct char buffer.
|
static java.nio.DoubleBuffer |
newDoubleBuffer(int capacity)
Allocates a new direct double buffer.
|
static java.nio.FloatBuffer |
newFloatBuffer(int capacity)
Allocates a new direct float buffer.
|
static java.nio.IntBuffer |
newIntBuffer(int capacity)
Allocates a new direct int buffer.
|
static java.nio.LongBuffer |
newLongBuffer(int capacity)
Allocates a new direct long buffer.
|
static java.nio.ShortBuffer |
newShortBuffer(int capacity)
Allocates a new direct short buffer.
|
static void |
pControl(int level,
java.lang.Object obj)
Controls profiling.
|
static int |
queryThread()
Java binding of the MPI operation
MPI_QUERY_THREAD . |
static java.nio.ByteBuffer |
slice(byte[] buf,
int offset)
Creates a new buffer whose content is a shared subsequence of a buffer.
|
static java.nio.ByteBuffer |
slice(java.nio.ByteBuffer buf,
int offset)
Creates a new buffer whose content is a shared subsequence of a buffer.
|
static java.nio.CharBuffer |
slice(char[] buf,
int offset)
Creates a new buffer whose content is a shared subsequence of a buffer.
|
static java.nio.CharBuffer |
slice(java.nio.CharBuffer buf,
int offset)
Creates a new buffer whose content is a shared subsequence of a buffer.
|
static java.nio.DoubleBuffer |
slice(double[] buf,
int offset)
Creates a new buffer whose content is a shared subsequence of a buffer.
|
static java.nio.DoubleBuffer |
slice(java.nio.DoubleBuffer buf,
int offset)
Creates a new buffer whose content is a shared subsequence of a buffer.
|
static java.nio.FloatBuffer |
slice(float[] buf,
int offset)
Creates a new buffer whose content is a shared subsequence of a buffer.
|
static java.nio.FloatBuffer |
slice(java.nio.FloatBuffer buf,
int offset)
Creates a new buffer whose content is a shared subsequence of a buffer.
|
static java.nio.IntBuffer |
slice(int[] buf,
int offset)
Creates a new buffer whose content is a shared subsequence of a buffer.
|
static java.nio.IntBuffer |
slice(java.nio.IntBuffer buf,
int offset)
Creates a new buffer whose content is a shared subsequence of a buffer.
|
static java.nio.LongBuffer |
slice(long[] buf,
int offset)
Creates a new buffer whose content is a shared subsequence of a buffer.
|
static java.nio.LongBuffer |
slice(java.nio.LongBuffer buf,
int offset)
Creates a new buffer whose content is a shared subsequence of a buffer.
|
static java.nio.ShortBuffer |
slice(short[] buf,
int offset)
Creates a new buffer whose content is a shared subsequence of a buffer.
|
static java.nio.ShortBuffer |
slice(java.nio.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.
|
public static final Intracomm COMM_WORLD
public static final Intracomm COMM_SELF
public static final int THREAD_SINGLE
public static final int THREAD_FUNNELED
public static final int THREAD_SERIALIZED
public static final int THREAD_MULTIPLE
public static final int GRAPH
public static final int DIST_GRAPH
public static final int CART
public static final int ANY_SOURCE
public static final int ANY_TAG
public static final Op MAX
public static final Op MIN
public static final Op SUM
public static final Op PROD
public static final Op LAND
public static final Op BAND
public static final Op LOR
public static final Op BOR
public static final Op LXOR
public static final Op BXOR
public static final Op REPLACE
public static final Op NO_OP
public static final Op MINLOC
public static final Datatype DATATYPE_NULL
public static final Datatype BYTE
public static final Datatype CHAR
public static final Datatype SHORT
public static final Datatype BOOLEAN
public static final Datatype INT
public static final Datatype LONG
public static final Datatype FLOAT
public static final Datatype DOUBLE
public static final Datatype PACKED
public static final Datatype FLOAT_COMPLEX
public static final Datatype DOUBLE_COMPLEX
public static final DoubleInt doubleInt
DOUBLE_INT
datatype.public static final Request REQUEST_NULL
public static final Group GROUP_EMPTY
public static final Info INFO_ENV
public static final Info INFO_NULL
public static final int PROC_NULL
public static final int UNDEFINED
public static final int IDENT
public static final int CONGRUENT
public static final int SIMILAR
public static final int UNEQUAL
public static final int TAG_UB
public static final int HOST
public static final int IO
public static final int WTIME_IS_GLOBAL
public static final int APPNUM
public static final int LASTUSEDCODE
public static final int UNIVERSE_SIZE
public static final int WIN_BASE
public static final int WIN_SIZE
public static final int WIN_DISP_UNIT
public static final int VERSION
public static final int SUBVERSION
public static final int ROOT
public static final int KEYVAL_INVALID
public static final int BSEND_OVERHEAD
public static final int MAX_OBJECT_NAME
public static final int MAX_PORT_NAME
public static final int MAX_DATAREP_STRING
public static final int MAX_INFO_KEY
public static final int MAX_INFO_VAL
public static final int ORDER_C
public static final int ORDER_FORTRAN
public static final int DISTRIBUTE_BLOCK
public static final int DISTRIBUTE_CYCLIC
public static final int DISTRIBUTE_NONE
public static final int DISTRIBUTE_DFLT_DARG
public static final int MODE_CREATE
public static final int MODE_RDONLY
public static final int MODE_WRONLY
public static final int MODE_RDWR
public static final int MODE_DELETE_ON_CLOSE
public static final int MODE_UNIQUE_OPEN
public static final int MODE_EXCL
public static final int MODE_APPEND
public static final int MODE_SEQUENTIAL
public static final int DISPLACEMENT_CURRENT
public static final int SEEK_SET
public static final int SEEK_CUR
public static final int SEEK_END
public static final int MODE_NOCHECK
public static final int MODE_NOPRECEDE
public static final int MODE_NOPUT
public static final int MODE_NOSTORE
public static final int MODE_NOSUCCEED
public static final int LOCK_EXCLUSIVE
public static final int LOCK_SHARED
public static final Errhandler ERRORS_ARE_FATAL
public static final Errhandler ERRORS_ABORT
public static final Errhandler ERRORS_RETURN
public static final int SUCCESS
public static final int ERR_BUFFER
public static final int ERR_COUNT
public static final int ERR_TYPE
public static final int ERR_TAG
public static final int ERR_COMM
public static final int ERR_RANK
public static final int ERR_REQUEST
public static final int ERR_ROOT
public static final int ERR_GROUP
public static final int ERR_OP
public static final int ERR_TOPOLOGY
public static final int ERR_DIMS
public static final int ERR_ARG
public static final int ERR_UNKNOWN
public static final int ERR_TRUNCATE
public static final int ERR_OTHER
public static final int ERR_INTERN
public static final int ERR_IN_STATUS
public static final int ERR_PENDING
public static final int ERR_ACCESS
public static final int ERR_AMODE
public static final int ERR_ASSERT
public static final int ERR_BAD_FILE
public static final int ERR_BASE
public static final int ERR_CONVERSION
public static final int ERR_DISP
public static final int ERR_DUP_DATAREP
public static final int ERR_FILE_EXISTS
public static final int ERR_FILE_IN_USE
public static final int ERR_FILE
public static final int ERR_INFO_KEY
public static final int ERR_INFO_NOKEY
public static final int ERR_INFO_VALUE
public static final int ERR_INFO
public static final int ERR_IO
public static final int ERR_KEYVAL
public static final int ERR_LOCKTYPE
public static final int ERR_NAME
public static final int ERR_NO_MEM
public static final int ERR_NOT_SAME
public static final int ERR_NO_SPACE
public static final int ERR_NO_SUCH_FILE
public static final int ERR_PORT
public static final int ERR_PROC_ABORTED
public static final int ERR_QUOTA
public static final int ERR_READ_ONLY
public static final int ERR_RMA_CONFLICT
public static final int ERR_RMA_SYNC
public static final int ERR_SERVICE
public static final int ERR_SIZE
public static final int ERR_SPAWN
public static final int ERR_UNSUPPORTED_DATAREP
public static final int ERR_UNSUPPORTED_OPERATION
public static final int ERR_WIN
public static final int ERR_LASTCODE
public static final int ERR_SYSRESOURCE
public static java.lang.String[] Init(java.lang.String[] args) throws MPIException
Java binding of the MPI operation MPI_INIT
.
args
- arguments to the main
method.MPIException
- Signals that an MPI error of some sort has occurred.public static int InitThread(java.lang.String[] args, int required) throws MPIException
Java binding of the MPI operation MPI_INIT_THREAD
.
args
- arguments to the main
method.required
- desired level of thread supportMPIException
- Signals that an MPI error of some sort has occurred.public static int queryThread() throws MPIException
MPI_QUERY_THREAD
.MPIException
- Signals that an MPI error of some sort has occurred.public static boolean isThreadMain() throws MPIException
MPI_IS_THREAD_MAIN
.MPIException
- Signals that an MPI error of some sort has occurred.public static void Finalize() throws MPIException
Java binding of the MPI operation MPI_FINALIZE
.
MPIException
- Signals that an MPI error of some sort has occurred.public static double wtime() throws MPIException
Java binding of the MPI operation MPI_WTIME
.
MPIException
- Signals that an MPI error of some sort has occurred.public static double wtick() throws MPIException
Java binding of the MPI operation MPI_WTICK
.
wtime
in seconds.MPIException
- Signals that an MPI error of some sort has occurred.public static Version getVersion()
Java binding of the MPI operation MPI_GET_VERSION
.
public static java.lang.String getLibVersion()
Java binding of the MPI operation MPI_GET_LIBRARY_VERSION
.
public static java.lang.String getProcessorName() throws MPIException
Java binding of the MPI operation MPI_GET_PROCESSOR_NAME
.
MPIException
- Signals that an MPI error of some sort has occurred.public static boolean isInitialized() throws MPIException
Java binding of the MPI operation MPI_INITIALIZED
.
true
if Init
has been called,
false
otherwise.MPIException
- Signals that an MPI error of some sort has occurred.public static boolean isFinalized() throws MPIException
Java binding of the MPI operation MPI_FINALIZED
.
true
if Finalize
has been called,
false
otherwise.MPIException
- Signals that an MPI error of some sort has occurred.public static void attachBuffer(byte[] buffer) throws MPIException
Java binding of the MPI operation MPI_BUFFER_ATTACH
.
buffer
- initial bufferMPIException
- Signals that an MPI error of some sort has occurred.public static byte[] detachBuffer() throws MPIException
Java binding of the MPI operation MPI_BUFFER_DETACH
.
MPIException
- Signals that an MPI error of some sort has occurred.public static void pControl(int level, java.lang.Object obj)
This method is not implemented.
Java binding of the MPI operation MPI_PCONTROL
.
level
- Profiling level.obj
- Profiling information.protected static void check() throws MPIException
MPIException
- Signals that an MPI error of some sort has occurred.protected static byte[] attrSet(java.lang.Object value) throws MPIException
MPIException
protected static java.lang.Object attrGet(byte[] value) throws MPIException
MPIException
public static java.nio.ByteBuffer newByteBuffer(int capacity)
capacity
- The new buffer's capacity, in bytespublic static java.nio.CharBuffer newCharBuffer(int capacity)
capacity
- The new buffer's capacity, in charspublic static java.nio.ShortBuffer newShortBuffer(int capacity)
capacity
- The new buffer's capacity, in shortspublic static java.nio.IntBuffer newIntBuffer(int capacity)
capacity
- The new buffer's capacity, in intspublic static java.nio.LongBuffer newLongBuffer(int capacity)
capacity
- The new buffer's capacity, in longspublic static java.nio.FloatBuffer newFloatBuffer(int capacity)
capacity
- The new buffer's capacity, in floatspublic static java.nio.DoubleBuffer newDoubleBuffer(int capacity)
capacity
- The new buffer's capacity, in doublesprotected static void assertDirectBuffer(java.nio.Buffer buf)
buf
- bufferprotected static void assertDirectBuffer(java.nio.Buffer sendbuf, java.nio.Buffer recvbuf)
sendbuf
- The send bufferrecvbuf
- The receive bufferprotected static boolean isDirectBuffer(java.lang.Object obj)
obj
- objectprotected static boolean isHeapBuffer(java.lang.Object obj)
obj
- objectpublic static java.nio.ByteBuffer slice(java.nio.ByteBuffer buf, int offset)
The content of the new buffer will start at the specified offset.
buf
- bufferoffset
- offsetpublic static java.nio.CharBuffer slice(java.nio.CharBuffer buf, int offset)
The content of the new buffer will start at the specified offset.
buf
- bufferoffset
- offsetpublic static java.nio.ShortBuffer slice(java.nio.ShortBuffer buf, int offset)
The content of the new buffer will start at the specified offset.
buf
- bufferoffset
- offsetpublic static java.nio.IntBuffer slice(java.nio.IntBuffer buf, int offset)
The content of the new buffer will start at the specified offset.
buf
- bufferoffset
- offsetpublic static java.nio.LongBuffer slice(java.nio.LongBuffer buf, int offset)
The content of the new buffer will start at the specified offset.
buf
- bufferoffset
- offsetpublic static java.nio.FloatBuffer slice(java.nio.FloatBuffer buf, int offset)
The content of the new buffer will start at the specified offset.
buf
- bufferoffset
- offsetpublic static java.nio.DoubleBuffer slice(java.nio.DoubleBuffer buf, int offset)
The content of the new buffer will start at the specified offset.
buf
- bufferoffset
- offsetpublic static java.nio.ByteBuffer slice(byte[] buf, int offset)
The content of the new buffer will start at the specified offset.
buf
- bufferoffset
- offsetpublic static java.nio.CharBuffer slice(char[] buf, int offset)
The content of the new buffer will start at the specified offset.
buf
- bufferoffset
- offsetpublic static java.nio.ShortBuffer slice(short[] buf, int offset)
The content of the new buffer will start at the specified offset.
buf
- bufferoffset
- offsetpublic static java.nio.IntBuffer slice(int[] buf, int offset)
The content of the new buffer will start at the specified offset.
buf
- bufferoffset
- offsetpublic static java.nio.LongBuffer slice(long[] buf, int offset)
The content of the new buffer will start at the specified offset.
buf
- bufferoffset
- offsetpublic static java.nio.FloatBuffer slice(float[] buf, int offset)
The content of the new buffer will start at the specified offset.
buf
- bufferoffset
- offsetpublic static java.nio.DoubleBuffer slice(double[] buf, int offset)
The content of the new buffer will start at the specified offset.
buf
- bufferoffset
- offset