| Cray T3ETM Fortran Optimization Guide - 004-2518-002 | ||
|---|---|---|
| Prev Section | Chapter 2. Parallel Virtual Machine (PVM) | Next Section |
The PVMFINITSEND(3) subroutine lets you choose what PVM will do with the data it sends. Each of the following three choices can be used to advantage in certain circumstances:
PvmDataRaw
PvmDataInPlace
PvmDataDefault
Assuming your application is running only on the CRAY T3E system, the fastest of the three choices is usually PvmDataInPlace, as specified in the following example:
CALL PVMFINITSEND(PvmDataInPlace, ISTAT) |
The PvmDataInPlace specification has the following advantages and disadvantages:
It does not copy the data into a send buffer, which is the primary reason for its speed, unless the data streams feature is turned on. If data streams are turned on, PvmDataInPlace is the same as PvmDataRaw. For more information on data streams, see Section 4.4.7.
It requires you to wait until the transfer is complete before accessing the data, which can slow the program down at times.
You must either provide your own synchronization or send a short message from the receiving PE to let the sending PE know the transfer is complete.
It is optimized for contiguous (stride-1) data. You lose any performance benefit if your data is not contiguous.
Although it is not always the fastest, the PvmDataRaw specification is often considered the most useful of the three for the following reasons:
It does not convert the data into another format, thereby saving on encoding costs.
It ensures that the data is copied into send buffers, meaning the original data can be reused (for example, changed) immediately.
If you are sending integer data and the data does not need more than 32 bits of accuracy, you could see a performance benefit using PvmDataDefault. Because this form of packing copies only the low-order 32 bits of integer data, you can get twice as much data into the same block packed using PvmDataRaw. This can offer some performance benefit with 32-bit data.
Use of the PvmDataRaw method is recommended for most transfers, but, as is often the case, which method is best depends on your application.
| Prev Section | Table of Contents | Title Page | Next Section |
| Parallel Virtual Machine (PVM) | Up one level | the Advantage of 32-bit Data |