Class jPVM
java.lang.Object
|
+----jPVM
- public abstract class jPVM
- extends Object
wrapper class for PVM C library
-
PVM_BYTE
-
-
PVM_CPLX
-
-
PVM_DCPLX
-
-
PVM_DOUBLE
-
-
PVM_FLOAT
-
-
PVM_INT
-
-
PVM_LONG
-
-
PVM_SHORT
-
-
PVM_STR
-
-
PVM_UINT
-
-
PVM_ULONG
-
-
PVM_USHORT
-
-
PvmAllowDirect
-
-
PvmAlready
-
-
PvmAutoErr
-
-
PvmBadMsg
-
-
PvmBadParam
-
-
PvmBadVersion
-
-
PvmCantStart
-
-
PvmDataDefault
-
-
PvmDataFoo
-
-
PvmDataInPlace
-
-
PvmDataRaw
-
-
PvmDebugMask
-
-
PvmDontRoute
-
-
PvmDSysErr
-
-
PvmDupEntry
-
-
PvmDupGroup
-
-
PvmDupHost
-
-
PvmFragSize
-
-
PvmHostAdd
-
-
PvmHostCompl
-
-
PvmHostDelete
-
-
PvmHostFail
-
-
PvmMismatch
-
-
PvmMppFront
-
-
PvmNoBuf
-
-
PvmNoData
-
-
PvmNoEntry
-
-
PvmNoFile
-
-
PvmNoGroup
-
-
PvmNoHost
-
-
PvmNoInst
-
-
PvmNoMem
-
-
PvmNoParent
-
-
PvmNoSuchBuf
-
-
PvmNoTask
-
-
PvmNotImpl
-
-
PvmNotInGroup
-
-
PvmNullGroup
-
-
PvmOk
-
-
PvmOutOfRes
-
-
PvmOutputCode
-
-
PvmOutputTid
-
-
PvmOverflow
-
-
PvmPollConstant
-
-
PvmPollSleep
-
-
PvmPollTime
-
-
PvmPollType
-
-
PvmPvmTaskChild
-
-
PvmResvTids
-
-
PvmRoute
-
-
PvmRouteDirect
-
-
PvmSelfOutputCode
-
-
PvmSelfOutputTid
-
-
PvmSelfTraceCode
-
-
PvmSelfTraceTid
-
-
PvmShowTids
-
-
PvmSysErr
-
-
PvmTaskArch
-
-
PvmTaskDebug
-
-
PvmTaskDefault
-
-
PvmTaskExit
-
-
PvmTaskHost
-
-
PvmTaskSelf
-
-
PvmTaskTrace
-
-
PvmTraceCode
-
-
PvmTraceTid
-
-
jPVM()
-
-
addhosts(String[], int[])
- Adds the computers named in hosts to the configuration
of computers making up the virtual machine.
-
barrier(String, int)
- Blocks the calling process until count members of
the group have called barrier().
-
bcast(String, int)
- Broadcasts a message stored in the active send buffer to all
members of group.
-
bufinfo(int, Integer, Integer, Integer)
- Returns information about the requested message buffer.
-
delete(String, int)
- Deletes entry <name, index> from the pvmd database.
-
delhosts(String[], int[])
- Deletes the computers named in hosts from the
existing virtual machine configuration.
-
exit()
- Tells the local pvmd that this process is leaving PVM.
-
freebuf(int)
- Frees the memory associated with the specified message
buffer, bufid.
-
getinst(String, int)
- Returns the unique instance number corresponding to the task
identified by tid in the group identified by
group.
-
getopt(int)
- Returns value of libpvm options.
-
getrbuf()
- Returns the message buffer identifier bufid for the
active receive buffer, or 0 if there is no current buffer.
-
getsbuf()
- Returns the message buffer identifier bufid for the
active send buffer, or 0 if there is no current buffer.
-
gettid(String, int)
- Returns the tid of the PVM process identified by the group
name group and the instance number inum.
-
gsize(String)
- k
-
halt()
-
-
initsend(int)
-
-
joingroup(String)
-
-
kill(int)
-
-
lvgroup(String)
-
-
mcast(int[], int)
-
-
mkbuf(int)
-
-
mstat(String)
-
-
mytid()
-
-
notify(int, int, int[])
-
-
nrecv(int, int)
-
-
parent()
-
-
perror(String)
-
-
pkboolean(boolean[], int, int)
-
-
pkbyte(byte[], int, int)
-
-
pkcplx(float[], int, int)
-
-
pkdcplx(double[], int, int)
-
-
pkdouble(double[], int, int)
-
-
pkfloat(float[], int, int)
-
-
pkint(int[], int, int)
-
-
pklong(long[], int, int)
-
-
pkshort(short[], int, int)
-
-
pkstr(String)
-
-
precv(int, int, byte[], int, int, Integer, Integer, Integer)
-
-
probe(int, int)
-
-
psend(int, int, byte[], int, int)
-
-
pstat(int)
-
-
recv(int, int)
-
-
reg_hoster()
-
-
reg_tasker()
-
-
send(int, int)
-
-
sendsig(int, int)
-
-
setopt(int, int)
-
-
setrbuf(int)
-
-
setsbuf(int)
-
-
spawn(String, String[], int, String, int[])
-
-
start_pvmd(int, String[], int)
-
-
tidtohost(int)
-
-
trecv(int, int, int, int)
-
-
upkboolean(boolean[], int, int)
-
-
upkbyte(byte[], int, int)
-
-
upkcplx(float[], int, int)
-
-
upkdcplx(double[], int, int)
-
-
upkdouble(double[], int, int)
-
-
upkfloat(float[], int, int)
-
-
upkint(int[], int, int)
-
-
upklong(long[], int, int)
-
-
upkshort(short[], int, int)
-
-
upkstr()
- Same as jPVM.upkstr(int), but with default character
array size of 256 characters (sufficient for most
applications).
-
upkstr(char[])
-
-
upkstr(int)
- Allocates an internal character array of size characters,
calls native method jPVM.
PvmDataDefault
public static final int PvmDataDefault
PvmDataRaw
public static final int PvmDataRaw
PvmDataInPlace
public static final int PvmDataInPlace
PvmDataFoo
public static final int PvmDataFoo
PvmTaskDefault
public static final int PvmTaskDefault
PvmTaskHost
public static final int PvmTaskHost
PvmTaskArch
public static final int PvmTaskArch
PvmTaskDebug
public static final int PvmTaskDebug
PvmTaskTrace
public static final int PvmTaskTrace
PvmMppFront
public static final int PvmMppFront
PvmHostCompl
public static final int PvmHostCompl
PvmTaskExit
public static final int PvmTaskExit
PvmHostDelete
public static final int PvmHostDelete
PvmHostAdd
public static final int PvmHostAdd
PvmRoute
public static final int PvmRoute
PvmDontRoute
public static final int PvmDontRoute
PvmAllowDirect
public static final int PvmAllowDirect
PvmRouteDirect
public static final int PvmRouteDirect
PvmDebugMask
public static final int PvmDebugMask
PvmAutoErr
public static final int PvmAutoErr
PvmOutputTid
public static final int PvmOutputTid
PvmOutputCode
public static final int PvmOutputCode
PvmTraceTid
public static final int PvmTraceTid
PvmTraceCode
public static final int PvmTraceCode
PvmFragSize
public static final int PvmFragSize
PvmResvTids
public static final int PvmResvTids
PvmSelfOutputTid
public static final int PvmSelfOutputTid
PvmSelfOutputCode
public static final int PvmSelfOutputCode
PvmSelfTraceTid
public static final int PvmSelfTraceTid
PvmSelfTraceCode
public static final int PvmSelfTraceCode
PvmShowTids
public static final int PvmShowTids
PvmPollType
public static final int PvmPollType
PvmPollConstant
public static final int PvmPollConstant
PvmPollSleep
public static final int PvmPollSleep
PvmPollTime
public static final int PvmPollTime
PvmTaskSelf
public static final int PvmTaskSelf
PvmPvmTaskChild
public static final int PvmPvmTaskChild
PvmOk
public static final int PvmOk
PvmBadParam
public static final int PvmBadParam
PvmMismatch
public static final int PvmMismatch
PvmOverflow
public static final int PvmOverflow
PvmNoData
public static final int PvmNoData
PvmNoHost
public static final int PvmNoHost
PvmNoFile
public static final int PvmNoFile
PvmNoMem
public static final int PvmNoMem
PvmBadMsg
public static final int PvmBadMsg
PvmSysErr
public static final int PvmSysErr
PvmNoBuf
public static final int PvmNoBuf
PvmNoSuchBuf
public static final int PvmNoSuchBuf
PvmNullGroup
public static final int PvmNullGroup
PvmDupGroup
public static final int PvmDupGroup
PvmNoGroup
public static final int PvmNoGroup
PvmNotInGroup
public static final int PvmNotInGroup
PvmNoInst
public static final int PvmNoInst
PvmHostFail
public static final int PvmHostFail
PvmNoParent
public static final int PvmNoParent
PvmNotImpl
public static final int PvmNotImpl
PvmDSysErr
public static final int PvmDSysErr
PvmBadVersion
public static final int PvmBadVersion
PvmOutOfRes
public static final int PvmOutOfRes
PvmDupHost
public static final int PvmDupHost
PvmCantStart
public static final int PvmCantStart
PvmAlready
public static final int PvmAlready
PvmNoTask
public static final int PvmNoTask
PvmNoEntry
public static final int PvmNoEntry
PvmDupEntry
public static final int PvmDupEntry
PVM_STR
public static final int PVM_STR
PVM_BYTE
public static final int PVM_BYTE
PVM_SHORT
public static final int PVM_SHORT
PVM_INT
public static final int PVM_INT
PVM_FLOAT
public static final int PVM_FLOAT
PVM_CPLX
public static final int PVM_CPLX
PVM_DOUBLE
public static final int PVM_DOUBLE
PVM_DCPLX
public static final int PVM_DCPLX
PVM_LONG
public static final int PVM_LONG
PVM_USHORT
public static final int PVM_USHORT
PVM_UINT
public static final int PVM_UINT
PVM_ULONG
public static final int PVM_ULONG
jPVM
public jPVM()
addhosts
public static native int addhosts(String hosts[],
int infos[])
- Adds the computers named in hosts to the configuration
of computers making up the virtual machine. The names should
have the same syntax as lines of a pvmd
hostfile (see man page for pvmd3): A host name followed by
options of the form xx=y.
- Parameters:
- hosts - An array of Strings naming the hosts to be
added. Pvmd must already be installed and the user must have
an account on the specified hosts.
- infos - An integer array of length equal to hosts
which returns the status for each host. Values less than
zero indicate an error, while positive values are TIDS of the
new hosts.
- Returns:
- status code.
If addhosts() is successfull, info will be equal to
hosts.length. Partial success if indicated by 0 <
info < hosts.length and total failure by info < 1. The array
infos can be checked to determine which host caused the
error.
- See Also:
- mstat, config
barrier
public static native int barrier(String group,
int count)
- Blocks the calling process until count members of
the group have called barrier(). The count argument
is required because processes could be joining the given
group after other processes have called barrier(). Thus,
PVM doesn't know how many group member to wait for at any
given instant. Although count can be set less, it
is typically the total number of members of the group. So,
the logical function of the barrier() call is to provide a
group synchronization. During any given barrier call, all
participating group members must call barrier() with the same
count value. Once a given barrier has been
successfully passed, barrier() may be called again by the same
group using the same group name.
- Parameters:
- group - Character string group name. The group must
exist and the calling process must be a member of the group.
- count - Integer specifying the number of group members
that must call barrier() before they are all released. Though
not required, count is expected to be the total number of
members of the specified group.
- Returns:
- status code.
If barrier() is successful, info will be 0. If some
error occurs, then info will be < 0.
- See Also:
- joingroup
bcast
public static native int bcast(String group,
int msgtag)
- Broadcasts a message stored in the active send buffer to all
members of group. The broadcast messages is not sent
back to the sender. Any PVM task can call bcast(), it need not
be a member of the group. The content of the message can be
distinguished by msgtag.
bcast() is asynchronoous. Computation on the sending processor
resumes as soon as the message is safely on its way to the
receiving processors. This is in contrast to synchronous
communication, during which computation on the sending
processor halts until a matching receive is executed by all the
receiving processors.
bcast() first determines the tids of the group members by
checking the group data base. A multicast is performed to
these tids. If the group is changed during a broadcast, the
change will not be reflected in the broadcast. Multicasting is
not supported by most multiprocessor vendors. Typically, their
native calls only support broadcasting to all the
user's processes on a multiprocessor. Because of this
omission, bcast() may not be an efficient communication method
on some multiprocessors.
- Parameters:
- group - Character string group name of an existing group
- msgtag - Integer message tag supplied by user. msgage tag
should be >=0. It allows the user's program to distinguish
between different kinds of messages.
- Returns:
- status code. Values less than zero indicate an
error.
- See Also:
- joingroup
bufinfo
public static native int bufinfo(int bufid,
Integer bytes,
Integer msgtag,
Integer tid)
- Returns information about the requested message buffer.
Typically it is used to determing facts about the last received
messages such as its size of source. bufinfo() is especially
useful when an application is able to receive an incoming
message, and the action taken depends on the source
tid and the msgtag associated with the
message that comes in first.
jPVM note:
Note that the parameters bytes, msgtag, and tid are
all passed as Integers. Upon succesful completion, use their
intValue() method to get the actual values for those
parameters.
- Parameters:
- bufid - int specifying a particular message buffer
identifier.
- bytes - Integer return the length in byts of the entire
message.
- msgtag - Integer returning the message label. Useful
when the message was received with a wildcard msgtag (-1).
- tid - Integer returning the source of the message.
Useful when the message was received with a wildcard tid
(-1).
- Returns:
- Status code:
Values less than zero indicate an error.
delete
public static native int delete(String name,
int index)
- Deletes entry <name, index> from the pvmd database.
- Parameters:
- name - The class name, a null-terminated string
- index - The class index, >=0.
- Returns:
- Status code: If successful, delete() returns
PvmOk, otherwise it returns a negative error code.
- See Also:
- insert, lookup
delhosts
public static native int delhosts(String hosts[],
int infos[])
- Deletes the computers named in hosts from the
existing virtual machine configuration. All PVM processses and
the pvmd running on these computers are killed as the computer
is deleted.
If a host failes, PVM will continue to function and will
automatically delete the host from the virtual machine. An
application can be notified of a host failure through notify().
It is still the responsibility of the application developer to
make an application tolerant of host failure.
- Parameters:
- hosts - An array of Strings containing the names of the
machines to be deleted.
- infos - int array of same length as hosts which
contains the status code returned by the router for the
individual hosts. Values less than zero in this array
indicate an error.
- Returns:
- Status code:
If delhosts() is successful, return value info will equal
hosts.length. Partial success is indicated by
1<=info<hosts.length, and total failure by info<1. The
array infos can be checked to determine which host
caused the error.
- See Also:
- addhosts, notify
exit
public static native int exit()
- Tells the local pvmd that this process is leaving PVM. This
routine does not kill the process, which can continue to
perform tasks just like any other serial process.
jPVM.exit() should be called by all PVM processes before they
stop or exit for good. It must be called by
processes that were not started with jPVM.spawn().
- Returns:
- Status code:
Values less than zero indicate an error.
freebuf
public static native int freebuf(int bufid)
- Frees the memory associated with the specified message
buffer, bufid. Message buffers are created using
mkbuf(), initsend(), and recv()
. See PVM
version for full discussion of buffer use.
- Returns:
- Status code: Values less than 0 indicate an erro.
- See Also:
- mkbuf, initsend, recv
getinst
public static native int getinst(String group,
int tid)
- Returns the unique instance number corresponding to the task
identified by tid in the group identified by
group.
- Returns:
- Status code: Values less than zero indicate an error.
- See Also:
- joingroup, gettid
getopt
public static native int getopt(int what)
- Returns value of libpvm options. what defines which
option value to return. See PVM description for full
details.
- See Also:
- setopt
getrbuf
public static native int getrbuf()
- Returns the message buffer identifier bufid for the
active receive buffer, or 0 if there is no current buffer.
- See Also:
- getsbuf
getsbuf
public static native int getsbuf()
- Returns the message buffer identifier bufid for the
active send buffer, or 0 if there is no current buffer.
- See Also:
- getrbuf
gettid
public static native int gettid(String group,
int inum)
- Returns the tid of the PVM process identified by the group
name group and the instance number inum.
- Returns:
- Status code: 0 if succesful, less than zero for errors.
- See Also:
- joingroup, getinst
gsize
public static native int gsize(String group)
- k
halt
public static native int halt()
initsend
public static native int initsend(int format)
joingroup
public static native int joingroup(String group)
kill
public static native int kill(int tid)
lvgroup
public static native int lvgroup(String group)
mcast
public static native int mcast(int tids[],
int msgtag)
mkbuf
public static native int mkbuf(int encoding)
mstat
public static native int mstat(String host)
mytid
public static native int mytid()
notify
public static native int notify(int what,
int msgtag,
int tids[])
nrecv
public static native int nrecv(int tid,
int msgtag)
parent
public static native int parent()
pkboolean
public static native int pkboolean(boolean xp[],
int nitem,
int stride)
pkbyte
public static native int pkbyte(byte xp[],
int nitem,
int stride)
pkcplx
public static native int pkcplx(float cp[],
int nitem,
int stride)
pkdcplx
public static native int pkdcplx(double zp[],
int nitem,
int stride)
pkdouble
public static native int pkdouble(double dp[],
int nitem,
int stride)
pkfloat
public static native int pkfloat(float fp[],
int nitem,
int stride)
pkint
public static native int pkint(int ip[],
int nitem,
int stride)
pklong
public static native int pklong(long ip[],
int nitem,
int stride)
pkshort
public static native int pkshort(short jp[],
int nitem,
int stride)
pkstr
public static native int pkstr(String sp)
perror
public static native int perror(String msg)
precv
public static native int precv(int tid,
int msgtag,
byte buf[],
int len,
int datatype,
Integer atid,
Integer atag,
Integer alen)
probe
public static native int probe(int tid,
int msgtag)
psend
public static native int psend(int tid,
int msgtag,
byte buf[],
int len,
int datatype)
pstat
public static native int pstat(int tid)
recv
public static native int recv(int tid,
int msgtag)
reg_hoster
public static native int reg_hoster()
reg_tasker
public static native int reg_tasker()
send
public static native int send(int tid,
int msgtag)
sendsig
public static native int sendsig(int tid,
int signum)
setopt
public static native int setopt(int what,
int val)
setrbuf
public static native int setrbuf(int bufid)
setsbuf
public static native int setsbuf(int bufid)
spawn
public static native int spawn(String task,
String argv[],
int flag,
String where,
int tids[])
start_pvmd
public static native int start_pvmd(int argc,
String argv[],
int block)
tidtohost
public static native int tidtohost(int tid)
trecv
public static native int trecv(int tid,
int msgtag,
int sec,
int usec)
upkboolean
public static native int upkboolean(boolean xp[],
int nitem,
int stride)
upkbyte
public static native int upkbyte(byte xp[],
int nitem,
int stride)
upkcplx
public static native int upkcplx(float xp[],
int nitem,
int stride)
upkdcplx
public static native int upkdcplx(double xp[],
int nitem,
int stride)
upkdouble
public static native int upkdouble(double xp[],
int nitem,
int stride)
upkfloat
public static native int upkfloat(float xp[],
int nitem,
int stride)
upkint
public static native int upkint(int xp[],
int nitem,
int stride)
upklong
public static native int upklong(long xp[],
int nitem,
int stride)
upkshort
public static native int upkshort(short xp[],
int nitem,
int stride)
upkstr
public static native int upkstr(char sp[])
upkstr
public static String upkstr(int size)
- Allocates an internal character array of size characters,
calls native method jPVM. upkstr(char[]), and converts
the resulting contents of the character array to a String
with excess white-space trimmed off.
If you can live with a default size of 256 characters in
the character array, you can simply call jPVM.upkstr().
If you want complete control over the character array
allocation (e.g., you want to use one array over and over
for String unpacking, use jPVM.upkstr(char[]).
- Parameters:
- size - - Size of character array to use for unpacking
from PVM buffer. Should be greater than or equal to length
of maximum expected string (including null terminator).
- Returns:
- String allocated from character array with excess
trailing white space trimmed off.
- See Also:
- upkstr, upkstr
upkstr
public static String upkstr()
- Same as jPVM.upkstr(int), but with default character
array size of 256 characters (sufficient for most
applications).
If you want greater control over the amount
of memory allocated for Strings (e.g., you need larger
Strings, or know you'll never need Strings that large,
use jPVM.upkstr(int).
If you want complete control over the character array
allocation (e.g., you want to use one array over and over
for String unpacking), use jPVM.upkstr(char[]).
- Returns:
- String allocated from character array with excess
trailing white space trimmed off.
- See Also:
- upkstr, upkstr