LinkTest supports three different test patterns: Semidirectional, bidirectional and unidirectional. These three all test slightly different things. The semidirectional case corresponds to the default ping-pong test, in which a message is bounced a given number of times between two process. In the bidirectional case two messages are bounced between the two process in parallel. In the unidirectional case the the first process repeatedly sends the message its partner, who, once all messages have been received, sends a receipt back. All three of these schemes are summarized in the following figure:
The semidirectional scheme, also colloquially referred to as ping-pong testing, is the standard scheme. In it a message is bounced between processes n
times between the start time t0
and the end time t1
. Dividing t1-t0
by 2n
is then an approximation of the average time it takes to send the message from one process to the other assuming that the message transfer in both directions is equally fast. The average bandwidth is computed from this by dividing the message size by the average time it took for the message to get from one process to another.
The bidirectional scheme differs from the semidirectional in that both process bounce messages in parallel. This saturates a connection between two process in both directions simultaneously. The average time to send a message in this case is computed in the same way as for the semidirectional case. In the bandwidth computation, however, twice the message size is used because two messages were bounced between the process in parallel. As a result the bandwidth in this test can be twice as high.
The unidirectional scheme is fundamentally different from the two previous schemes. In it the first process sends n
back-to-back messages to the second process, who upon receiving all messages sends a receipt to the first process. Timing starts just before the first message is sent and stops after the receipt is received. To determine the average time it took to transfer on message one takes t1-t0
and divides it by the number of messages. The bandwidth is then the message size divided by the average time it took to transfer one message. This scheme is especially useful when the connection between two process is anisotropic, i.e. the first process can send a message faster to the second process than the second process can send a message to the first.