| | |
- copywrite(...)
- This fuction returns the Copywrite for the module.
print mpi.copywrite()
- mpi_alltoall(...)
- Python version of MPI_Alltoall
Sends data from all to all processes
recvbuf=mpi_alltoall(sendbuf,sendcount,sendtype,recvcount,recvtype,comm)
sendbuf
send array (choice)
sendcount
number of elements to send to each process (integer)
sendtype
data type of send array elements (handle)
recvcount
number of elements received from any process (integer)
recvtype
data type of receive array elements (handle)
comm
communicator
recvbuf
receive array
Sets error code read by mpi_error()
- mpi_alltoallv(...)
- Python version of MPI_Alltoallv
Sends different amounts of data from all to all processes
recvbuf=mpi_alltoall(sendbuf,sendcount,senddisp,sendtype,recvcount,recvdisp,recvtype,comm)
sendbuf
send array (choice)
sendcount
number of elements to send to each process (integer)
senddisp
integer array (of length group size). Entry j specifies the displacement
, relative to beginning of sendbuf, from which to take the outgoing data
destined for process j
sendtype
data type of send array elements (handle)
recvcount
number of elements received from any process (integer)
recvdisp
integer array (of length group size). Entry i specifies the displacement,
relative beginning of recvbuf, at which to place the incoming data from process i
recvtype
data type of receive array elements (handle)
comm
communicator
recvbuf
receive array
Sets error code read by mpi_error()
- mpi_attr_get(...)
- Python version of MPI_Attr_get
Retrieves attribute value by key
attr_value=mpi_iprobe(comm,keyvalue)
comm
communicator
keyvalue
key value
attr_value
attribute value if it available, else this routine will cause an exceptionn
Sets status as read by mpi_status()
- mpi_barrier(...)
- Python version of MPI_Barrier
Blocks until all process in the communicator have reached this routine.
mpi_barrier(comm)
comm
communicator
Sets error code read by mpi_error()
- mpi_bcast(...)
- Python version of MPI_Bcast
Broadcasts a message from the process with rank "root" to all other processes of the group.
recvbuf=mpi_bast(sendbuf,sendcount,sendtype, root,comm )
sendbuf
send array (choice)
sendcount
number of elements to send to each process (integer)
sendtype
data type of send array elements (handle)
root
process holding the data to be broadcast
comm
communicator
recvbuf
receive array
Sets error code read by mpi_error()
- mpi_comm_create(...)
- Python version of MPI_Comm_create
Creates a new communicator
comm_out=mpi_comm_create(comm,group)
comm
the old communicator
group
group, which is a subset of the group of comm
comm_out
the new communicator
Sets error code read by mpi_error()
- mpi_comm_dup(...)
- Python version of MPI_Comm_dup
Duplicates an existing communicator with all its cached information
comm_out=mpi_comm_dup(comm)
comm
the old communicator
comm_out
the new communicator
Sets error code read by mpi_error()
- mpi_comm_group(...)
- Python version of MPI_Comm_group
Accesses the group associated with given communicator
group_out=mpi_comm_group(comm)
comm
the communicator
group_out
the group in the communicator
Sets error code read by mpi_error()
- mpi_comm_rank(...)
- Python version of MPI_Comm_rank
Determines the rank of the calling process in the communicator
myid=mpi_comm_rank(comm)
comm
communicator
myid
rank of the calling process in group of comm
- mpi_comm_size(...)
- Python version of MPI_Comm_size
Determines the size of the group associated with a communictor
numprocs=mpi_comm_size(comm)
comm
communicator
myid
number of processes in the group of comm
Sets error code read by mpi_error()
- mpi_comm_split(...)
- Python version of MPI_Comm_split
Creates new communicators based on colors and keys
comm_out=mpi_comm_split(comm,color,key)
comm
the communicator
color
control of subset assignment (nonnegative integer). Processes with the same color are in the same new communicator
key
control of rank assigment
comm_out
the new communicator
Sets error code read by mpi_error()
- mpi_error(...)
- This routine is not part of the MPI standard
Returns an error code from the previous MPI call
errcode=mpi_error()
errcode
The error code from the previous MPI call.
- mpi_finalize(...)
- Python version of MPI_Finalize
Terminates MPI execution environment. All processes must call this routine before exiting.
mpi_finalize()
Sets error code read by mpi_error()
- mpi_gather(...)
- Python version of MPI_Gather
Sends different data from all processes to the root process
recvbuf=mpi_gather(sendbuf,sendcount,sendtype,recvcount,recvtype,root,comm)
sendbuf
send array (choice)
sendcount
number of elements to send from each process (integer)
sendtype
data type of send array elements (handle)
recvcount
number of elements received from any process (integer)
recvtype
data type of receive array elements (handle)
root
process to which the data is to be gathered
comm
communicator
recvbuf
receive array
Sets error code read by mpi_error()
- mpi_gatherv(...)
- Python version of MPI_Gatterv
Sends differing amounts of data from all processes to the root
recvbuf=mpi_gatterv(sendbuf,sendcount,sendtype,recvcount,recvdisp,recvtype,root,comm)
sendbuf
send array (choice)
sendcount
number of elements to send to each process (integer)
sendtype
data type of send array elements (handle)
recvcount
number of elements received from any process (integer)
recvdisp
integer array (of length group size). Entry i specifies the displacement,
relative beginning of recvbuf, at which to place the incoming data from process i
recvtype
data type of receive array elements (handle)
root
process holding the data to be scattered
comm
communicator
recvbuf
receive array
Sets error code read by mpi_error()
- mpi_get_count(...)
- Python version of MPI_Get_count
Gets the number of "top level" elements
count=mpi_get_count(status,datatype)
status
status associated with the previous mpi_send or mpi_[i]probe call
datatype
datatype of each receive buffer element
count
number of received elements
Sets error code read by mpi_error()
- mpi_get_processor_name(...)
- Python version of MPI_Get_processor_name
Gets the name of the processor
name=mpi_get_processor_name()
name
A unique specifier for the actual (as opposed to virtual) node.
Sets error code read by mpi_error()
- mpi_group_incl(...)
- Python version of MPI_Group_incl
Produces a group by reordering an existing group and taking only listed members
group_out=mpi_group_incl(group,n,ranks)
group
the old group
n
number of elements in array ranks (and size of newgroup )
ranks
array of ranks of processes in group to appear in newgroup
group_out
the group in the communicator
Sets error code read by mpi_error()
- mpi_group_rank(...)
- Python version of MPI_Group_rank
Determines the rank of the calling process in the group
myid=mpi_group_rank(group)
group
group
myid
rank of the calling process in group
Sets error code read by mpi_error()
- mpi_init(...)
- Python version of MPI_Init
Initialize the MPI library.
Takes as input the number of command line arguments and a list of
command line arguments.
Returns a potentially modified array of command line arguments
USAGE:
import mpi
import sys
sys.argv = mpi.mpi_init(len(sys.argv),sys.argv)
Sets error code read by mpi_error()
- mpi_iprobe(...)
- Python version of MPI_Iprobe
Nonblocking test for a message
flag=mpi_iprobe(source,tag,comm)
source
process from which the data is being received
tag
message tag
comm
communicator
flag
output flag indicates if a message has arrived
Sets status as read by mpi_status()
- mpi_irecv(...)
- mpi_irecv not yet implemented
- mpi_isend(...)
- mpi_isend not yet implemented
- mpi_probe(...)
- Python version of MPI_Probe
Blocking test for a message
mpi_probe(source,tag,comm)
source
process from which the data is being received
tag
message tag
comm
communicator
Sets status as read by mpi_status()
- mpi_recv(...)
- Python version of MPI_Recv
Receive a message from nother process.
recvbuf=mpi_send(recvcount,recvtype, source,tag,comm)
recvcount
number of elements to send to each process (integer)
recvtype
data type of send array elements (handle)
source
process from which the data is being received
tag
message tag
comm
communicator
recvbuf
receive array
Sets status as read by mpi_status()
Sets error code read by mpi_error()
- mpi_reduce(...)
- Python version of MPI_Reduce
Reduces values on all processes to a single valuer.
recvbuf=mpi_send(sendbuf,sendcount,sendtype, op, root,comm)
sendbuf
send array (choice)
sendcount
number of elements to send to each process (integer)
sendtype
data type of send array elements (handle)
op
reduce operation, MPI_LOR,MPI_LXOR,MPI_SUM,MPI_PROD,MPI_MIN,MPI_MAX
root
process to which the data is being reduced
comm
communicator
recvbuf
receive array
Sets error code read by mpi_error()
- mpi_scatter(...)
- Python version of MPI_Scatter
Sends different data from root to all processes
recvbuf=mpi_scatter(sendbuf,sendcount,sendtype,recvcount,recvtype,root,comm)
sendbuf
send array (choice)
sendcount
number of elements to send to each process (integer)
sendtype
data type of send array elements (handle)
recvcount
number of elements received from any process (integer)
recvtype
data type of receive array elements (handle)
root
process holding the data to be scattered
comm
communicator
recvbuf
receive array
Sets error code read by mpi_error()
- mpi_scatterv(...)
- Python version of MPI_Scatterv
Sends different amounts of data from root to all processes
recvbuf=mpi_scatterv(sendbuf,sendcount,senddisp,sendtype,recvcount,recvtype,root,comm)
sendbuf
send array (choice)
sendcount
number of elements to send to each process (integer)
senddisp
integer array (of length group size). Entry j specifies the displacement
, relative to beginning of sendbuf, from which to take the outgoing data
destined for process j
sendtype
data type of send array elements (handle)
recvcount
number of elements received from any process (integer)
recvtype
data type of receive array elements (handle)
root
process holding the data to be scattered
comm
communicator
recvbuf
receive array
Sets error code read by mpi_error()
- mpi_send(...)
- Python version of MPI_Send
Send a message from a process to another.
mpi_send(sendbuf,sendcount,sendtype, destination,tag,comm)
sendbuf
send array (choice)
sendcount
number of elements to send to each process (integer)
sendtype
data type of send array elements (handle)
destination
process to which the data is being sent
tag
message tag
comm
communicator
Sets error code read by mpi_error()
- mpi_start(...)
- mpi_start - deprecated, use mpi_init
- mpi_status(...)
- This routine is not part of the MPI standard
Returns the status associated with the previous mpi_send or mpi_[i]probe call
statray=mpi_status()
statray
the status array
statray[0]=MPI_SOURCE
statray[1]=MPI_TAG
statray[2]=MPI_ERROR
- mpi_test(...)
- mpi_test not yet implemented
- mpi_wait(...)
- mpi_wait not yet implemented
- mpi_wtick(...)
- Python version of MPI_Wtick
Returns the resolution of mpi_wtime
tres=mpi_wtick()
tres
Time in seconds of resolution of MPI_Wtime
- mpi_wtime(...)
- Python version of MPI_Wtime
Returns an elapsed time on the calling processor
thetime=mpi_wtime()
thetime
Time in seconds since an arbitrary time in the past.
This is intended to be a high-resolution, elapsed (or wall) clock.
See MPI_WTICK to determine the resolution of MPI_WTIME. If the attribute.
MPI_WTIME_IS_GLOBAL is defined and true, then the value is synchronized
across all processes in MPI_COMM_WORLD.
|