Go to the first, previous, next, last section, table of contents.
FM is a low-level interface designed more for performance than for ease
of use. Hence, there is very little error-checking code in the FM
implementation. This makes it fairly easy for a programmer to make a
simple mistake that introduces a race condition and/or causes a program
to hang or crash. The following are some of the pitfalls to look out
for while programming directly to the FM interface:
-
Forgetting to initialize handler ID variables before using them.
-
Terminating a receiver while a sender is still sending to it. This may
occur when node A sends a large message to node B, node B's
handler sets a termination flag and returns without touching any of the
data, and node B's main code detects the termination flag and exits
immediately. Meanwhile, node A is still trying to inject data into
the network and, because FM guarantees delivery, will wait (forever) for
acknowledgement from node B that the data was received correctly.
-
Sending more data with
FM_send_piece() than was specified in
FM_begin_message().
-
Receiving more data with
FM_receive() than was sent by the remote
process.
Go to the first, previous, next, last section, table of contents.