1% Author: Nuno A. Fonseca
2% Date: 2006-06-01
3% $Id: lam_mpi.yap,v 1.1 2006-06-04 18:43:38 nunofonseca Exp $
use_module(library(lam_mpi))
command. The yap should be
invoked using the LAM mpiexec or mpirun commands (see LAM manual for
more details).
*/
mpi_recv
to receive the messages, one
should use mpi_bcast2
.
*/
*/
*/
*/
*/
/
*/
mpi_wait_recv
should be used to obtain the data associated to
the handle.
*/
mpi_wait
or
mpi_test
predicates. Until mpi_wait
is called, the
memory allocated for the buffer containing the message is not
released.
*/
*/
*/
*/
*/
*/
*/
mpi_send
, the predicate blocks until the message is buffered
or sent by the runtime system. At this point the send buffer is
released. If the operation was a mpi_recv
, it waits until the
message is copied to the receive buffer. Status is unified with
the status of the message.
*/
*/
189:- module(lam_mpi, [ 190 mpi_init/0, 191 mpi_finalize/0, 192 mpi_comm_size/1, 193 mpi_comm_rank/1, 194 mpi_version/2, 195 mpi_send/3, 196 mpi_isend/4, 197 mpi_recv/3, 198 mpi_irecv/3, 199 mpi_wait/2, 200 mpi_wait_recv/3, 201 mpi_test/2, 202 mpi_test_recv/3, 203 mpi_bcast/2, 204 mpi_ibcast2/2, 205 mpi_ibcast3/3, 206 mpi_bcast2/2, 207 mpi_bcast3/3, 208 mpi_barrier/0, 209% mpi_msg_buffer_size/2, 210 mpi_msg_size/2, 211 mpi_gc/0, 212 mpi_default_buffer_size/2 213 ]). 214 215:- use_foreign_library(foreign(pl_mpi),init_mpi). 216 217 218mpi_msg_size(Term, Size) :- 219 terms:export_term(Term, Buf, Size), 220 terms:kill_exported_term(Buf)